Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avformat: add MMTP parser and MMT/TLV demuxer
Date: Fri, 28 Apr 2023 22:44:21 +0200
Message-ID: <20230428204421.GG275832@pb2> (raw)
In-Reply-To: <20230428173128.21074-1-admin@superfashi.com>


[-- Attachment #1.1: Type: text/plain, Size: 1963 bytes --]

On Sat, Apr 29, 2023 at 02:31:28AM +0900, SuperFashi wrote:
> 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 (loas), 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 of the 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>


fails to build

libavformat/mmtp.c: In function ‘parse_video_component_descriptor’:
libavformat/mmtp.c:216:36: error: ‘VIDEO_COMPONENT_DESCRIPTOR_ID’ undeclared (first use in this function); did you mean ‘VIDEO_COMPONENT_DESCRIPTOR’?
         av_assert1(AV_RB16(buf) == VIDEO_COMPONENT_DESCRIPTOR_ID);
                                    ^
libavformat/mmtp.c:33:5: note: in definition of macro ‘LIMIT_READ’
     block; \
     ^~~~~
[...]


> +#include <stdbool.h>
> +

> +#define LIMIT_READ(consume, block) \
> +    if (size < (consume)) return AVERROR_INVALIDDATA; \
> +    block; \
> +    buf += (consume); \
> +    size -= (consume);

This makes the code hard to debug and read


> +
> +#define MUST_CONSUME(consume) \
> +    av_assert1((consume) <= size); \
> +    buf += (consume); \
> +    size -= (consume);

this could maybe use some bytestream reader
either way a function should be cleaner than a macro

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2023-04-28 20:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 17:31 SuperFashi
2023-04-28 20:44 ` Michael Niedermayer [this message]
2023-04-29  5:44 ` [FFmpeg-devel] [PATCH v2] " SuperFashi
2023-04-29  5:49   ` [FFmpeg-devel] [PATCH v3] " SuperFashi
2023-04-29  5:53     ` [FFmpeg-devel] [PATCH v4] " SuperFashi
2023-04-29 18:05       ` Michael Niedermayer
2023-04-30  3:32         ` SuperFashi
2023-04-30 15:14           ` Anton Khirnov
2023-05-01  1:10             ` SuperFashi
2023-05-01  7:39               ` Anton Khirnov
2023-05-01 11:01       ` [FFmpeg-devel] [PATCH v5] " SuperFashi
2023-05-02 12:57         ` Paul B Mahol
2023-05-02 13:43           ` SuperFashi
2023-05-03 13:02         ` [FFmpeg-devel] [PATCH v6] " SuperFashi
2023-05-17  8:27           ` SuperFashi
2023-04-29 11:38   ` [FFmpeg-devel] [PATCH v2] " Jean-Baptiste Kempf
2023-04-29 12:03     ` SuperFashi
2023-11-12 10:02 [FFmpeg-devel] [PATCH] " SuperFashi
2023-11-19  4:07 ` SuperFashi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230428204421.GG275832@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git