rvcamsender TRVCamSender

Properties   Methods   Events

<< Click to display table of contents >>

rvcamsender TRVCamSender

Properties   Methods   Events

TRVCamSenser sends video and audio to the network.

Unit [VCL and LCL] MRVSender;

Unit [FMX] fmxMRVSender;

Syntax

TRVCamSender = class(TCustomRVSender)

hmtoggle_arrow1Hierarchy

Description

If Active=True, the component gets the video from VideoSource and audio from AudioSource, and sends them to the network. These video and audio streams can be received by TRVCamReceiver and TRVMediaServer. In addition to audio and video, a sender can send commands and files.

A video format is specified in Encoding.

Media channels

Data may be organized in multiple media channels.

Media channels are useful when you send information via TRVMediaServer; for example, they allow for clients to send video from multiple cameras. For direct connections (to TRVCamReceiver), you can use multiple TRVCamSender components instead.

Audio and video for the default (0th) channel are defined in properties VideoSource and AudioSource.

Audio and video for the 1st, 2nd channels and so on are defined in VideoSource and AudioSource properties of items in ExtraMediaSource collection property.

Commands, files, and user data can also be linked to a channel. The corresponding methods have MediaIndex parameter where you can specify the index of media channel.

Connection to TRVCamReceiver - 1. Making connection

UDP connection is recommended for video and audio, especially for video. It's highly not recommended for other types of data.

HTTP connection is required if proxy servers are used.

Settings common for all options:

Settings for TRVCamSender:

Active=True

Settings for TRVCamReceiver:

Active=True

hmtoggle_arrow1 Option 1: UDP connection from Sender to Receiver

hmtoggle_arrow1 Option 2: TCP (or HTTP) connection from Sender to Receiver

hmtoggle_arrow1 Option 3: TCP (or HTTP) connection from Receiver to Sender

Connection to TRVCamReceiver - 2. Using unique identifiers

Unique identifiers may be used to identify senders and receivers.

Identifying receivers

A receiver may (optionally) check if data are really addressed to it. It helps to ignore unauthorized senders during network attacks.

To enable this feature, assign a valid value to TRVCamReceiver.GUIDMy. If it is assigned, the receiver accepts only data from senders containing the same value in GUIDTo properties.

Identifying senders

In the simplest case, when a single sender is connected to a single receiver, a sender identification is not necessary.

However, a receiver can receive videos from multiple senders; GUIDFrom property allows to distinguish senders. A receiver can either accept data from the specified senders (listed in TRVCamReceiver.Senders), or it can accept data from all senders (in this case, TRVCamReceiver.Senders must be empty).

Connection to TRVMediaServer

See the topic about TRVMediaServer.

More information about connection modes

See the overview topic.

Lazarus note

In Lazarus, this component must have a windowed control as an owner: you can place it on a form, but you cannot place it on a datamodule.

If the component is created with Owner = nil, it assigns the main form as an owner.