Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aentwist authored and leng-yue committed Sep 27, 2024
1 parent a022e61 commit 6b6b82c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 5 additions & 1 deletion scrcpy/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ def text(self, text: str) -> bytes:

@inject(const.TYPE_INJECT_TOUCH_EVENT)
def touch(
self, x: int, y: int, action: int = const.ACTION_DOWN, touch_id: int = 0x1234567887654321
self,
x: int,
y: int,
action: int = const.ACTION_DOWN,
touch_id: int = 0x1234567887654321,
) -> bytes:
"""
Touch screen
Expand Down
11 changes: 4 additions & 7 deletions scrcpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ def __init__(
"c2.qti.avc.encoder",
"c2.android.avc.encoder",
]
assert codec_name in [
None,
"h264",
"h265",
"av1"
]
assert codec_name in [None, "h264", "h265", "av1"]

# Params
self.flip = flip
Expand Down Expand Up @@ -163,7 +158,9 @@ def __deploy_server(self) -> None:
f"max_size={self.max_width}",
f"max_fps={self.max_fps}",
f"video_bit_rate={self.bitrate}",
f"video_encoder={self.encoder_name}" if self.encoder_name else "video_encoder=OMX.google.h264.encoder",
f"video_encoder={self.encoder_name}"
if self.encoder_name
else "video_encoder=OMX.google.h264.encoder",
f"video_codec={self.codec_name}" if self.codec_name else "video_codec=h264",
"tunnel_forward=true",
"send_frame_meta=false",
Expand Down
5 changes: 2 additions & 3 deletions scrcpy_ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
from adbutils import adb
from PySide6.QtGui import QImage, QKeyEvent, QMouseEvent, QPixmap, Qt
from PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox
from ui_main import Ui_MainWindow

import scrcpy

from ui_main import Ui_MainWindow

if not QApplication.instance():
app = QApplication([])
else:
Expand Down Expand Up @@ -40,7 +39,7 @@ def __init__(
flip=self.ui.flip.isChecked(),
bitrate=1000000000,
encoder_name=encoder_name,
max_fps=60
max_fps=60,
)
self.client.add_listener(scrcpy.EVENT_INIT, self.on_init)
self.client.add_listener(scrcpy.EVENT_FRAME, self.on_frame)
Expand Down

0 comments on commit 6b6b82c

Please sign in to comment.