From 98ad4c0ef902132977475c3474359155d7ec7900 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 09:59:58 +0000 Subject: [PATCH] Rename --srt-sink to --stream-sink Co-authored-by: yeicor <4929005+yeicor@users.noreply.github.com> --- app/src/cli.c | 18 +++++++++--------- app/src/options.c | 2 +- app/src/options.h | 2 +- app/src/scrcpy.c | 4 ++-- app/src/stream_sink.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/src/cli.c b/app/src/cli.c index 06c6db0b..2929c987 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -114,7 +114,7 @@ enum { OPT_NO_VD_SYSTEM_DECORATIONS, OPT_NO_VD_DESTROY_CONTENT, OPT_DISPLAY_IME_POLICY, - OPT_SRT_SINK, + OPT_STREAM_SINK, }; struct sc_option { @@ -958,8 +958,8 @@ static const struct sc_option options[] = { #endif }, { - .longopt_id = OPT_SRT_SINK, - .longopt = "srt-sink", + .longopt_id = OPT_STREAM_SINK, + .longopt = "stream-sink", .argdesc = "url", .text = "Stream the device video (and audio, if enabled) as MPEG-TS " "over SRT to the given URL.\n" @@ -2700,8 +2700,8 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], LOGE("OTG mode (--otg) is disabled."); return false; #endif - case OPT_SRT_SINK: - opts->srt_sink = optarg; + case OPT_STREAM_SINK: + opts->stream_sink = optarg; break; case OPT_V4L2_SINK: #ifdef HAVE_V4L2 @@ -2893,15 +2893,15 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], } if (opts->video && !opts->video_playback && !opts->record_filename - && !v4l2 && !opts->srt_sink) { - LOGI("No video playback, no recording, no V4L2 sink, no SRT sink: " + && !v4l2 && !opts->stream_sink) { + LOGI("No video playback, no recording, no V4L2 sink, no stream sink: " "video disabled"); opts->video = false; } if (opts->audio && !opts->audio_playback && !opts->record_filename - && !opts->srt_sink) { - LOGI("No audio playback, no recording, no SRT sink: audio disabled"); + && !opts->stream_sink) { + LOGI("No audio playback, no recording, no stream sink: audio disabled"); opts->audio = false; } diff --git a/app/src/options.c b/app/src/options.c index 77768c0e..cb51c3c6 100644 --- a/app/src/options.c +++ b/app/src/options.c @@ -71,7 +71,7 @@ const struct scrcpy_options scrcpy_options_default = { .v4l2_device = NULL, .v4l2_buffer = 0, #endif - .srt_sink = NULL, + .stream_sink = NULL, #ifdef HAVE_USB .otg = false, #endif diff --git a/app/src/options.h b/app/src/options.h index 138992de..182c05bb 100644 --- a/app/src/options.h +++ b/app/src/options.h @@ -281,7 +281,7 @@ struct scrcpy_options { const char *v4l2_device; sc_tick v4l2_buffer; #endif - const char *srt_sink; + const char *stream_sink; #ifdef HAVE_USB bool otg; #endif diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 20e52e9a..eb804ca6 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -636,8 +636,8 @@ scrcpy(struct scrcpy_options *options) { } } - if (options->srt_sink) { - if (!sc_stream_sink_init(&s->stream_sink, options->srt_sink, + if (options->stream_sink) { + if (!sc_stream_sink_init(&s->stream_sink, options->stream_sink, options->video, options->audio)) { goto end; } diff --git a/app/src/stream_sink.c b/app/src/stream_sink.c index 38ec8a9c..8a483a91 100644 --- a/app/src/stream_sink.c +++ b/app/src/stream_sink.c @@ -204,7 +204,7 @@ sc_stream_sink_process_header(struct sc_stream_sink *sink) { .opaque = sink, }; - LOGI("SRT sink: waiting for client on %s", sink->url); + LOGI("Stream sink: waiting for client on %s", sink->url); int r = avio_open2(&sink->ctx->pb, connect_url, AVIO_FLAG_WRITE, &int_cb, NULL); @@ -249,7 +249,7 @@ sc_stream_sink_process_packets(struct sc_stream_sink *sink) { return false; } - LOGI("SRT sink: streaming started on %s", sink->url); + LOGI("Stream sink: streaming started on %s", sink->url); AVPacket *video_pkt = NULL; AVPacket *audio_pkt = NULL;