From patchwork Tue Oct 6 07:18:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra Rao Sidlagatta X-Patchwork-Id: 22737 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 89DFE44B859 for ; Tue, 6 Oct 2020 10:19:00 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 69F6168B45C; Tue, 6 Oct 2020 10:19:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D81868ADD5 for ; Tue, 6 Oct 2020 10:18:54 +0300 (EEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: raghavendra) with ESMTPSA id 68C4F29967B From: raghavendra To: ffmpeg-devel@ffmpeg.org Date: Tue, 6 Oct 2020 12:48:07 +0530 Message-Id: <20201006071807.1208359-1-raghavendra.rao@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201001135202.1105554-1-raghavendra.rao@collabora.com> References: <20201001135202.1105554-1-raghavendra.rao@collabora.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4] avformat/libsrt: print streamid at client X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: raghavendra Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Print the SRT streamid at the client. Logged to info. Signed-off-by: raghavendra Signed-off-by: raghavendra Signed-off-by: raghavendra Signed-off-by: raghavendra Signed-off-by: raghavendra Signed-off-by: raghavendra --- libavformat/libsrt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index 4025b24976..eed48c11cf 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -359,6 +359,13 @@ static int libsrt_set_options_pre(URLContext *h, int fd) return 0; } +static void libsrt_dump_streamid(URLContext *h, int fd) +{ + char streamid[512]; + int optlen = sizeof(streamid); + if (!libsrt_getsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", streamid, &optlen)) + av_log(h, AV_LOG_INFO, "srt_streamid : %s\n", streamid); +} static int libsrt_setup(URLContext *h, const char *uri, int flags) { @@ -442,6 +449,8 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags) goto fail1; listen_fd = fd; fd = ret; + // dump srt streamid at client + libsrt_dump_streamid(h, fd); } else { if (s->mode == SRT_MODE_RENDEZVOUS) { ret = srt_bind(fd, cur_ai->ai_addr, cur_ai->ai_addrlen);