From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F193945022 for ; Fri, 28 Apr 2023 20:44:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 68C2268C035; Fri, 28 Apr 2023 23:44:30 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13C7C68C004 for ; Fri, 28 Apr 2023 23:44:23 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 62AEAC0005 for ; Fri, 28 Apr 2023 20:44:22 +0000 (UTC) Date: Fri, 28 Apr 2023 22:44:21 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230428204421.GG275832@pb2> References: <20230428173128.21074-1-admin@superfashi.com> MIME-Version: 1.0 In-Reply-To: <20230428173128.21074-1-admin@superfashi.com> Subject: Re: [FFmpeg-devel] [PATCH] avformat: add MMTP parser and MMT/TLV demuxer X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: multipart/mixed; boundary="===============2042406089315765658==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2042406089315765658== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qCuyVVLLFvr0p6ls" Content-Disposition: inline --qCuyVVLLFvr0p6ls Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 29, 2023 at 02:31:28AM +0900, SuperFashi wrote: > This patch adds an MPEG Media Transport Protocol (MMTP) parser, as define= d in ISO/IEC 23008-1, and an MMT protocol over TLV packets (MMT/TLV) demuxe= r, as defined in ARIB STD-B32. Currently, it supports hevc, aac (loas), and= arib-ttml demuxing. >=20 > Since MMTP is designed to transmit over IP, there is no size information = within each MMTP packet, and there is no filesystem format defined alongsid= e the protocol. One of the solution is a simple container format using type= =E2=80=93length=E2=80=93value packets, which is defined in ARIB STD-B32. >=20 > Another known container format for MMTP is using packet capture (pcap) fi= les which records network packets. This patch does not include the demuxer = for this container format. >=20 > Signed-off-by: SuperFashi fails to build libavformat/mmtp.c: In function =E2=80=98parse_video_component_descriptor= =E2=80=99: libavformat/mmtp.c:216:36: error: =E2=80=98VIDEO_COMPONENT_DESCRIPTOR_ID=E2= =80=99 undeclared (first use in this function); did you mean =E2=80=98VIDEO= _COMPONENT_DESCRIPTOR=E2=80=99? av_assert1(AV_RB16(buf) =3D=3D VIDEO_COMPONENT_DESCRIPTOR_ID); ^ libavformat/mmtp.c:33:5: note: in definition of macro =E2=80=98LIMIT_READ= =E2=80=99 block; \ ^~~~~ [...] > +#include > + > +#define LIMIT_READ(consume, block) \ > + if (size < (consume)) return AVERROR_INVALIDDATA; \ > + block; \ > + buf +=3D (consume); \ > + size -=3D (consume); This makes the code hard to debug and read > + > +#define MUST_CONSUME(consume) \ > + av_assert1((consume) <=3D size); \ > + buf +=3D (consume); \ > + size -=3D (consume); this could maybe use some bytestream reader either way a function should be cleaner than a macro thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange --qCuyVVLLFvr0p6ls Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZEwwIQAKCRBhHseHBAsP qw3cAJ9fpJj3uTMmBAbmpSVdh5YCzfvrewCdG5LcHeB2X7uGmxYm8SbePRcRZwA= =o7Si -----END PGP SIGNATURE----- --qCuyVVLLFvr0p6ls-- --===============2042406089315765658== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============2042406089315765658==--