TRVCamReceiver.OnGetAllGroups

<< Click to display table of contents >>

TRVCamReceiver.OnGetAllGroups

Occurs in response to TRVCamSender.GetAllGroups

property OnGetAllGroups: TRVCmdEvent;

This event occurs when a pair of TRVCamSender and TRVCamReceiver (inside a single application) is connected to TRVMediaServer via the network as a client.

This command is supported only if rvcpUseSystemCmd and rvcpCmdAllGroups are included in TRVMediaServer.CmdOptions.

TRVCamSender.GetAllGroups requests a list of all groups on the server. The server sends this list to a receiver, and OnGetAllGroups occurs.

The list of groups is contained in ACmd parameter.

This command has the following parameters:

'GUIDCount' (integer) – count of returned groups

'GUIDGroup1', 'GUIDGroup2', ... (string) – group identifiers (from 1 to the value of 'GUIDCount')

Example

procedure TfrmMain.RVCamReceiver1GetAllGroups(Sender: TRVCamReceiver;
  SessionKey: TRVSessionKeyconst GUIDGroup,

  GUIDUser: TRVMAnsiString; ACmd: TRVCmd);
var
  i, Count : Integer;
  GUIDGroup   : TRVMAnsiString;
begin
  Count := ACmd.ParamByName('GUIDCount').AsInteger;
  for i := 1 to Count do
  begin
    GUIDGroup   :=
      ACmd.ParamByName(TRVMAnsiString('GUIDGroup'+IntToStr(i))).AsString;

    RVCamSender1.GetGroupInfo(GUIDGroup);
    ...
  end;
end;

If you perform time consuming operations inside an event, it makes sense to compare values of SessionKey parameter and SessionKey property, to make sure that a connection was not closed or reopened.

Warning: Do not display modal forms in this event.