Choose between two inputs in the gstreamer plugin

I am currently writing a Gstreamer-1.0 plugin with source audio/x-raw.

I would like to send two input sources to my plugin. One of them will be the default source, and the other will be used if the condition is true:

       ____________________________________
      |                                    |
   ->-|      default source                |-->---
  |   |____________________________________|      |           _______________
  |                                               |          |               |
t-|                                               |----->----|   my plugin   |
  |    ____________________________________       |          |_______________|
  |   |                                    |      |
   ->-|      secondary source              |-->---
      |____________________________________| 

A good way to do this seems to be with help input selector, but I don't know how to use it. Does anyone know how to add and configure input selector?

+4
source share
1 answer

Yes, the item input-selectoris the right choice for this.

There is a complete example of using it in the tests included in the package gst-plugins-base.

, .autogen.sh, make ( ).

input-selector :

tests/icles/input-selector-test.c
./tests/icles/input-selector-test
+2

Source: https://habr.com/ru/post/1543132/


All Articles