backward seeking

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

backward seeking

Ash-25
Anybody know why backward seeking causes playback to hang?
 
gst_element_seek(m_bin, -2.0 , GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT,
                                   GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, curpos*GST_MSECOND);
 
Am I calling this wrong?


Keep your kids safer online with Windows Live Family Safety. Help protect your kids.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Jan Schmidt-6
On Thu, 2008-07-24 at 20:52 +0000, Ash wrote:

> Anybody know why backward seeking causes playback to hang?
>  
> gst_element_seek(m_bin, -2.0 , GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH |
> GST_SEEK_FLAG_KEY_UNIT,
>                                    GST_SEEK_TYPE_SET, 0,
> GST_SEEK_TYPE_SET, curpos*GST_MSECOND);
>  
> Am I calling this wrong?
>
>
> ______________________________________________________________________
Whether reverse playback works depends on the container & codecs - it's
not implemented everywhere yet. You should check the return value from
gst_element_seek - was the seek refused?

J.
--
Jan Schmidt <[hidden email]>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Ash-25

The seek returns true but just hangs. Are there any other messages I can see as to what is really happening in the pipeline?

> From: [hidden email]
> To: [hidden email]
> Date: Fri, 25 Jul 2008 00:08:46 +0100
> Subject: Re: [gst-devel] backward seeking
>
> On Thu, 2008-07-24 at 20:52 +0000, Ash wrote:
> > Anybody know why backward seeking causes playback to hang?
> >
> > gst_element_seek(m_bin, -2.0 , GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH |
> > GST_SEEK_FLAG_KEY_UNIT,
> > GST_SEEK_TYPE_SET, 0,
> > GST_SEEK_TYPE_SET, curpos*GST_MSECOND);
> >
> > Am I calling this wrong?
> >
> >
> > ______________________________________________________________________
> Whether reverse playback works depends on the container & codecs - it's
> not implemented everywhere yet. You should check the return value from
> gst_element_seek - was the seek refused?
>
> J.
> --
> Jan Schmidt <[hidden email]>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


Time for vacation? WIN what you need. Enter Now!
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Andoni Morales
Hi!
If you set the start time at 0, a backward seeking will try to seek to negatives values. It will place your stream at 0 mseconds and then it will try to go backward witch is imposible as it's the end of the stream. Try changing your start time to curpos*GST_MSECOND. It will seek to a new position with positive values and your stream will be played backward to the 0 position.

2008/7/25 Ash <[hidden email]>:

The seek returns true but just hangs. Are there any other messages I can see as to what is really happening in the pipeline?
> From: [hidden email]
> To: [hidden email]
> Date: Fri, 25 Jul 2008 00:08:46 +0100
> Subject: Re: [gst-devel] backward seeking

>
> On Thu, 2008-07-24 at 20:52 +0000, Ash wrote:
> > Anybody know why backward seeking causes playback to hang?
> >
> > gst_element_seek(m_bin, -2.0 , GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH |
> > GST_SEEK_FLAG_KEY_UNIT,
> > GST_SEEK_TYPE_SET, 0,
> > GST_SEEK_TYPE_SET, curpos*GST_MSECOND);
> >
> > Am I calling this wrong?
> >
> >
> > ______________________________________________________________________
> Whether reverse playback works depends on the container & codecs - it's
> not implemented everywhere yet. You should check the return value from
> gst_element_seek - was the seek refused?
>
> J.
> --
> Jan Schmidt <[hidden email]>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


Time for vacation? WIN what you need. Enter Now!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Ash-25
Hello,
I actually noticed that and changed my call to:
 
ret = gst_element_seek (m_bin, -1.0 * speed/1000, GST_FORMAT_TIME, m_seekflags,
                                    GST_SEEK_TYPE_SET, curpos*GST_MSECOND, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);

 
But this still hangs, whether the rate is -1.0 or -2.0. Is there anything wrong with this?




Date: Fri, 25 Jul 2008 18:11:23 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [gst-devel] backward seeking


Hi!
If you set the start time at 0, a backward seeking will try to seek to negatives values. It will place your stream at 0 mseconds and then it will try to go backward witch is imposible as it's the end of the stream. Try changing your start time to curpos*GST_MSECOND. It will seek to a new position with positive values and your stream will be played backward to the 0 position.

2008/7/25 Ash <[hidden email]>:

The seek returns true but just hangs. Are there any other messages I can see as to what is really happening in the pipeline?

> From: [hidden email]
> To: [hidden email]
> Date: Fri, 25 Jul 2008 00:08:46 +0100
> Subject: Re: [gst-devel] backward seeking

>
> On Thu, 2008-07-24 at 20:52 +0000, Ash wrote:
> > Anybody know why backward seeking causes playback to hang?
> >
> > gst_element_seek(m_bin, -2.0 , GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH |
> > GST_SEEK_FLAG_KEY_UNIT,
> > GST_SEEK_TYPE_SET, 0,
> > GST_SEEK_TYPE_SET, curpos*GST_MSECOND);
> >
> > Am I calling this wrong?
> >
> >
> > ______________________________________________________________________
> Whether reverse playback works depends on the container & codecs - it's
> not implemented everywhere yet. You should check the return value from
> gst_element_seek - was the seek refused?
>
> J.
> --
> Jan Schmidt <[hidden email]>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


Time for vacation? WIN what you need. Enter Now!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




Stay in touch when you're away with Windows Live Messenger. IM anytime you're online.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Ash-25
In reply to this post by Andoni Morales
Has any developer out there gotten backward seek (negative rate) to work with GST_FORMAT_TIME?


Date: Fri, 25 Jul 2008 18:11:23 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [gst-devel] backward seeking

Hi!
If you set the start time at 0, a backward seeking will try to seek to negatives values. It will place your stream at 0 mseconds and then it will try to go backward witch is imposible as it's the end of the stream. Try changing your start time to curpos*GST_MSECOND. It will seek to a new position with positive values and your stream will be played backward to the 0 position.

2008/7/25 Ash <[hidden email]>:

The seek returns true but just hangs. Are there any other messages I can see as to what is really happening in the pipeline?

> From: [hidden email]
> To: [hidden email]
> Date: Fri, 25 Jul 2008 00:08:46 +0100
> Subject: Re: [gst-devel] backward seeking

>
> On Thu, 2008-07-24 at 20:52 +0000, Ash wrote:
> > Anybody know why backward seeking causes playback to hang?
> >
> > gst_element_seek(m_bin, -2.0 , GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH |
> > GST_SEEK_FLAG_KEY_UNIT,
> > GST_SEEK_TYPE_SET, 0,
> > GST_SEEK_TYPE_SET, curpos*GST_MSECOND);
> >
> > Am I calling this wrong?
> >
> >
> > ______________________________________________________________________
> Whether reverse playback works depends on the container & codecs - it's
> not implemented everywhere yet. You should check the return value from
> gst_element_seek - was the seek refused?
>
> J.
> --
> Jan Schmidt <[hidden email]>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


Time for vacation? WIN what you need. Enter Now!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




Keep your kids safer online with Windows Live Family Safety. Help protect your kids.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Tim-Philipp Müller-2
On Fri, 2008-07-25 at 20:08 +0000, Ash wrote:
> Has any developer out there gotten backward seek (negative rate) to
> work with GST_FORMAT_TIME?

What demuxer and which decoders are you trying this with?

Cheers
 -Tim



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Ash-25
I am using automatic playbin and tried it on avi files , mpeg files, wmv files and all exhibit the same behavior. Is there a particular demux/decoder that you know works for sure?

> From: [hidden email]
> To: [hidden email]
> Date: Fri, 25 Jul 2008 21:27:26 +0100
> Subject: Re: [gst-devel] backward seeking
>
> On Fri, 2008-07-25 at 20:08 +0000, Ash wrote:
> > Has any developer out there gotten backward seek (negative rate) to
> > work with GST_FORMAT_TIME?
>
> What demuxer and which decoders are you trying this with?
>
> Cheers
> -Tim
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


Time for vacation? WIN what you need. Enter Now!
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Rov Juvano
In reply to this post by Ash-25
On Fri, Jul 25, 2008 at 08:08:49PM +0000, Ash wrote:
> Has any developer out there gotten backward seek (negative rate) to work with GST_FORMAT_TIME?

Yep.

  gint64 start_pos, stop_pos;
  if (rate > 0) {
    start_pos = new_pos;
    stop_pos = -1; // or whatever > new_pos
  } else {
    start_pos = 0; // or whatever < new_pos
    stop_pos = new_pos;
  }
  if (!gst_element_seek (pipeline, rate,
        GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
        GST_SEEK_TYPE_SET, start_pos,
        GST_SEEK_TYPE_SET, stop_pos)) {
    g_message ("Seek failed");
  }

I've only had luck with ogg-vorbis and ogg-theora.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: backward seeking

Ash-25
Thank you Rov. I have similar results in that ogg files work with backward seek, but no luck with mpeg1/mpeg2/wmv/mp3. Any idea what the problem is? Is it just not developed yet?

> From: [hidden email]
> To: [hidden email]
> Date: Sat, 26 Jul 2008 10:55:24 -0400
> Subject: Re: [gst-devel] backward seeking
>
> On Fri, Jul 25, 2008 at 08:08:49PM +0000, Ash wrote:
> > Has any developer out there gotten backward seek (negative rate) to work with GST_FORMAT_TIME?
>
> Yep.
>
> gint64 start_pos, stop_pos;
> if (rate > 0) {
> start_pos = new_pos;
> stop_pos = -1; // or whatever > new_pos
> } else {
> start_pos = 0; // or whatever < new_pos
> stop_pos = new_pos;
> }
> if (!gst_element_seek (pipeline, rate,
> GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
> GST_SEEK_TYPE_SET, start_pos,
> GST_SEEK_TYPE_SET, stop_pos)) {
> g_message ("Seek failed");
> }
>
> I've only had luck with ogg-vorbis and ogg-theora.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


Use video conversation to talk face-to-face with Windows Live Messenger. Get started.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel