3
votes

Refer to http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic-pipelines.html, I tried to change udpsrc on gstreamer pipeline. But something was wrong, state of the pipeline cannot be changed to PLAYING after change udp source.

Below is sequence of changing udpsrc. The original pipeline bin consist of...

udpsrc - queue - tsdemux - queue - parser - videodecoder - queue videosink

  1. first, block src pad of udpsrc
  2. send eos event to queue (next to udpsrc)
  3. wait until eos message is received from bus.
  4. set state of udpsrc NULL, and remove udpsrc from pipeline bin.(unlink)
  5. Create new udpsrc with new source uri.
  6. link to queue
  7. change state to PLAYING.

Is there any mistake in this sequence? Thanks in advance.

1

1 Answers

0
votes

You don't need to send an EOS through the pipeline in this case. That has the effect of signalling the end of a stream and while it can be recovered from in most cases, for this case it is not needed.

The scenario for sending an EOS through elements when changing the pipeline dynamically is for elements with both sink and src pads in order to drain any data that may be stuck inside.