Anybody know how to fast forward play such as by X2, X4 ,X8,X16 ? I tried the avidemux/qtdemux/flvdemux/matroskademux demuxer , and used the decoder of mine. And must i do somthing in my decoder plugin ? Following is the code snippet of app which I have: -------------------------------------------------------------------------------------- ret = (int)gst_element_query_position(pipeline,&format,&pos_cur); pos_seek = pos_cur + ( time_seek * GST_SECOND ); gst_element_seek (pipeline,   ; 4.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP, GST_SEEK_TYPE_SET, pos_seek, &nbs p; GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); ------------------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
From: zwresh <[hidden email]> To: [hidden email] Sent: Fri, February 11, 2011 5:32:40 AM Subject: Fast forward play | seek rate | trick play Anybody know how to fast forward play such as by X2, X4 ,X8,X16 ? I tried the avidemux/qtdemux/flvdemux/matroskademux demuxer , and used the decoder of mine. And must i do somthing in my decoder plugin ? Following is the code snippet of app which I have: -------------------------------------------------------------------------------------- ret = (int)gst_element_query_position(pipeline,&format,&pos_cur); pos_seek = pos_cur + ( time_seek * GST_SECOND ); gst_element_seek (pipeline, ; 4.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP, GST_SEEK_TYPE_SET, pos_seek, &nbs p; GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); ------------------------------------------------------------------------------------------ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by zwresh
2011/2/11 zwresh <[hidden email]>:
> > Anybody know how to fast forward play such as by X2, X4 ,X8,X16 ? > > I tried the avidemux/qtdemux/flvdemux/matroskademux demuxer , > and used the decoder of mine. > And must i do somthing in my decoder plugin ? > > Following is the code snippet of app which I have: > -------------------------------------------------------------------------------------- > ret = > (int)gst_element_query_position(pipeline,&format,&pos_cur); > pos_seek = pos_cur + ( time_seek * GST_SECOND ); > > gst_element_seek (pipeline, >   ; 4.0, > GST_FORMAT_TIME, > GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT > | GST_SEEK_FLAG_SKIP, > GST_SEEK_TYPE_SET, > pos_seek, > &nbs p; GST_SEEK_TYPE_NONE, > GST_CLOCK_TIME_NONE); > ------------------------------------------------------------------------------------------ So is it not accepting the change in the playback rate? or is it not seeking? Have you tried using gst_element_seek_simple () ? Luis _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by zwresh
On Fri, 2011-02-11 at 11:32 +0800, zwresh wrote:
> > gst_element_seek (pipeline, > 4.0, > GST_FORMAT_TIME, > GST_SEEK_FLAG_FLUSH | > GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP, > GST_SEEK_TYPE_SET, > pos_seek, > GST_SEEK_TYPE_NONE, > GST_CLOCK_TIME_NONE); For what it's worth, I think the SKIP flag is not widely implemented yet. Cheers -Tim _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Luis de Bethencourt
2011/2/14 zwresh <[hidden email]>:
> I used the qtdemux & matroskademux plugin for mp4 & mkv format > container, > but i used my decoder plugin for h264 and mpeg4asp codec. > maybe my decoder plugin is not correct for trick play (X2,X4,X8,X16)? > > > > whether dropping the SKIP flag or not, the result is the same . > it does't change rate but only change the seek position. > > > I tried gst_element_seek_simple function, it could seek but how to change > rate by param ? > > > So does the change of rate work with qtdemux/mkvdemux? It should. You are right, I thought the simple_seek also had the rate flag but it doesn't. So you need to use gst_element_seek () My bad. Luis > > > > > At 2011-02-14 02:30:25,"Luis de Bethencourt" <[hidden email]> wrote: > >>zwresh, >> >>What is the content format/codec? >>Try the simple seek I mentioned and dropping the SKIP flag as Tim >>suggested and let us know how it goes. >> >>Luis >> >>2011/2/12 zwresh <[hidden email]>: >>> It can seek the right position and playback, but can not change the >>> playback rate. >>> >>> >>> >>> At 2011-02-11 21:03:11,"Luis de Bethencourt" <[hidden email]> wrote: >>> >>>>2011/2/11 zwresh <[hidden email]>: >>>>> >>>>> Anybody know how to fast forward play such as by X2, X4 ,X8,X16 ? >>>>> >>>>> I tried the avidemux/qtdemux/flvdemux/matroskademux demuxer , >>>>> and used the decoder of mine. >>>>> And must i do somthing in my decoder plugin ? >>>>> >>>>> Following is the code snippet of app which I have: >>>>> -------------------------------------------------------------------------------------- >>>>> ret = >>>>> (int)gst_element_query_position(pipeline,&format,&pos_cur); >>>>> pos_seek = pos_cur + ( time_seek * GST_SECOND ); >>>>> >>>>> gst_element_seek (pipeline, >>>>>   ; 4.0, >>>>> GST_FORMAT_TIME, >>>>> GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT >>>>> | GST_SEEK_FLAG_SKIP, >>>>> GST_SEEK_TYPE_SET, >>>>> pos_seek, >>>>> &nbs p; GST_SEEK_TYPE_NONE, >>>>> GST_CLOCK_TIME_NONE); >>>>> ------------------------------------------------------------------------------------------ >>>> >>>> >>>>So is it not accepting the change in the playback rate? or is it not seeking? >>>>Have you tried using gst_element_seek_simple () ? >>>> >>>>Luis >>> >>> >>> > > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Does not all the demuxers (avidemux/qtdemux/flvdemux/matroskademux) support GST_SEEK_FLAG_SKIP flag?
or must do anything in the decoder plugin ? I notice that in the mpeg2dec plugin of gst-plugins-ugly, it register the set_index and get_index callback such as : ___________________________________________________ static void gst_mpeg2dec_class_init (GstMpeg2decClass * klass) { ...... gstelement_class->set_index = gst_mpeg2dec_set_index; gstelement_class->get_index = gst_mpeg2dec_get_index; } __________________________________________________ set_index and get_index will support fast playback rate of fast forward ? I register the get_index and set _index in my decoder plugin, and do index_seek function in the case GST_EVENT_SEEK of XXX_src_event callback , such as ____________________________________ static gboolean gst_myviddec_src_event(GstPad *pad, GstEvent *event) { // ...... switch(GST_EVENT_TYPE(event)) { case GST_EVENT_SEEK: { gst_event_ref (event); if (!(res = gst_pad_push_event (viddec->sinkpad, event))) { if (viddec->index) { res = index_seek (pad, event); } } gst_event_unref (event); break; } default: result = gst_pad_event_default(pad, event); } return result; } ____________________________________ But it can't implement the ""res = index_seek (pad, event); Did i make any error code ?
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Luis de Bethencourt
Does not all the demuxers (avidemux/qtdemux/flvdemux/matroskademux) support GST_SEEK_FLAG_SKIP flag?
or must do anything in the decoder plugin ? I notice that in the mpeg2dec plugin of gst-plugins-ugly, it register the set_index and get_index callback such as : ___________________________________________________ static void gst_mpeg2dec_class_init (GstMpeg2decClass * klass) { ...... gstelement_class->set_index = gst_mpeg2dec_set_index; gstelement_class->get_index = gst_mpeg2dec_get_index; } __________________________________________________ set_index and get_index will support fast playback rate of fast forward ? I register the get_index and set _index in my decoder plugin, and do index_seek function in the case GST_EVENT_SEEK of XXX_src_event callback , such as ____________________________________ static gboolean gst_myviddec_src_event(GstPad *pad, GstEvent *event) { // ...... switch(GST_EVENT_TYPE(event)) { case GST_EVENT_SEEK: { gst_event_ref (event); if (!(res = gst_pad_push_event (viddec->sinkpad, event))) { if (viddec->index) { res = index_seek (pad, event); } } gst_event_unref (event); break; } default: result = gst_pad_event_default(pad, event); } return result; } ____________________________________ But it can't implement the ""res = index_seek (pad, event); Did i make any error code ?
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |