const pipeline = new gstreamer.Pipeline('videotestsrc pattern=1 ! video/x-raw,format=AYUV,framerate=\(fraction\)30/1,width=100,height=100 ! videobox border-alpha=0 top=-70 bottom=-70 right=-220 ! compositor name=comp sink_0::alpha=0.7 sink_1::xpos=600 sink_2::xpos=200 ! videoconvert ! xvimagesink videotestsrc ! video/x-raw,format=AYUV,framerate=\(fraction\)5/1,width=320,height=240 ! comp. autovideosrc ! video/x-raw,framerate=\(fraction\)30/1,width=320,height=240 ! comp.')
pipeline.play()
const pad = pipeline.getPad('comp', 'sink_2')
pad.xpos = 300; // dynamically move the image within the composition
pad.alpha = 0.5; // dynamically change the transparency of the sub-image
This starts a compositor pipeline with a webcam and two test streams, then uses the gotten pad to change properties of one of the subimages dynamically.
Example:
This starts a compositor pipeline with a webcam and two test streams, then uses the gotten pad to change properties of one of the subimages dynamically.