[gst-devel] seeking VBR

Joshua N Pritikin vishnu at pobox.com
Fri Nov 22 10:58:06 CET 2002


On Wed, Nov 20, 2002 at 08:51:15PM +0530, Joshua N Pritikin wrote:
> > a) connect filesrc->mpeg2parse/dec (don't connect any srcpads)
> > b) hand an empty timecache object to mpeg2parse/dec
> > c) run the pipeline to EOS
> > d) read/use/save the timecache
> 
> Yah, i will try to implement that ASAP.

Here's my first attempt.  There are some problems.

* At least on my system, gnomevfssrc leaks memory (fast) while
filesrc doesn't.  Maybe i'm a few versions behind.  Can someone
compare the memory profile of these two?

  gst-launch gnomevfssrc location=/some-film.mpg ! mpegdemux
  gst-launch filesrc location=/some-film.mpg ! mpegdemux

This probably explains the libgstplay leak i was seeing.  i'll
confirm later.

* Should i be using mpegdemux or mpegparse?

* How do i get the correct clock?  What gst_bin_get_clock returns
is a clock for the elapse time of the indexer.  In other words,
if i scan the whole film in 54 seconds then the clock finished
at 54 seconds.  Useless.  What i need is the film's idea of
the elapse time.  The clock should finish at 1 hour (or the
duration of the film) even if i can scan the whole film in 1 minute.

i see some suspicious code in mpegparse:

static GstClock*
gst_mpeg_parse_get_clock (GstElement *element)
{   
  //GstMPEGParse *parse = GST_MPEG_PARSE (element);

  //return parse->provided_clock;
  return NULL;
}

And it seems like the only way to call gst_mpeg_parse_get_time
is via the provided_clock.  Is the SCR what i want?  What about
correcting for discontinuities?

How about just counting the video frames and making the frame-rate
and frame count available as a property or query?

-- 
Victory to the Divine Mother!!         after all,
  http://sahajayoga.org                  http://why-compete.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkindex.c
Type: text/x-csrc
Size: 2473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20021122/1aca05a8/attachment.c>


More information about the gstreamer-devel mailing list