Changing Segment without seek

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing Segment without seek

Patrick Fü

I'm trying to change the segment while in playing state with gst_event_new_seek.

When the current time lies within the new segment it currently does a seek to the beginning of the new segment.
What's the best to set a segment without doing a seek ? Is it even possible with gst_event_new_seek ? 

Thanks. 
Patrick



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Changing Segment without seek

Tim Müller
On Wed, 2016-10-26 at 13:27 +0200, Patrick Fü wrote:

Hi Patrick,

> I'm trying to change the segment while in playing state
> with gst_event_new_seek.
>
> When the current time lies within the new segment it currently does a
> seek to the beginning of the new segment.
> What's the best to set a segment without doing a seek ? Is it even
> possible with gst_event_new_seek ? 

Let's take back a step. Cold you explain in some more detail what you
are trying to implement or achieve exactly? Then we can give advice how
to best do that.

For things like gapless/seamless playback or looping you can use the
GST_SEEK_FLAG_SEGMENT, then your app will get a SEGMENT_DONE message on
the bus as soon as the source/parser/demuxer is done processing data,
and then you can do another (non-flushing) seek to output more data. If
that's what you want I don't know though :)

Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Changing Segment without seek

Patrick Fü


Hey Tim, 

thanks for the fast response. 
Seamless looping is working fine and I do it as you described, even for parts of a video.  

But what I want to achieve is changing the looping segment dynamically while playing. And when the current position is within a new segment it shouldn't seek to the beginning of the segment to get seamless playback. 

Another things would be to reset a smaller segment to the full video length without doing a seek, to get seamless playback. 

Hope this explains my question. 
Cheers, 
Patrick



2016-10-26 15:20 GMT+02:00 Tim Müller <[hidden email]>:
On Wed, 2016-10-26 at 13:27 +0200, Patrick Fü wrote:

Hi Patrick,

> I'm trying to change the segment while in playing state
> with gst_event_new_seek.
>
> When the current time lies within the new segment it currently does a
> seek to the beginning of the new segment.
> What's the best to set a segment without doing a seek ? Is it even
> possible with gst_event_new_seek ? 

Let's take back a step. Cold you explain in some more detail what you
are trying to implement or achieve exactly? Then we can give advice how
to best do that.

For things like gapless/seamless playback or looping you can use the
GST_SEEK_FLAG_SEGMENT, then your app will get a SEGMENT_DONE message on
the bus as soon as the source/parser/demuxer is done processing data,
and then you can do another (non-flushing) seek to output more data. If
that's what you want I don't know though :)

Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--



Patrick Fürst
PROJEKTIL MEDIALABEL AG  
EYEHEARCANDY

Helvetiaplatz, 
8004 Zürich
Mobile <a href="tel:+41+76+406+1988" value="+41786765500" style="color:rgb(17,85,204)" target="_blank">+41 76 406 1988

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Changing Segment without seek

Tim Müller
On Wed, 2016-10-26 at 15:42 +0200, Patrick Fü wrote:

Hi Patrick,

> But what I want to achieve is changing the looping segment
> dynamically while playing. And when the current position is within a
> new segment it shouldn't seek to the beginning of the segment to get
> seamless playback. 

I believe you should be able to create a seek event with
start/start_type as NONE, and then just the stop position should be
updated. If that actually works properly everywhere I don't know.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel