[FFmpeg-cvslog] lavf: add field for how duration is estimated
Clément Bœsch
ubitux at gmail.com
Mon Jun 18 10:13:57 CEST 2012
On Mon, Jun 18, 2012 at 09:58:38AM +0200, Michael Bradshaw wrote:
> ffmpeg | branch: master | Michael Bradshaw <mbradshaw at sorensonmedia.com> | Sun Jun 17 22:20:09 2012 -0700| [2243f0d0783922054d10497fc1d6f6fb376f05ff] | committer: Nicolas George
>
> lavf: add field for how duration is estimated
>
> Signed-off-by: Michael Bradshaw <mbradshaw at sorensonmedia.com>
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2243f0d0783922054d10497fc1d6f6fb376f05ff
> ---
>
> libavformat/avformat.h | 17 +++++++++++++++++
> libavformat/options.c | 5 +++++
> libavformat/utils.c | 3 +++
> libavformat/version.h | 4 ++--
> 4 files changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 19441f8..8650b08 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -1099,8 +1099,25 @@ typedef struct AVFormatContext {
> int raw_packet_buffer_remaining_size;
>
> int avio_flags;
> +
> + /**
> + * The duration field can be estimated through various ways, and this field can be used
> + * to know how the duration was estimated.
> + */
> + enum {
> + AVFMT_DURATION_FROM_PTS, ///< duration accurately estimated from PTSes
> + AVFMT_DURATION_FROM_STREAM, ///< duration estimated from a stream with a known duration
> + AVFMT_DURATION_FROM_BITRATE ///< duration estimated from bitrate (less accurate)
> + } duration_estimation_method;
[...]
What happens in case the duration is read from the demuxer (for instance
the MOV has entries for a movie duration, and durations per streams)?
Wouldn't the duration_estimation_method set to 0 (and thus assumed to be
from PTS?).
BTW, could we report this somewhere (in ffprobe or w/e)?
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20120618/79074b7c/attachment.asc>
More information about the ffmpeg-cvslog
mailing list