RVCamSender1->ReceiverHost = "127.0.0.1" ;
RVCamSender1->ReceiverPort = 7777 ;
RVCamReceiver1->Senders->Items[0]->SenderHost = "127.0.0.1" ;
RVCamReceiver1->Senders->Items[0]->SenderPort = 7777 ;
RVCamSender1->Active = true ;
RVCamReceiver1->Active = true ;
The service side without any message.
How to connect to the demo server.exe
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Code: Select all
RVCamSender1->ReceiverHost = "127.0.0.1" ;
RVCamSender1->ReceiverPort = 7777 ;
RVCamReceiver1->Senders->Clear();
RVCamReceiver1->Senders->Add();
RVCamReceiver1->Senders->Items[0]->SenderHost = "127.0.0.1" ;
RVCamReceiver1->Senders->Items[0]->SenderPort = 7777 ;
// in the server demo, 7777 is TCP port
RVCamReceiver1->Protocol = rvpTCP;
RVCamReceiver1->Protocol = rvpTCP;
// Senders and receivers in a client must have equal GUID
RVCamReceiver1->GUIDMy = RVCamSender1->GUIDFrom;
// This type of connection is required to connect to a server
RVCamReceiver1->TCPConnectionType = rvtcpReceiverToSender;
RVCamSender1->Active = true ;
RVCamReceiver1->Active = true ;
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I explained how to configure a single client. A client must contain both TRVCamSender and TRVCamReceiver, to send and to receive data from the server.
Both TRVCamSender and TRVCamReceiver in a single client must have the same GUID, as it shown in the code.
Ok, we connected to the server, how to send and receive data from other clients?
A client must choose other clients from which it want to receive video. When client "GUID_A" wants to receive video from the client "GUID_B", it must call RVCamSender1.SendMediaAccessRequest(GUID_B). The client "GUID_B" receives this request in its RVCamReceiver1.OnVideoAccessRequest, and if it allows to send video to "GUID_A", it must call RVCamSender1.AllowMediaAccess(GUID_A). If the client "GUID_A" no longer want to receive video from the client "GUID_B", it calls RVCamSender1.SendMediaAccessCancelRequest(GUID_B). Similarly, it initiates OnVideoAccessCancelRequest and CancelMediaAccess.
This mechanism is used in all our VideoChat demos: Chat, Messenger, Conference.
The next question - how the client knows GUID of other clients, to choose video from?
The VideoChat demos use different methods.
Method 1. Groups (chat rooms).
This method is used in the Chat demo.
All clients joins the same group. In the chat demo, GUID of this group is {11111111-1111-1111-1111-111111111111}.
The methods for managing groups are here:
http://www.trichview.com/help-media/trv ... ethods.htm
Method 2. Predefined lists of GUIDs of clients.
This method is used in the Messenger and the Conference demos.
GUIDs of all clients are known, but you still need to know who is online.
These demos use the mechanism of "allowed senders": http://www.trichview.com/help-media/trv ... ethods.htm
A client is informed about connecting/disconnecting of allowed senders.
Both TRVCamSender and TRVCamReceiver in a single client must have the same GUID, as it shown in the code.
Ok, we connected to the server, how to send and receive data from other clients?
A client must choose other clients from which it want to receive video. When client "GUID_A" wants to receive video from the client "GUID_B", it must call RVCamSender1.SendMediaAccessRequest(GUID_B). The client "GUID_B" receives this request in its RVCamReceiver1.OnVideoAccessRequest, and if it allows to send video to "GUID_A", it must call RVCamSender1.AllowMediaAccess(GUID_A). If the client "GUID_A" no longer want to receive video from the client "GUID_B", it calls RVCamSender1.SendMediaAccessCancelRequest(GUID_B). Similarly, it initiates OnVideoAccessCancelRequest and CancelMediaAccess.
This mechanism is used in all our VideoChat demos: Chat, Messenger, Conference.
The next question - how the client knows GUID of other clients, to choose video from?
The VideoChat demos use different methods.
Method 1. Groups (chat rooms).
This method is used in the Chat demo.
All clients joins the same group. In the chat demo, GUID of this group is {11111111-1111-1111-1111-111111111111}.
The methods for managing groups are here:
http://www.trichview.com/help-media/trv ... ethods.htm
Method 2. Predefined lists of GUIDs of clients.
This method is used in the Messenger and the Conference demos.
GUIDs of all clients are known, but you still need to know who is online.
These demos use the mechanism of "allowed senders": http://www.trichview.com/help-media/trv ... ethods.htm
A client is informed about connecting/disconnecting of allowed senders.