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 95E1843A43 for ; Wed, 5 Oct 2022 14:25:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5ADF968BCE6; Wed, 5 Oct 2022 17:25:20 +0300 (EEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0C75E68BCE6 for ; Wed, 5 Oct 2022 17:25:13 +0300 (EEST) Received: by mail-pg1-f169.google.com with SMTP id e129so15368984pgc.9 for ; Wed, 05 Oct 2022 07:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=4G1/kWvzQzPg9zWFRtTfhdCUEmkndjIs/1JVNO1g/rY=; b=nEqoUsSKh2EW4xCCBe9lk9EKO6FUQCOFW9p6dYRhflhRg3w5eOnSonsMfUP2Ay9kdX SIvXrwCvog4CaIz/AYSp2rPZUBryl7erscuYSQetKmwGFY7EIKk9xB10Dnfsk/Qz2MXI 7drRdRD8gy7JsSJrRcSqB18wIeFrhKyoWNMyKNeJ7QGf+snKVLDn3r/dY5hakYKTnuBZ eqBNMBB1fju6Vn0rNi3OFDBw+k0XoCsy2ypUSARxihr8OhNxwlf/Z68BVyBPRB30rxUE vapAsbeQvLnH1M9xmfa72rfTy084nF4P+UnaK6/2f90FAsN5h05swFg8YNlipwG6Gsnf NqFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4G1/kWvzQzPg9zWFRtTfhdCUEmkndjIs/1JVNO1g/rY=; b=vylPrkNnQPxUXq4DkuWO0+rAzIWFsSwFxlY8F+T8o59vIipvjbwaQhEs8EP/FzyYfW G7Yn/Et/yay2IS0RLqUITqZn7FHpa6fgipzBmdgtTK+P29dgPEALfGjW/C2M284PnHHd eKm92Ov7gdUfnOO458IfYfPlYkssK9TK0RVR8BJObUJ6sx8AN9o4ryLH4wGuZJmY6CtG +QOAHQKIPjWx5kaN6OMUPXFT5VPmW+HeGcU1JasZc+u4VWJIiqBEluLPmGEYeIyYdLqQ 5c0EVcs4jy6QOXI3RDeC1l5qfuPsi3q+A2ntmV07mbxMIC34RQzSgTvMqFsHA0GJYDkv jXAQ== X-Gm-Message-State: ACrzQf2HYtpEmsgSGqZYtxLfaBV9JTvS2s44NPxZaYqN2FZSd+fRP4E9 ZOW6wQvdqPtkcVvQXGTWE8bxGmOWjbE= X-Google-Smtp-Source: AMsMyM5aUFen+IxDF4g2CvMhlJgY4Dpqrey0Tx/xYqLzN+3OzT2KsnEpQ3rE0gXQ6hF5ZfLMrJz0Pg== X-Received: by 2002:a05:6a00:846:b0:562:27a:278 with SMTP id q6-20020a056a00084600b00562027a0278mr79559pfk.47.1664979911299; Wed, 05 Oct 2022 07:25:11 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id c17-20020a056a00009100b00561d84772adsm2787531pfj.162.2022.10.05.07.25.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2022 07:25:10 -0700 (PDT) From: Bryce Chester Newman X-Google-Original-From: Bryce Chester Newman Message-Id: In-Reply-To: References: Date: Wed, 05 Oct 2022 14:25:08 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time. 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 Cc: Bryce Chester Newman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Bryce Chester Newman Change demuxer option name from poster_time_location to export_poster_time_location. Export the poster_time_location if available. The poster_time_location is calculated using the poster_time / time_scale = X seconds. The value of poster_time_location indicates where in the video the poster frame is. Addresses feedback from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html. Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com --- doc/demuxers.texi | 4 ++-- libavformat/isom.h | 2 +- libavformat/mov.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index b1f4926c40..447287357d 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -750,10 +750,10 @@ cast to int32 are used to adjust onward dts. Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range. -@item poster_time_location +@item export_poster_time_location Export the poster_time_location if available. The poster_time_location is calculated using the poster_time / time_scale = X seconds. -The value of poster_time_location indicates where in the video the poster frame is. +The value of the poster_time_location key indicates where in the video the poster frame is. Default is false. @end table diff --git a/libavformat/isom.h b/libavformat/isom.h index fb3d8d5618..f621abec76 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -326,7 +326,7 @@ typedef struct MOVContext { int64_t extent_offset; } *avif_info; int avif_info_size; - int poster_time_location; + int export_poster_time_location; } MOVContext; int ff_mp4_read_descr_len(AVIOContext *pb); diff --git a/libavformat/mov.c b/libavformat/mov.c index b914bbc96a..be939f6cc2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1542,7 +1542,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb); /* current time */ avio_rb32(pb); /* next track ID */ - if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) { + if(c->export_poster_time_location && poster_time && c->time_scale && c->time_scale > 0) { av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale); char buffer[32]; int poster_time_location = poster_time / c->time_scale; @@ -9123,7 +9123,7 @@ static const AVOption mov_options[] = { { "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS }, { "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM }, - { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT }, + { "export_poster_time_location", "Export the poster time location.", OFFSET(export_poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT }, { NULL }, }; -- ffmpeg-codebot _______________________________________________ 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".