From patchwork Thu Jan 25 18:00:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wm4 X-Patchwork-Id: 7415 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.156.27 with SMTP id q27csp2353839jak; Thu, 25 Jan 2018 10:00:39 -0800 (PST) X-Google-Smtp-Source: AH8x2267Grq68Rvcj46QL3KBK+xe+jwBi+fjEJk/MDNTbLyxb0FZXVx3e+uNWE9tCf1Lkp6v17Vw X-Received: by 10.28.227.70 with SMTP id a67mr5877636wmh.46.1516903239512; Thu, 25 Jan 2018 10:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516903239; cv=none; d=google.com; s=arc-20160816; b=WYNlJO6YBHIzeC2WR96P/QaL4d1eFxmF0F+YJpcVrCyPxqAJCp0OPTYYiznuje9nn1 2OjjcVV+cRGM8vGppX9u/X8HfgtyCq640WJ7eOu3Lz7EXJ/7nCIBbhbc6yBraBVVxHD3 ae99Bug8yG2EOSmeDyX4M/xJnD7AmWJ0piAYy7yb0PLvfDzQZLUadznu+WEmRHz6mXB+ E2fy7uwkiMfDzeHg7JLTDcqfCAID/w5/Xvkdcmf1ptAk7sp4sCE0/WnaqHMLHUgjtzzQ T8NlPSMONAGNTWqDIZ3BvOKD68MpynKjtLWuWeaBYNPYeuVCAHsDYgg140yFQKpwl2xi BXWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=Y9GiCi4UVNEMUNTLtLmpnK1daVndP06kRg8Nb4PFWE4=; b=d1wT7WZevHdzXjUD/3PkEqyeRUmqY7URx2WYxWGs4uPsIM9sD9CfuYDqQQlooX1Rpn GkkvydTQ+EFvQ1Ra+zX0/bU3woiqaIvGvHfut4W0Csx5M1uhcjsnpLTq7EvyNeKb/aQ3 seqr4Oae9d5HqevcXmlzRFYQC8iZY8kN6g6Mimv++6oYsvj05rguAg5nQAh5uIzkgnal jE+oHbmpvguln9Fihm0109LpTQpIaz0cs7GwUeX3NwQVRrFyLQcqgbaxPfxh4Eww3cYW bxulmXRQWxo28wxc3vNPXuPoZFN09p1HsXXUgNeZ0aZRsi1zn0unumD/OQS0JDVzFpwN GUMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=OYszLcxr; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l73si4187833wrc.177.2018.01.25.10.00.38; Thu, 25 Jan 2018 10:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=OYszLcxr; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 119D368824F; Thu, 25 Jan 2018 20:00:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51EA5680CFB for ; Thu, 25 Jan 2018 20:00:27 +0200 (EET) Received: by mail-wm0-f46.google.com with SMTP id f71so16247195wmf.0 for ; Thu, 25 Jan 2018 10:00:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=yGmsiGe41LzI5SzlBSjQY72JsG61Jg/WsGHTTU7oV4g=; b=OYszLcxr4Yy7p6eWb1X0aUF5DUjOZrGF5MOD9D4Maz9fhdqWF24qWdVFZqOEd1CMQ7 bgIHdPlJ3bG3nMalcH1ZACPkH1K9HgDu7dLS9LsatnjUujXQvz4GXiqFMY1kbekXCY9c UlefTfEkQ46YHBUtE9LPGk36HRFLDVzTcbZdu0V6Nzcv09xC4hz7m2Rv0aiWNzbo9b5Y 0qxG1nW35iMn3ajZCthPQFn9EW1bcXJ0lrxr1xjYCTkwRrHBby9JluHRNu1G9pIk1Xvm uuKxGrVaRW1wd5eJxM/Csg4ELxY7hCbthvUmTOYKJX6Yjokz8pqeZTgry+9GS561bcK2 bIPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yGmsiGe41LzI5SzlBSjQY72JsG61Jg/WsGHTTU7oV4g=; b=TgPUxgChrHeAsltS4b/2bcqVO+8u2S8bCDZ0RLQQWoaH6GCY3uum6NbCMHWNcFIelG UuVSZPqealT2r6cdm+Q8kttnvrXnh5wCVXnHbOTgUxnRaPu0dCgU7G1xi0yDvWQkSPXI kPaKCDeTz5C5rASnwEbsnDXD+xqVe3FTRcNw74SsSye0nFH7VNQB++8z2ViBhRHW22S0 R+oVtKh0sAVUiTCbyE7/LjTTa1nM81rtkAif4Gib3VpNhZwcgMUP8m7IPoPcjfZw/5j0 8fhYS4sJxg6Lo/64RmbzM4h/kt6quAQIgKZPjQjKoN5RxsUDQ39M8LkDJ2st5Jl+MgRp XbGg== X-Gm-Message-State: AKwxytf4U/KngO/iWMbAYepPzJ8iMr9jBDQ2nYpn4WmApwROPxvMRvja z6FEfkKQPKhFVri4R3fq6N3NfQ== X-Received: by 10.28.127.73 with SMTP id a70mr7512325wmd.43.1516903229466; Thu, 25 Jan 2018 10:00:29 -0800 (PST) Received: from debian.speedport.ip (p2003006CCD4EDC76C4A214B19CE27A13.dip0.t-ipconnect.de. [2003:6c:cd4e:dc76:c4a2:14b1:9ce2:7a13]) by smtp.googlemail.com with ESMTPSA id m191sm1982923wma.42.2018.01.25.10.00.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 10:00:28 -0800 (PST) From: wm4 To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jan 2018 19:00:43 +0100 Message-Id: <20180125180043.12502-1-nfxjfg@googlemail.com> X-Mailer: git-send-email 2.15.1 Subject: [FFmpeg-devel] [PATCH] rtsp: rename certain options after a deprecation period 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: wm4 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The names inherently clash with the meanings of the HTTP libavformat protocol options. Rename them after a deprecation period to make them compatible with the HTTP ones. --- I see no better way that wouldn't require more effort than justified. The incompatible semantics of the "timeout" option while still clashing with the HTTP one caused major problems to me as API user, and I'm hoping that this will solve itself in 2 years. --- doc/APIchanges | 5 +++++ libavformat/rtsp.c | 9 +++++++++ libavformat/version.h | 5 ++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 59e3b20c08..bf8664c799 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,11 @@ libavutil: 2017-10-21 API changes, most recent first: +2018-01-xx - xxxxxxx - lavf 58.7.100 - avformat.h + Deprecate the current names of the RTSP "timeout", "stimeout", "user-agent" + options. Once the deprecation is over, "timeout" will be renamed to + "listen_timeout", "stimeout" to "timeout", and "user-agent" to "user_agent". + 2018-01-xx - xxxxxxx - lavf 58.6.100 - avformat.h Add AVFMTCTX_UNSEEKABLE (for HLS demuxer). diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index cf7cdb2f2b..bed5f1ea11 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -93,10 +93,19 @@ const AVOption ff_rtsp_options[] = { RTSP_MEDIATYPE_OPTS("allowed_media_types", "set media types to accept from the server"), { "min_port", "set minimum local UDP port", OFFSET(rtp_port_min), AV_OPT_TYPE_INT, {.i64 = RTSP_RTP_PORT_MIN}, 0, 65535, DEC|ENC }, { "max_port", "set maximum local UDP port", OFFSET(rtp_port_max), AV_OPT_TYPE_INT, {.i64 = RTSP_RTP_PORT_MAX}, 0, 65535, DEC|ENC }, +#if FF_API_OLD_RTSP_OPTIONS { "timeout", "set maximum timeout (in seconds) to wait for incoming connections (-1 is infinite, imply flag listen)", OFFSET(initial_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, DEC }, { "stimeout", "set timeout (in microseconds) of socket TCP I/O operations", OFFSET(stimeout), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, DEC }, +#else + { "listen_timeout", "set maximum timeout (in seconds) to wait for incoming connections (-1 is infinite, imply flag listen)", OFFSET(initial_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, DEC }, + { "timeout", "set timeout (in microseconds) of socket TCP I/O operations", OFFSET(stimeout), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, DEC }, +#endif COMMON_OPTS(), +#if FF_API_OLD_RTSP_OPTIONS { "user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT}, 0, 0, DEC }, +#else + { "user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT}, 0, 0, DEC }, +#endif { NULL }, }; diff --git a/libavformat/version.h b/libavformat/version.h index 5ff8a89ae0..4285e925cf 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 -#define LIBAVFORMAT_VERSION_MINOR 6 +#define LIBAVFORMAT_VERSION_MINOR 7 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -85,6 +85,9 @@ #ifndef FF_API_LAVF_FFSERVER #define FF_API_LAVF_FFSERVER (LIBAVFORMAT_VERSION_MAJOR < 59) #endif +#ifndef FF_API_OLD_RTSP_OPTIONS +#define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif #ifndef FF_API_R_FRAME_RATE