seek event on
Sebastian Dröge
sebastian at centricular.com
Sat Mar 29 02:10:47 PDT 2014
On Mi, 2014-03-26 at 07:03 -0700, Dudi.r wrote:
> Hi,
>
> I have a question about events,
>
> there are two pipelines inside my code- transmitter and receiver
> (loopback).
>
>
> the transmitter (pipe1):
>
> filesrc location=file.pcap ! pcapparse src-port=56496 ! "application/x-rtp,
> payload=(int)96, media=(string)video, clock-rate=(int)90000,
> encoding-name=(string)H264" ! udpsink port=[port]
>
> the receiver (pipe2):
>
> udpsrc uri=udp://localhost:[port] ! "application/x-rtp,
> media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
> payload=(int)96" ! gstrtpjitterbuffer ! decodebin2 ! autovideosink
>
> the pipelines not connected and when I want to run the code, this is the
> commands:
>
> /* Start playing */
> gst_element_set_state (pipe2, GST_STATE_PLAYING);
> gst_element_set_state (pipe1, GST_STATE_PLAYING);
>
> I can see the video, but when I send seek event to the second pipeline, the
> seek failed and the video continues to run regularly:
>
> 1. gst_element_query_position (data->pipe2, &format, &position)
> 2. seek_event = gst_event_new_seek (data->rate, GST_FORMAT_TIME,
> GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, position ,
> GST_SEEK_TYPE_SET, -1);
> 3. gst_element_send_event (data->pipe2, seek_event)
>
> is the event somehow sent also to pipe1 even if I send it to pipe2?
No, both pipelines are completely separate and won't share any events or
anything else via GStreamer. All communication will go through UDP.
(Unless you actually put both pipelines into the same top-level
GstPipeline, but don't do that)
> is the problem with one of the elements in pipe2?
>
> I cant figure it out why the event doesn't effect on pipe2 (the receiver)..
pipe2 does not support seeking. It can only play whatever comes in via
UDP, especially as there is not even a backchannel from pipe2 to pipe1
to tell pipe1 to produce data from a different position.
You have to implement signalling communication between the sender and
receiver yourself via a different protocol (or your own), or e.g. use
RTSP which implements seeking functionality.
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140329/f6eee0e5/attachment.sig>
More information about the gstreamer-devel
mailing list