[FFmpeg-devel] [PATCH] av_get_delay
Michael Niedermayer
michaelni at gmx.at
Wed Jun 29 16:09:17 CEST 2011
On Wed, Jun 29, 2011 at 03:21:05PM +0200, Nicolas George wrote:
> Le primidi 11 messidor, an CCXIX, Nicolas George a écrit :
> > You mean packets that have been submitted to av_interleaved_write_frame but
> > that lavf has not yet submitted to oformat->write_packet?
> >
> > I see the concern, and I will think about it to try and come with a
> > satisfactory solution.
>
> I have a possible solution, but I am somewhat out of my depth, so there may
> be drawbacks I did not think of.
>
> The idea is to have av_interleave_packet keep track, for each stream, of the
> DTS of the last packets queued and dequeued.
>
> This allow a function av_get_interleave_delay to get the corresponding
> delay.
>
> The av_get_delay I proposed should therefore probably renamed
> av_get_output_delay or something.
>
> Regards,
>
> --
> Nicolas George
> avformat.h | 18 ++++++++++++++++++
> utils.c | 16 ++++++++++++++--
> 2 files changed, 32 insertions(+), 2 deletions(-)
> f61fee398eb48bdfd30663e0b9e45e4fb19411ad 0001-libavformat-keep-track-of-DTS-while-interleaving.patch
> From d471f105b78248df810465383c34d0016240f51e Mon Sep 17 00:00:00 2001
> From: Nicolas George <nicolas.george at normalesup.org>
> Date: Wed, 29 Jun 2011 14:57:09 +0200
> Subject: [PATCH] libavformat: keep track of DTS while interleaving.
>
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavformat/avformat.h | 18 ++++++++++++++++++
> libavformat/utils.c | 16 ++++++++++++++--
> 2 files changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index e97e75a..7467625 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -636,6 +636,17 @@ typedef struct AVStream {
> * NOT PART OF PUBLIC API
> */
> int request_probe;
> +
> + /**
> + * DTS of the last packet that was submitted to the muxer for this stream
> + */
> + int64_t last_dts_in;
> +
> + /**
> + * DTS of the last packet that was output by the muxer for this stream
> + */
> + int64_t last_dts_out;
i think these are unneeded
last_in_packet_buffer provides the last added and thus its timestamps
and the muxer has to know itself whats the last on the presenttation
side IMHO
#[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110629/71b25605/attachment.asc>
More information about the ffmpeg-devel
mailing list