<< Click to display table of contents >> TRVCamSender.OnEncodeVideo |
Occurs when sender is about to send a video frame from VideoSource (or ExtraMediaSources)
You can use this event to compress or encrypt video data.
type // defined in MRVType unit
TRVEncodeVideoEvent = procedure(Sender: TObject;
AStream: TMemoryStream;
var ADataSize: Integer; AVideoIndex: Word;
ImageType: Byte) of object;
property OnEncodeVideo: TRVEncodeVideoEvent;
AStream contains a video frame. Only initial ADataSize bytes in this stream are used.
AVideoIndex identifies the audio source (0 for VideoSource, 1 or greater for ExtraMediaSources).
The format of data in AStream is identified by ImageType parameter. It may be one of:
rvtiJPEG = 1;
rvtiHWL = 2;
rvtiBMP = 3;
rvtiPNG = 4;
If the sender sends changed areas, this event is called for every changed area on a video frame. Otherwise, it is called for the whole video frame.
You can encode a video data, and write it back to AStream. Update ADataSize accordingly.
See also: