From patchwork Tue Dec 22 22:47:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 24625 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 A8894449934 for ; Wed, 23 Dec 2020 00:48:01 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7B4FB68ABFF; Wed, 23 Dec 2020 00:48:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BFB7E68A957 for ; Wed, 23 Dec 2020 00:47:54 +0200 (EET) Received: by mail-pj1-f65.google.com with SMTP id lj6so2041674pjb.0 for ; Tue, 22 Dec 2020 14:47:54 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=53K5BhPHu5ZTu9mEQmUcDXQ2IhzL3sQ0NYa+nDmt294=; b=i1zv8fSjzUZqv30tiuQEalgsS2Z/BvUmHvjLH8w3iyTgjTbjOsZ2agcLPUEbiJ5iB8 hDP3lRa5wYjZb+HPVzM1KdIqFkD/vUYMO7RwnVPR7jTtu3TxGsIBe8C0xxiczaWeUy/V VFeUwjLEEZ2JRYfJbEFO9jc9/XWzXV0+b0vpjKSuRZtsf7ehn/hTe1tTsEcpXZdTn3uP QvTc2n9ZHPsdNn4o0e9XcGrQKJDKyuxArq1e46eKn9qPMWYkTvGrpWi+NGm9QnOgLmko VBRZKZFVUtu1mWJJMoyAk5SRHFInhweGvgPnifrRQd98FF9RWre6GKbGRbgOMsw0DGa5 4mhw== X-Gm-Message-State: AOAM531ngvxO7Gqsep5FMg4UXd19E314f23Y1iFmAtWtwaEQqt4n9CH8 zvaTOePfy9FtdqBZxIeJ1bCpHXOPxGt3K4hZ X-Google-Smtp-Source: ABdhPJw4DlAGl+wxh85aMf/vcjHV2lIi8nSMiKL1/42Aw59acoEE9JhwRnrjKjvCpM/0oaHeaudTTg== X-Received: by 2002:a17:90a:e60d:: with SMTP id j13mr24387355pjy.52.1608677272702; Tue, 22 Dec 2020 14:47:52 -0800 (PST) Received: from tmm1-imac.lan (ip72-194-222-34.sb.sd.cox.net. [72.194.222.34]) by smtp.gmail.com with ESMTPSA id m8sm20691725pjr.39.2020.12.22.14.47.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2020 14:47:51 -0800 (PST) From: Aman Karmani To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Dec 2020 14:47:45 -0800 Message-Id: <20201222224747.12690-1-ffmpeg@tmm1.net> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/3] avformat/rtsp: add support for satip:// 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: Aman Karmani Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Aman Karmani The SAT>IP protocol[1] is similar to RTSP. However SAT>IP servers are assumed to speak only MP2T, so DESCRIBE is not used in the same way. When no streams are active, DESCRIBE will return 404 according to the spec (see section 3.5.7). When streams are active, DESCRIBE will return a list of all current streams along with information about their signal strengths. Previously, attemping to use ffmpeg with a rtsp:// url that points to a SAT>IP server would work with some devices, but fail due to 404 response on others. Further, if the SAT>IP server was already streaming, ffmpeg would incorrectly consume the DESCRIBE SDP response and join an existing tuner instead of requesting a new session with the URL provided by the user. These issues have been noted by many users across the internet[2][3][4]. This commit adds proper spec-compliant support for SAT>IP, including: - support for the satip:// psuedo-protocol[5] - avoiding the use of DESCRIBE - parsing and consuming the com.ses.streamID response header - using "Transport: RTP/AVP;unicast" because the optional "/UDP" suffix confuses some servers This patch has been validated against multiple SAT>IP vendor devices: - Telestar Digibit R2 (https://telestar.de/en/produkt/digibit-r1-2/) - Kathrein EXIP 418 (https://www.kathrein-ds.com/en/produkte/sat-zf-verteiltechnik/sat-ip/227/exip-418) - Kathrein EXIP 4124 (https://www.kathrein-ds.com/en/products/sat-if-signal-distribution/sat-ip/226/exip-4124) - Megasat MEG-8000 (https://www.megasat.tv/produkt/sat-ip-server-3/) - Megasat Twin (https://www.megasat.tv/en/produkt/sat-ip-server-twin/) - Triax TSS 400 (https://www.conrad.com/p/triax-tss-400-mkii-sat-ip-server-595256) [1] https://www.satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf [2] https://stackoverflow.com/questions/61194344/does-ffmpeg-violate-the-satip-specification-describe-syntax [3] https://github.com/kodi-pvr/pvr.iptvsimple/issues/196 [4] https://forum.kodi.tv/showthread.php?tid=359072&pid=2995884#pid2995884 [5] https://www.satip.info/resources/channel-lists/ --- libavformat/rtsp.c | 53 ++++++++++++++++++++++++++++++++++++++----- libavformat/rtsp.h | 6 +++++ libavformat/rtspdec.c | 1 + 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index c7ffa07d9e..ba21b50b76 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -252,6 +252,25 @@ static void finalize_rtp_handler_init(AVFormatContext *s, RTSPStream *rtsp_st, } } +static int init_satip_stream(AVFormatContext *s) +{ + RTSPState *rt = s->priv_data; + RTSPStream *rtsp_st = av_mallocz(sizeof(RTSPStream)); + if (!rtsp_st) + return AVERROR(ENOMEM); + dynarray_add(&rt->rtsp_streams, + &rt->nb_rtsp_streams, rtsp_st); + + rtsp_st->sdp_payload_type = 33; // MP2T + av_strlcpy(rtsp_st->control_url, + rt->control_uri, sizeof(rtsp_st->control_url)); + + rtsp_st->stream_index = -1; + init_rtp_handler(&ff_mpegts_dynamic_handler, rtsp_st, NULL); + finalize_rtp_handler_init(s, rtsp_st, NULL); + return 0; +} + /* parse the rtpmap description: /[/] */ static int sdp_parse_rtpmap(AVFormatContext *s, AVStream *st, RTSPStream *rtsp_st, @@ -1116,6 +1135,9 @@ void ff_rtsp_parse_line(AVFormatContext *s, } else if (av_stristart(p, "Content-Type:", &p)) { p += strspn(p, SPACE_CHARS); av_strlcpy(reply->content_type, p, sizeof(reply->content_type)); + } else if (av_stristart(p, "com.ses.streamID:", &p)) { + p += strspn(p, SPACE_CHARS); + av_strlcpy(reply->stream_id, p, sizeof(reply->stream_id)); } } @@ -1495,8 +1517,10 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, rtp_opened: port = ff_rtp_get_local_rtp_port(rtsp_st->rtp_handle); have_port: - snprintf(transport, sizeof(transport) - 1, - "%s/UDP;", trans_pref); + av_strlcpy(transport, trans_pref, sizeof(transport)); + av_strlcat(transport, + rt->server_type == RTSP_SERVER_SATIP ? ";" : "/UDP;", + sizeof(transport)); if (rt->server_type != RTSP_SERVER_REAL) av_strlcat(transport, "unicast;", sizeof(transport)); av_strlcatf(transport, sizeof(transport), @@ -1559,6 +1583,15 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, goto fail; } + if (rt->server_type == RTSP_SERVER_SATIP && reply->stream_id[0]) { + char proto[128], host[128], path[512], auth[128]; + int port; + av_url_split(proto, sizeof(proto), auth, sizeof(auth), host, sizeof(host), + &port, path, sizeof(path), rt->control_uri); + ff_url_join(rt->control_uri, sizeof(rt->control_uri), proto, NULL, host, + port, "/stream=%s", reply->stream_id); + } + /* XXX: same protocol for all streams is required */ if (i > 0) { if (reply->transports[0].lower_transport != rt->lower_transport || @@ -1710,6 +1743,9 @@ redirect: lower_rtsp_proto = "tls"; default_port = RTSPS_DEFAULT_PORT; rt->lower_transport_mask = 1 << RTSP_LOWER_TRANSPORT_TCP; + } else if (!strcmp(proto, "satip")) { + av_strlcpy(proto, "rtsp", sizeof(proto)); + rt->server_type = RTSP_SERVER_SATIP; } if (*auth) { @@ -1857,7 +1893,9 @@ redirect: /* request options supported by the server; this also detects server * type */ - for (rt->server_type = RTSP_SERVER_RTP;;) { + if (rt->server_type != RTSP_SERVER_SATIP) + rt->server_type = RTSP_SERVER_RTP; + for (;;) { cmd[0] = 0; if (rt->server_type == RTSP_SERVER_REAL) av_strlcat(cmd, @@ -1892,9 +1930,12 @@ redirect: break; } - if (CONFIG_RTSP_DEMUXER && s->iformat) - err = ff_rtsp_setup_input_streams(s, reply); - else if (CONFIG_RTSP_MUXER) + if (CONFIG_RTSP_DEMUXER && s->iformat) { + if (rt->server_type == RTSP_SERVER_SATIP) + err = init_satip_stream(s); + else + err = ff_rtsp_setup_input_streams(s, reply); + } else if (CONFIG_RTSP_MUXER) err = ff_rtsp_setup_output_streams(s, host); else av_assert0(0); diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index b74cdc148a..239ea8a0eb 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -188,6 +188,11 @@ typedef struct RTSPMessageHeader { * Content type header */ char content_type[64]; + + /** + * SAT>IP com.ses.streamID header + */ + char stream_id[64]; } RTSPMessageHeader; /** @@ -210,6 +215,7 @@ enum RTSPServerType { RTSP_SERVER_RTP, /**< Standards-compliant RTP-server */ RTSP_SERVER_REAL, /**< Realmedia-style server */ RTSP_SERVER_WMS, /**< Windows Media server */ + RTSP_SERVER_SATIP,/**< SAT>IP server */ RTSP_SERVER_NB }; diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index bfbb01d586..113da975e1 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -724,6 +724,7 @@ static int rtsp_probe(const AVProbeData *p) #if CONFIG_TLS_PROTOCOL av_strstart(p->filename, "rtsps:", NULL) || #endif + av_strstart(p->filename, "satip:", NULL) || av_strstart(p->filename, "rtsp:", NULL)) return AVPROBE_SCORE_MAX; return 0; From patchwork Tue Dec 22 22:47:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 24627 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 C2E8A449934 for ; Wed, 23 Dec 2020 00:48:03 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ADA6668AC1A; Wed, 23 Dec 2020 00:48:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D70F468A9A5 for ; Wed, 23 Dec 2020 00:47:55 +0200 (EET) Received: by mail-pg1-f194.google.com with SMTP id f17so9325303pge.6 for ; Tue, 22 Dec 2020 14:47:55 -0800 (PST) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=GodZ1iICZnjIPIrPLBrEsvpBw3Zi2titGiUKOulYY+4=; b=U4QPSDVqNoVeSCe7cIE6jDB9lpZtLAvRPsxX383lid/CSLGcvcIEHh1HAN+G/gvC+T whb1ji5+CgDcUVoEfp3ByRk32H7H0/bG6svEQ7miIWCpFNqv269U5PN/2QxJyIjWbahE livp/sOsgSfohIGsX10qAaqgZjhpMA2+zlEUW8MKjDGb4bbkf6OIFTTuyNDkedwvszmX fOJg4TR6PBY6v2YtCH6H404ocEAz0bfVXSYljeMTTVZo2oQQeqfxTt5KD/RV7PkqpIvl UyNtDfW/K+ercGhCrMetn/hm35JEo4LqHMDhS7/+eSy8AOOv1I7QJmbny8JueSmHQgmD S92w== X-Gm-Message-State: AOAM531DPU9PibcyP8VQCyxT7lde71bIMDD4ZqNHNeCg6+VLHBMBuTv8 q5KxbVoTDkRRvAlce7jlFdqqvr27spWsv7Dd X-Google-Smtp-Source: ABdhPJxVZSn2wI/ZVEMRXW37LbCAz74JKdugrTXlj6+NofbNTHQXM415x9wY6AvfcncnBDnoY32xxA== X-Received: by 2002:a63:f64c:: with SMTP id u12mr4138562pgj.98.1608677273885; Tue, 22 Dec 2020 14:47:53 -0800 (PST) Received: from tmm1-imac.lan (ip72-194-222-34.sb.sd.cox.net. [72.194.222.34]) by smtp.gmail.com with ESMTPSA id m8sm20691725pjr.39.2020.12.22.14.47.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2020 14:47:53 -0800 (PST) From: Aman Karmani To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Dec 2020 14:47:46 -0800 Message-Id: <20201222224747.12690-2-ffmpeg@tmm1.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201222224747.12690-1-ffmpeg@tmm1.net> References: <20201222224747.12690-1-ffmpeg@tmm1.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/3] avformat/rtsp: add satip_raw flag to receive raw mpegts stream 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: Aman Karmani Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Aman Karmani This can be used to receive the raw mpegts stream from a SAT>IP server, by letting avformat handle the RTSP/RTP/UDP negotiation and setup, but then simply passing the MP2T stream through instead of demuxing it further. For example, this command would demux/remux the mpegts stream: SATIP_URL='satip://192.168.1.99:554/?src=1&freq=12188&pol=h&ro=0.35&msys=dvbs&mtype=qpsk&plts=off&sr=27500&fec=34&pids=0,17,18,167,136,47,71' ffmpeg -i $SATIP_URL -map 0 -c copy -f mpegts -y remux.ts Whereas this command will simply write out the raw stream, with the original PAT/PMT/PIDs intact: ffmpeg -rtsp_flags satip_raw -i $SATIP_URL -map 0 -c copy -f data -y raw.ts Signed-off-by: Aman Karmani --- libavformat/rtsp.c | 17 ++++++++++++++--- libavformat/rtsp.h | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ba21b50b76..450ad3a4b8 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -89,6 +89,7 @@ const AVOption ff_rtsp_options[] = { RTSP_FLAG_OPTS("rtsp_flags", "set RTSP flags"), { "listen", "wait for incoming connections", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_LISTEN}, 0, 0, DEC, "rtsp_flags" }, { "prefer_tcp", "try RTP via TCP first, if available", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_PREFER_TCP}, 0, 0, DEC|ENC, "rtsp_flags" }, + { "satip_raw", "export raw MPEG-TS stream instead of demuxing", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_SATIP_RAW}, 0, 0, DEC, "rtsp_flags" }, 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 }, @@ -265,9 +266,19 @@ static int init_satip_stream(AVFormatContext *s) av_strlcpy(rtsp_st->control_url, rt->control_uri, sizeof(rtsp_st->control_url)); - rtsp_st->stream_index = -1; - init_rtp_handler(&ff_mpegts_dynamic_handler, rtsp_st, NULL); - finalize_rtp_handler_init(s, rtsp_st, NULL); + if (rt->rtsp_flags & RTSP_FLAG_SATIP_RAW) { + AVStream *st = avformat_new_stream(s, NULL); + if (!st) + return AVERROR(ENOMEM); + st->id = rt->nb_rtsp_streams - 1; + rtsp_st->stream_index = st->index; + st->codecpar->codec_type = AVMEDIA_TYPE_DATA; + st->codecpar->codec_id = AV_CODEC_ID_MPEG2TS; + } else { + rtsp_st->stream_index = -1; + init_rtp_handler(&ff_mpegts_dynamic_handler, rtsp_st, NULL); + finalize_rtp_handler_init(s, rtsp_st, NULL); + } return 0; } diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 239ea8a0eb..1310dd9c08 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -429,6 +429,7 @@ typedef struct RTSPState { #define RTSP_FLAG_RTCP_TO_SOURCE 0x8 /**< Send RTCP packets to the source address of received packets. */ #define RTSP_FLAG_PREFER_TCP 0x10 /**< Try RTP via TCP first if possible. */ +#define RTSP_FLAG_SATIP_RAW 0x20 /**< Export SAT>IP stream as raw MPEG-TS */ typedef struct RTSPSource { char addr[128]; /**< Source-specific multicast include source IP address (from SDP content) */ From patchwork Tue Dec 22 22:47:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 24628 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 89A8C44AF6D for ; Wed, 23 Dec 2020 00:48:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 71D3268ABDA; Wed, 23 Dec 2020 00:48:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B27CA68ABC8 for ; Wed, 23 Dec 2020 00:47:57 +0200 (EET) Received: by mail-pf1-f179.google.com with SMTP id s21so9240636pfu.13 for ; Tue, 22 Dec 2020 14:47:57 -0800 (PST) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=cmFJl4omr4BuGSh7o3VpxsZqwrAk7vaz/mPYH0Brx4g=; b=GA6UmonvaoYSYtT8thKGmZ73T8U8/KgG0xTb6TjSl8VpXFwSa1VpjmX+NDRLubyM4k mPmoKwfyVDv9CvcsBCS1rgyYnENl82FPH6IUJwepGlj0GoQy2OPt1fIsWhRUXhVT9t7M /IkcfuyFx7IbOfFeORHuoEef7xRy4gSJdI3oD6abA+pCJ+I9UDz+rLbYz9dxXN3+HvAR St7RcQro9897Nv3j+gEO8UbgsN3BeIVA42P3ZUSSO5mz9K8dPRXCH3uAvXd/5R+IysAj guITvVIRsz8cK/HqPExG53yIHTVncyuu8n0bMIXq95cus51LB9Q0Yq7SayUgysmJgV0Q JWRw== X-Gm-Message-State: AOAM533qX7e+sLiW31w3m/mvC1IID0hWUuHN17ddWbxLvvIdXx9T3JrE gQpzGubDowMIyF10vma9Fa5ehIurOSmpTIfm X-Google-Smtp-Source: ABdhPJy4q8GmJpejH5nbe3T/g+CMKNrJDQKcyJWF21bNrYHle2fmaH6A3aGm/oiHkTUmJ2nzHh7TGQ== X-Received: by 2002:a63:44d:: with SMTP id 74mr21753262pge.170.1608677275842; Tue, 22 Dec 2020 14:47:55 -0800 (PST) Received: from tmm1-imac.lan (ip72-194-222-34.sb.sd.cox.net. [72.194.222.34]) by smtp.gmail.com with ESMTPSA id m8sm20691725pjr.39.2020.12.22.14.47.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2020 14:47:54 -0800 (PST) From: Aman Karmani To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Dec 2020 14:47:47 -0800 Message-Id: <20201222224747.12690-3-ffmpeg@tmm1.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201222224747.12690-1-ffmpeg@tmm1.net> References: <20201222224747.12690-1-ffmpeg@tmm1.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 3/3] avcodec/codec_desc: describe AV_CODEC_ID_MPEG2TS 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: Aman Karmani Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Aman Karmani Signed-off-by: Aman Karmani --- libavcodec/codec_desc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 404c460f8f..14757bf31b 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -3445,6 +3445,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("binary data"), .mime_types= MT("application/octet-stream"), }, + { + .id = AV_CODEC_ID_MPEG2TS, + .type = AVMEDIA_TYPE_DATA, + .name = "mpegts", + .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-TS stream"), + .mime_types= MT("application/MP2T"), + }, { .id = AV_CODEC_ID_WRAPPED_AVFRAME, .type = AVMEDIA_TYPE_VIDEO,