Skip to content

Commit

Permalink
remove cv2 from core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tokoroten committed Jul 3, 2024
1 parent f5ddaef commit 2bfac60
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scrcpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from time import sleep
from typing import Any, Callable, Optional, Tuple, Union

import cv2
import numpy as np
from adbutils import AdbConnection, AdbDevice, AdbError, Network, adb
from av.codec import CodecContext
Expand Down Expand Up @@ -44,7 +43,7 @@ def __init__(
bitrate: bitrate
max_fps: maximum fps, 0 means not limited (supported after android 10)
flip: flip the video
block_frame: only return nonempty frames, may block cv2 render thread
block_frame: only return nonempty frames
stay_awake: keep Android device awake
lock_screen_orientation: lock screen orientation, LOCK_SCREEN_ORIENTATION_*
connection_timeout: timeout for connection, unit is ms
Expand Down Expand Up @@ -235,7 +234,7 @@ def __stream_loop(self) -> None:
for frame in frames:
frame = frame.to_ndarray(format="bgr24")
if self.flip:
frame = cv2.flip(frame, 1)
frame = frame[:, ::-1, :]
self.last_frame = frame
self.resolution = (frame.shape[1], frame.shape[0])
self.__send_to_listeners(EVENT_FRAME, frame)
Expand Down

0 comments on commit 2bfac60

Please sign in to comment.