Rewind a pipeline

Jorge Fernandez Monteagudo jorgefm at cirsa.com
Mon May 20 06:27:45 PDT 2013


Hi all!

Is it possible to reuse a pipeline? I would like to avoid creating and destroying a pipeline when I
want to have a video playing in a loop. How can I do that? When I try to send a seek event I
always get an error. The next code always print "Send seek event failed!"

    // Set the pipeline ready.
    ret = gst_element_set_state( pipeline, GST_STATE_READY );
    if( ret == GST_STATE_CHANGE_FAILURE ) {
      printf( "Failed to start up pipeline!\n" );
      done = 1;
      return;
    }

    // Seek the stream init.
    GstEvent *seek_event = NULL;

    seek_event = gst_event_new_seek( 1.0, GST_FORMAT_TIME,
                                     (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT),
                                     GST_SEEK_TYPE_SET, 0LL,
                                     GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE );
    if( gst_element_send_event( pipeline, seek_event ) == false ) {
      printf( "Send seek event failed!\n" );
      done = 1;
      return;
    }

Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o CONFIDENCIAL. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege.
If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it.


More information about the gstreamer-devel mailing list