[gst-devel] ffdec_mpeg4 header damaged

Riccardo Corona coronariccardo at gmail.com
Tue Jun 19 17:08:52 CEST 2007


mmm, your tips works well but there's something that I don't understand: the
gst_util_uint64_scale_int could be in this way :

ts = gst_util_uint64_scale_int (frame_num * GST_SECOND, FPS_NUM,  FPS_DEN);

and not:

ts = gst_util_uint64_scale_int (frame_num * GST_SECOND, FPS_DEN,  FPS_NUM);

But if I use the first form the gst-app doesn't works (the image are
freeze).
Someone can explain why?

2007/6/15, Riccardo Corona <coronariccardo at gmail.com>:
>
> YES!It works!Now the example about fakesrc in the manual could be change
> with a new one that not lead the cpu to 100% and that give a fps choice.
> Moreover it seems to works also with ffdec_mpeg for my problem but it's
> too early to scream like a child...
> Anyway, thank you!
>
>
> 2007/6/15, Tim Muller <t.i.m at zen.co.uk>:
> >
> > Riccardo Corona <coronariccardo at gmail.com> wrote :
> >
> > > How can I set the duration on the buffer?
> >
> > For testing purposes, try something like this for timestamps and
> > durations (and get rid of the GstClock/currenttime stuff):
> >
> > /* framerate (assumed to be fixed) */
> > #define FPS_NUM 25
> > #define FPS_DEN 1
> >
> > static guint frame_num = 0;
> >
> > GstClockTime ts, next_ts;
> >
> > ts = gst_util_uint64_scale_int (frame_num * GST_SECOND, FPS_DEN,
> > FPS_NUM);
> > next_ts = gst_util_uint64_scale_int ((frame_num + 1) * GST_SECOND,
> > FPS_DEN, FPS_NUM);
> >
> > GST_BUFFER_TIMESTAMP (buf) = ts;
> > GST_BUFFER_DURATION (buf) = next_ts - ts;
> >
> > ++frame_num;
> >
> > This assumes a fixed framerate.
> >
> > Cheers
> >   -Tim
> >
> >
> >
> >
> >
> >
>
>
> --
> Riccardo Corona




-- 
Riccardo Corona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070619/cf5ab5e8/attachment.htm>


More information about the gstreamer-devel mailing list