VOOZH about

URL: https://developer.ridgerun.com/wiki/index.php/GstInterpipe_-_Dynamic_Switching

⇱ GstInterpipe - Dynamic Switching


Jump to content
From RidgeRun Developer Wiki

Share This Page


Open-source project from RidgeRun. GstInterpipe is a GStreamer plug-in that allows pipeline buffers and events to flow between two or more independent pipelines.


Previous: Buffer Forwarding Index Next: Caps Negotiation


GstInterpipe Overview
Features and Limitations
Building and Installation Guide
Features Detailed Description
Developers Guide
GstInterpipes Elements Detailed Description
Examples
Contact Us



This page contains a detailed description of the GstInterpipe Dynamic Switching feature.

One of the greatest strengths of GstInterpipe is the ability of an interpipesrc to switch between different interpipesinks at runtime. To do so, change the listen-to property. Similarly, disconnections and reconnections can be performed by clearing and setting the property accordingly. When performing dynamic switching, caps must be taken into consideration. Specifically, a switch can be performed to a node in two scenarios:

No other listeners
Caps are re-negotiated between the two pipelines, looking for the optimum caps.
Existing listeners
The sink pipeline must support the caps already configured by the node and listeners, otherwise, it'll fail.

The following figure illustrates this concept:

👁 Image
Dynamic Switch Scenarios


The caps re-negotiation capability can be disabled with the allow-renegotiation property. The following table summarizes the involved property:


The switch can be disabled entirely by setting the block-switch property. The following table summarizes the involved property:


Programmatically, the dynamic switch can be performed as follows:

/* Create pipelines */
GstElement *pipe1 = gst_parse_launch ("videotestsrc ! interpipesink name=camera1", NULL);
GstElement *pipe2 = gst_parse_launch ("videotestsrc ! interpipesink name=camera2", NULL);
GstElement *pipe3 = gst_parse_launch ("interpipesrc name=src listen-to=camera1 ! fakesink", NULL);

/* Grab a reference to the interpipesrc */
GstElement *src = gst_bin_get_by_name(pipe3, "src");

/* Perform the switch */
g_object_set (src, "listen-to", "camera2", NULL);



Previous: Buffer Forwarding Index Next: Caps Negotiation


Cookies help us deliver our services. By using our services, you agree to our use of cookies.