This example shows how to use the Compositing and Resize blocks to construct a picture-in-picture (PIP) effect.
|On this page…|
The following figure shows the Picture in Picture example model:
You can use the Control block to specify which video channel (1, 2 or 3) is the main channel and which is the PIP channel. The example overlays the PIP channel onto the main channel. You can specify the location of the PIP window using the Location of PIP window parameter. Your choices are Upper left, Upper right, Lower left, or Lower right.
The example uses the Resize block to reduce the size of the PIP channel by 50%. That way, the PIP window covers only a portion of the main channel. When you change the PIP channel number parameter, the example can either slide or fade the new PIP window onto the main channel. You can specify the sliding or fading effect by adjusting the Switch blocks.
Windows-only example models might contain compressed multimedia files or To Video Display blocks, both of which are only supported on Windows platforms. The To Video Display block supports code generation, and its performance is optimized for Windows.