Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v1 5/8] avformat/mov_muxer: Extended MOV muxer to handle APV video content
Date: Wed, 23 Apr 2025 11:43:59 -0300
Message-ID: <d14e0e2e-86bb-4b02-aedc-c352d77a76ab@gmail.com> (raw)
In-Reply-To: <20250423141303.1858090-1-d.kozinski@samsung.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1801 bytes --]

On 4/23/2025 11:13 AM, Dawid Kozinski wrote:
> @@ -2757,6 +2789,8 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
>       }
>       else if (track->par->codec_id ==AV_CODEC_ID_EVC) {
>           mov_write_evcc_tag(pb, track);
> +    } else if (track->par->codec_id ==AV_CODEC_ID_APV) {
> +        mov_write_apvc_tag(pb, track);
>       } else if (track->par->codec_id == AV_CODEC_ID_VP9) {
>           mov_write_vpcc_tag(mov->fc, pb, track);
>       } else if (track->par->codec_id == AV_CODEC_ID_AV1) {
> @@ -6713,6 +6747,18 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
>           memset(trk->vos_data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
>       }
>   
> +    if (par->codec_id == AV_CODEC_ID_APV && !trk->vos_len) {
> +            ret = ff_isom_create_apv_dconf_record(&trk->vos_data, &trk->vos_len);
> +            if (!trk->vos_data) {
> +                ret = AVERROR(ENOMEM);
> +                goto err;
> +            }
> +    }
> +
> +    if (par->codec_id == AV_CODEC_ID_APV && trk->vos_len) {
> +        ret = ff_isom_fill_apv_dconf_record(trk->vos_data, pkt->data, size);
> +    }
> +
>       if (par->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
>           (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
>           if (!trk->st->nb_frames) {

Instead of this, add APV to the list in 
https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/movenc.c;h=4bc8bd1b2ab765c2b9f5f5dfc2dcb77361f2b944;hb=HEAD#l6697 
so the first packet is always copied to trk->vos_data in case 
par->extradata is not set.

After that, ff_isom_write_apvc() can either write the extradata as is if 
it's already a configuration record, or generate it if it's just a 
packet of PBUs (See ff_isom_write_hvcc()).


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 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:[~2025-04-23 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250423141306eucas1p229fa078339a2a993c609464e101c9c6d@eucas1p2.samsung.com>
2025-04-23 14:13 ` Dawid Kozinski
2025-04-23 14:43   ` James Almer [this message]
2025-04-24  8:59     ` Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics
2025-04-23 21:08   ` Mark Thompson
2025-04-24 12:08     ` Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics
2025-04-24 19:02       ` Mark Thompson
2025-04-25  6:54         ` Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics

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=d14e0e2e-86bb-4b02-aedc-c352d77a76ab@gmail.com \
    --to=jamrial@gmail.com \
    --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