Skip to content

Commit

Permalink
add resolution arguments to VideoSource
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Nov 5, 2023
1 parent 84c03a9 commit 027339c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion livekit-rtc/livekit/rtc/video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@


class VideoSource:
def __init__(self) -> None:
def __init__(self, width: int, height: int) -> None:
req = proto_ffi.FfiRequest()
req.new_video_source.type = (
proto_video_frame.VideoSourceType.VIDEO_SOURCE_NATIVE
)
req.new_video_source.resolution.width = width
req.new_video_source.resolution.height = height

resp = ffi_client.request(req)
self._info = resp.new_video_source.source
Expand Down

0 comments on commit 027339c

Please sign in to comment.