1,433
edits
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
== CCTV Example (Dynamic Switching) == | == CCTV Example (Dynamic Switching) == | ||
This example demonstrate the usage of the dynamic switching property of the GstInterpipe. The objective of this sample is to show the simplicity that GstInterpipe offers in a real case of use where you have different source pipelines and one sink pipeline, and you want to alternate the source that is connected with the sink pipeline. For example a Closed Circuit Television (CCTV) system. | |||
In this sample there are 3 source pipelines labeled as: scr_pipe_1, scr_pipe_2, scr_pipe_3. Each source pipeline is a videotestsrc with a different pattern. In the other side there is 1 sink pipeline, who is labeled as sink_pipe_4. This sink pipeline consists of a videosink that displays on screen the video buffers it receives. | |||
In the sample the source pipeline periodically (each 8 s) change the source pipeline it is listening to, so you will see a different video pattern on the rendering screen. | |||
The below diagram illustrates the concept. | |||
'''!!! DIAGRAM Under Construction !!!''' | |||
Sample bash script code: | |||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
#!/bin/bash | #!/bin/bash | ||
Line 79: | Line 89: | ||
echo -e "\n ====> CCTV Example Finished!!! \n" | echo -e "\n ====> CCTV Example Finished!!! \n" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To run the sample follow this steps: | |||
#Copy the script code in a file | |||
#Change the file permissions to be executable (chmod 777 <file.sh>) | |||
#Run the script: ./<file.sh> | |||
}} | }} |
edits