diff mbox series

[FFmpeg-devel,v3] avformat: add MMTP parser and MMT/TLV demuxer

Message ID 20230429054950.6148-1-admin@superfashi.com
State New
Headers show
Series [FFmpeg-devel,v3] avformat: add MMTP parser and MMT/TLV demuxer | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

SuperFashi April 29, 2023, 5:49 a.m. UTC
v0 -> v1: Refactor using GetByteContext; Fix compile error.
v1 -> v2: Remove debug statement.

This patch adds an MPEG Media Transport Protocol (MMTP) parser, as defined in ISO/IEC 23008-1, and an MMT protocol over TLV packets (MMT/TLV) demuxer, as defined in ARIB STD-B32. Currently, it supports HEVC, AAC LATM, and ARIB-TTML demuxing.

Since MMTP is designed to transmit over IP, there is no size information within each MMTP packet, and there is no filesystem format defined alongside the protocol. One industrial solution is a simple container format using type–length–value packets, which is defined in ARIB STD-B32.

Another known container format for MMTP is using packet capture (pcap) files which records network packets. This patch does not include the demuxer for this container format.

Signed-off-by: SuperFashi <admin@superfashi.com>
---
 libavformat/mmtp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/mmtp.c b/libavformat/mmtp.c
index a2f98e39f6..ba1fcab281 100644
--- a/libavformat/mmtp.c
+++ b/libavformat/mmtp.c
@@ -29,8 +29,6 @@ 
 
 #include <stdbool.h>
 
-#define AVERROR_INVALIDDATA (abort(), 0)
-
 #define ENSURE_BS_LEFT(bs, size) if (bytestream2_get_bytes_left(bs) < (size)) return AVERROR_INVALIDDATA
 
 struct MMTGeneralLocationInfo {
@@ -115,7 +113,6 @@  static inline int parse_mmt_general_location_info(struct MMTGeneralLocationInfo
     return 0;
 }
 
-
 struct Streams {
     AVStream *stream;
 
@@ -155,7 +152,7 @@  struct MMTPContext {
     AVFormatContext *s;
     AVPacket        *pkt;
     uint16_t        current_pid;
-    bool is_rap;
+    bool            is_rap;
 };
 
 static inline struct Streams *find_current_stream(struct MMTPContext *ctx) {