Rename decoder to video_decoder
This prepares the introduction of audio_decoder. PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
parent
a205ff6c8b
commit
99837fa600
1 changed files with 8 additions and 8 deletions
|
@ -42,7 +42,7 @@ struct scrcpy {
|
||||||
struct sc_screen screen;
|
struct sc_screen screen;
|
||||||
struct sc_demuxer video_demuxer;
|
struct sc_demuxer video_demuxer;
|
||||||
struct sc_demuxer audio_demuxer;
|
struct sc_demuxer audio_demuxer;
|
||||||
struct sc_decoder decoder;
|
struct sc_decoder video_decoder;
|
||||||
struct sc_recorder recorder;
|
struct sc_recorder recorder;
|
||||||
#ifdef HAVE_V4L2
|
#ifdef HAVE_V4L2
|
||||||
struct sc_v4l2_sink v4l2_sink;
|
struct sc_v4l2_sink v4l2_sink;
|
||||||
|
@ -436,13 +436,13 @@ scrcpy(struct scrcpy_options *options) {
|
||||||
&audio_demuxer_cbs, NULL);
|
&audio_demuxer_cbs, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool needs_decoder = options->display;
|
bool needs_video_decoder = options->display;
|
||||||
#ifdef HAVE_V4L2
|
#ifdef HAVE_V4L2
|
||||||
needs_decoder |= !!options->v4l2_device;
|
needs_video_decoder |= !!options->v4l2_device;
|
||||||
#endif
|
#endif
|
||||||
if (needs_decoder) {
|
if (needs_video_decoder) {
|
||||||
sc_decoder_init(&s->decoder);
|
sc_decoder_init(&s->video_decoder);
|
||||||
sc_demuxer_add_sink(&s->video_demuxer, &s->decoder.packet_sink);
|
sc_demuxer_add_sink(&s->video_demuxer, &s->video_decoder.packet_sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->record_filename) {
|
if (options->record_filename) {
|
||||||
|
@ -656,7 +656,7 @@ aoa_hid_end:
|
||||||
}
|
}
|
||||||
screen_initialized = true;
|
screen_initialized = true;
|
||||||
|
|
||||||
sc_decoder_add_sink(&s->decoder, &s->screen.frame_sink);
|
sc_decoder_add_sink(&s->video_decoder, &s->screen.frame_sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_V4L2
|
#ifdef HAVE_V4L2
|
||||||
|
@ -666,7 +666,7 @@ aoa_hid_end:
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
sc_decoder_add_sink(&s->decoder, &s->v4l2_sink.frame_sink);
|
sc_decoder_add_sink(&s->video_decoder, &s->v4l2_sink.frame_sink);
|
||||||
|
|
||||||
v4l2_sink_initialized = true;
|
v4l2_sink_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue