Make decoder push frames to sinks
Now that screen implements the packet sink trait, make decoder push packets to the sinks without depending on the concrete sink types.
This commit is contained in:
@@ -318,7 +318,7 @@ scrcpy(const struct scrcpy_options *options) {
|
||||
file_handler_initialized = true;
|
||||
}
|
||||
|
||||
decoder_init(&decoder, &video_buffer);
|
||||
decoder_init(&decoder);
|
||||
dec = &decoder;
|
||||
}
|
||||
|
||||
@@ -382,6 +382,8 @@ scrcpy(const struct scrcpy_options *options) {
|
||||
}
|
||||
screen_initialized = true;
|
||||
|
||||
decoder_add_sink(&decoder, &screen.frame_sink);
|
||||
|
||||
if (options->turn_screen_off) {
|
||||
struct control_msg msg;
|
||||
msg.type = CONTROL_MSG_TYPE_SET_SCREEN_POWER_MODE;
|
||||
|
||||
Reference in New Issue
Block a user