[FFmpeg-devel] [RFC] mpegts loss stats at demuxing

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 9 18:30:17 CET 2012


On Fri, Nov 09, 2012 at 11:43:02AM +0000, Kieran Kunhya wrote:
> On Fri, Nov 9, 2012 at 10:06 AM, Andrey Utkin
> <andrey.krieger.utkin at gmail.com> wrote:
> > Hi. I am interested in implementing mpegts demuxer loss stats (count
> > of dropped TS packets, count of TEI-indicated packets, count of good
> > TS packets) in a way exposable to application at real time.
> > I know how to collect stats, but don't see how to expose this info to
> > app and even make my code merged to upstream. So i request for
> > advices, how to do it.
> 
> You could maybe output it per packet as side-data but you're not going
> to ever get
> proper granularity.

Side data is to pass data to the decoder. The decoder has no use
of this, so IMHO that is the wrong approach.
It would be closer to metadata, but since those statistics are not
per-stream I'd say they probably should go into the AVFormat context.
But if you want more fine-grained statistics, I guess you could also
make the demuxer export a data-stream with them, that would allow
you to give them time-stamps and finer granularity than per-packet
if you want.


More information about the ffmpeg-devel mailing list