GStreamer cannot reverse playback of H264 encoding the MP4 video

ligen 623669584 at qq.com
Mon Sep 10 02:47:22 PDT 2012


In Gstreamer's core reference library there is a function
gst_element_seek.It is said that if the parameter rate of the function
gst_element_seek is set to -1.0 reverse playback can be implemented.I
tried this for playing a MP4 file but reverse playback could not be
achieved...Could you give me a suggestion of how to achieve reverse
playback....

    if(pipeline){
        g_print("playback....\n");
        GstFormat fmt = GST_FORMAT_TIME;
        gint64 pos;
        gint64 length;
        if(pipeline && gst_element_query_duration(pipeline, &fmt, &length)
&& gst_element_query_position(pipeline,&fmt,&pos))
        {
           rate = -1.0;
          
if(gst_element_seek(pipeline,rate,GST_FORMAT_TIME,(GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_KEY_UNIT|GST_SEEK_FLAG_SKIP),GST_SEEK_TYPE_SET,0,GST_SEEK_TYPE_SET,pos))
           {
                GstState state;
                gst_element_get_state(pipeline,&state,NULL,-1);
                if(state != GST_STATE_PLAYING)
                    gst_element_set_state(pipeline,GST_STATE_PLAYING);
           }
        }
    }

It is can not  reverse playback of H264 encoding the MP4 video , but It will
can reverse playback of mepg-4  encoding the MP4 video ,such as  the mpeg-4
encodeing of the mp4/avi video 

Could you give me a suggestion?

thanks !  

email: 623669584 at qq.com




-----
你还是你,我还是我.....
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GStreamer-cannot-reverse-playback-of-H264-encoding-the-MP4-video-tp4656231p4656232.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list