Segment event generation at source plugin (Push mode)

Tim Müller tim at centricular.com
Sat Sep 13 04:39:46 PDT 2014


On Wed, 2014-09-10 at 06:50 -0700, AshishS wrote:

Hi,

> Thanks for the advice.
> 
> Below are details.
> 
> I am writing a source plugin derived from GstBaseSrc
> 
> GObject
>  +----GstObject
>        +----GstElement
>              +----GstBaseSrc
>                    +----GstMySrc
> 
> I wan't plugin to play media from http stream (Play/Pause/Stop is working
> fine, Seeks are not allowed), Plugin will be initiated in push mode with
> GST_FORMAT_BYTES as supported format and check_get_range() is set to false.
> Now while normal play i want to Fast forward with different speeds.
> 
> 
> I tried pushing the new segment event but it failed at audiosink with format
> not supported message. Below sample code, i was pushing this event while
> pipeline in playing state and from my source plugin's create() call. 
> 
> 
>         GstEvent * newSegEvent = gst_event_new_new_segment(FALSE, 2.0 ,
> GST_FORMAT_BYTES, 0, -1 , currentBytePosInStream);
> 
>           result = gst_pad_push_event (pad, newSegEvent);
> 
> 
> 
> Then i tried gst_base_src_new_seamless_segment() which works fine first
> time, but not consistent when i re change the play speed.
> 
> So, please let me know how to go about it, please do let me know if you need
> more details.

What kind of data do you receive over http? always the same? different
file formats?

What does the rest of your pipeline look like?

Cheers
 -Tim

PS: you should really not use 0.10.x any more, it's unmaintained.
Ideally you should use GStreamer 1.x instead.

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list