[gst-devel] Problem with GnlFileSource media_start property

Edward Hervey bilboed at gmail.com
Fri Jun 26 07:40:09 CEST 2009


Hi,

On Thu, 2009-06-25 at 23:50 +0200, Raaf wrote:
> I'm having trouble with the GnlFileSource media_start property, with
> audio it all seems to work fine but with video I don't get it to work.
> For example the code below works fine as long as the media_start
> property is 0, any other value and I get erratic 'slide show' like
> playback.  Is there anything I'm missing here?

  The code below looks correct. What kind of files are you using
(container/codec) ? What version of gnonlin and gstreamer ? Do you see
any warnings if you run it with GST_DEBUG=2 ?

    Edward

> 
> ---------------------------------
> import sys, gobject
> gobject.threads_init()
> import gst
> 
> def on_pad_added(composition, pad):
>     pad.link(colorspace.get_pad('sink'))
> 
> pipe = gst.Pipeline()
> composition = gst.element_factory_make('gnlcomposition')
> colorspace = gst.element_factory_make('ffmpegcolorspace')
> timeoverlay = gst.element_factory_make('timeoverlay')
> xvimagesink = gst.element_factory_make('xvimagesink')
> 
> pipe.add(composition, colorspace, timeoverlay, xvimagesink)
> gst.element_link_many(colorspace, timeoverlay, xvimagesink)
> 
> gnlfilesrc = gst.element_factory_make('gnlfilesource')
> gnlfilesrc.props.caps = gst.caps_from_string('video/x-raw-rgb; video/x-raw-yuv')
> gnlfilesrc.props.location = sys.argv[1]
> gnlfilesrc.props.start = 0 * gst.SECOND
> gnlfilesrc.props.duration = 60 * gst.SECOND
> gnlfilesrc.props.media_start = 0 * gst.SECOND
> gnlfilesrc.props.media_duration = 60 * gst.SECOND
> 
> composition.add(gnlfilesrc)
> composition.connect('pad-added', on_pad_added)
> 
> pipe.set_state(gst.STATE_PLAYING)
> gobject.MainLoop().run()
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list