GStreamer RTP source pipeline Pause/Play rushes ahead on client

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GStreamer RTP source pipeline Pause/Play rushes ahead on client

David Manpearl
My calls to pause and resume streaming with gst_element_set_state(GST_STATE_PAUSE) and gst_element_set_state(GST_STATE_PLAY) cause undesired behavior at the client.
Expected behavior: Client pauses shortly after server pauses and client resumes short after server resumes and plays at real-time playback.
Actual behavior: Client pauses correctly, but after resuming rushes ahead to 'catch-up' with time the play-head would have been at had the pipeline not been paused.
My request: How to pause and resume a pipeline in such a manner that the playback speeds continue in real-time minus, of course, the cumulative paused time.

Audio: The set of pipelines below do not transport audio, but pipelines with audio behave similarly.
Async: I have come across indications that changing the "async" parameter on any of the sink plugins may solve the problem, but I was not able to fix the problem with async changes.

Information on how to correctly pause and resume this set of pipelines will be greatly appreciated.

Server pipeline:
filesrc location=video.MP4 ! qtdemux ! queue ! vaapih264dec ! vaapipostproc width=1280 height=720 ! videorate ! video/x-raw,framerate=30000/1001 ! vaapih264enc bitrate=3000 ! mpegtsmux ! rtpmp2tpay ! rtprtxqueue ! rtpbin.send_rtp_sink_0  rtpbin.send_rtp_src_0 ! udpsink name=gbxsink async=false port=5000 host=  rtpbin name=rtpbin rtp-profile=avpf

Client pipeline (iPhone):
udpsrc caps=application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T port=5000 ! rtpbin ! rtpmp2tdepay ! tsdemux ! h264parse ! vtdec ! videoconvert ! glimagesink name=video-sink

gstreamer-devel mailing list
[hidden email]