mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 05:54:20 +01:00
Use a callback to notify a new frame
Make the decoder independant of the SDL even mechanism, by making the consumer register a callback on the video_buffer.
This commit is contained in:
@@ -19,13 +19,7 @@ push_frame(struct decoder *decoder) {
|
||||
&previous_frame_skipped);
|
||||
if (previous_frame_skipped) {
|
||||
fps_counter_add_skipped_frame(decoder->fps_counter);
|
||||
// the previous EVENT_NEW_FRAME will consume this frame
|
||||
return;
|
||||
}
|
||||
static SDL_Event new_frame_event = {
|
||||
.type = EVENT_NEW_FRAME,
|
||||
};
|
||||
SDL_PushEvent(&new_frame_event);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user