Is it possible to dynamically update tee sink/interleave src?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to dynamically update tee sink/interleave src?

Nick_law
Is it possible to using gst_parse_launch() with gst_bin_get_by_name() and
g_object_set() to change the linking of a tee sink to an interleave src?

An example would look like below:

gst-launch-1.0 interleave name=i \
  audiotestsrc num-buffers=100 wave=0 freq=100 volume=0.4 ! \
    audio/x-raw,format=S16LE,channels=1,rate=48000 ! tee name=t1 \
  audiotestsrc num-buffers=100 wave=2 freq=100 volume=0.4 ! \
    audio/x-raw,format=S16LE,channels=1,rate=48000 ! tee name=t2 \
  t1. ! queue ! volume volume=1 ! i.src0 \
  t2. ! queue ! volume volume=0.5 ! i.src1 \
  t1. ! queue ! volume volume=0.8 ! i.src2 \
  t2. ! queue ! volume volume=0.7 ! i.src3 \
  i. ! audio/x-raw,format=S16LE,channels=4 \
    ! audioconvert ! wavenc ! filesink location=test.wav

Once the pipeline is running is then possible to switch dynamically so the
pipeline looks like as an example

  t1. ! queue ! volume volume=1 ! i.src1 \
  t2. ! queue ! volume volume=0.5 ! i.src0 \
  t1. ! queue ! volume volume=0.8 ! i.src3 \
  t2. ! queue ! volume volume=0.7 ! i.src2 \

wondering if one could add a name= teesink somewhere that can be updated
dynamically:
t1. ! queue ! volume volume=1 ! name=teesink0 i.src1 \

and update teesink0 to a different interleave src?

Currently I am able to update volume etc using named pads, but it would be
great if the channel mapping could also be updated dynamically. My limited
understanding says this isn't possible using gst_parse_launch()?

any help is appreaciated.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to dynamically update tee sink/interleave src?

gotsring
It should be possible to manipulate bins and pads and the like even when
using gst_parse_launch. You just have to find them first
(gst_bin_get_by_name).

I'm not sure if you can name pads like teesink0, so you'll either have to
get pads based on their peers (what they are connected to) or their names
(sink0, sink1, etc.)

I wrote some test code that pretty much does what your example does; take a
look. Hope this helps.

gst_parse_swap.c
<http://gstreamer-devel.966125.n4.nabble.com/file/t379531/gst_parse_swap.c>  



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel