Dynamic pipelines

Jorge Fernandez Monteagudo jorgefm at cirsa.com
Mon May 13 22:25:13 PDT 2013


That's a good idea!! I'll try to find more information about inserting and pull the bins to and from a pipeline.
I have still not used bins... Any link is welcome :)

Thanks!

________________________________________
From: gstreamer-devel-bounces+jorgefm=cirsa.com at lists.freedesktop.org [gstreamer-devel-bounces+jorgefm=cirsa.com at lists.freedesktop.org] On Behalf Of Stirling Westrup [swestrup at gmail.com]
Sent: Tuesday, May 14, 2013 12:07 AM
To: Discussion of the development of and with GStreamer
Subject: Re: Dynamic pipelines

The secret is to not add any elements to a pipeline that aren't going to be used by the pipeline. I have a very similar setup in my application and I ended up creating output bins for the audio and video outputs. Then on a pad-added signal I insert the needed bin and connect it to the pad.

On EOS, after the pipeline is put into the ready state I pull the two bins back out of the pipeline in anticipation of the next file to play.



On Mon, May 13, 2013 at 5:05 PM, Jorge Fernandez Monteagudo <jorgefm at cirsa.com<mailto:jorgefm at cirsa.com>> wrote:
Hi all!

I have implemented this pipeline by code:

gst-launch-0.10 filesrc location=test.mp4 ! qtdemux name=demux \
   demux.video_00 ! queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! ffdec_h264 ! xvimagesink \
   demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! faad ! alsasink

When I try to play a 'test.mp4' without audio channel the pipeline is frozen. I use the qtdemux callback
"pad-added" to link the demux with the queues. When no audio channel is present no link is made from
demux and audio queue. The problem is that the elements has been added initially to the pipeline but
they never has data, then they can change to ready or playing state

  // Compose the pipeline.
  gst_bin_add_many( GST_BIN( pipeline ), filesrc, demux,
                    video_queue, video_decode, video_sink,
                    audio_queue, audio_decode, audio_sink, NULL );

  // Link all elements that can be automatically linked because they have "Always" pads.
  if( gst_element_link_many( filesrc, demux, NULL ) != TRUE ||
      gst_element_link_many( video_queue, video_decode, NULL ) != TRUE ||
      gst_element_link_many( video_decode, video_sink, NULL ) != TRUE ||
      gst_element_link_many( audio_queue, audio_decode, NULL ) != TRUE ||
      gst_element_link_many( audio_decode, audio_sink, NULL ) != TRUE ) {
    TRACEMSG( "%s - One element could not be linked.\n", __FUNCTION__ );
    gst_object_unref( pipeline );
    return NULL;
  }

I think its a begginer question but how can I solve this? Ideally I would like to know if it's
possible to generate the correct pipeline at runtime? What's the correct way to implement this?

Thanks!!
Jorge

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.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup


More information about the gstreamer-devel mailing list