Viscom Software VideoCap ActiveX Control

PIPAddVideoDevice Method

Description:   

Add video capture device to Picture in Picture effect. In this version, you may add two video devices only.

Usage:   

VideoCap1.PIPAddVideoDevice iVideoDeviceIndex, iVideoFormatIndex, iStretchMode, iAlphaValue

iVideoDeviceIndex- the index of video device, the first index is zero.

iVideoFormatIndex- the index of video format, the first index is zero.

iStretchMode - the stretch mode,  It will relate to PIPInitDisplayArea method.
 0  = The image is stretched to fit the target frame size in both dimensions, without preserving the aspect ratio.
 1  = The image is not resized. If the image is smaller than the target frame, the surrounding area is black. If the image is larger than the target frame, the image is cropped.
 2  = The image is resized to fit the target frame along one dimension, while preserving the aspect ratio. If the ratio of width to height    in the image does not match the ratio in the target frame, it creates a letterbox.
 3  = The image is resized to fill the entire target frame while preserving the aspect ratio. Rather than create a letterbox, this mode   crops the image, either along the sides or across the top and bottom.

 iAlphaValue - the alpha value, 0-255, 255 is fully visible. You must call PIPAddPIPEffect method, otherwise alpha value will not valid.
 

Return Value:

Return TRUE - successful , Return FALSE - Failure.

Example:   

This Visual Basic example shows how to use PIPAddVideoDevice method

VideoCap1.PIPInitDisplayArea 640, 480
VideoCap1.PIPAddImage "c:\test.jpg", 0, 255
VideoCap1.PIPAddPIPEffect 0, 9999, 0, 0, 640, 480

VideoCap1.PIPAddVideoDevice(0, 0, 0, 255)
VideoCap1.PIPAddPIPEffect 0, 9999, 0, 0, 320, 240
VideoCap1.PIPStart