Chat and Conference into the same app.

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Chat and Conference into the same app.

Post by friman »

Hi

1. I would like to know if is possible use chat and conference funcionalities into the same app, using the same controls RVCamSender and RVCamReceiver, or if you recommend (or is possible) use more than one controls (RVCamSender and RVCamReceiver) into the same app?

2. How is possible create several TRVCamViewItem on runtime? I didnot found something to guide me on that.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1) Which functionality do you want from a chat, and which functionality do you from a conference?

2) RVCamMultiView.Viewers is a collection, so you can work with it like with any other collection.
To add a new viewer, call RVCamMultiView.Viewers.Add.
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Post by friman »

1. I want into the same app add chat per to per module, and into some other form conference beetwen several users. I had joining both samples without sucess, that is way I ask the better way to avoid issue beetwen connections.

2. Using something like

Code: Select all

var Item:TCollectionItem;
begin
  Item:=RVCamMultiView1.Viewers.Add;
  /// And now what? in this point I am lost
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Post by friman »

Another issue is the follow, the sender is on right side and receiver on left.
What can the cause of this poor video resolution?

Here screenshot
http://www.pictureshack.us/view_78773_issue.png
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Post by friman »

Hello

Any reply to my previous question?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry for the delay.

Let client A (let call its identifier <A-ID>) adds an item to RVCamMultiView.Viewers, and wants to display a video from the client B (let call its identifier <B-ID> there.

Client A must:
1) Assign a property of the added item in RVCamMultiView.Viewers: GUIDFrom := <B-ID>
2) Call RVCamSender.SendMediaAccessRequest(<B-ID>)
3) (optionally, for improving performance in future versions of RVMedia)
Call RVCamReceiver.Senders[0].VideoSenders.AddGUID(<B-ID>);

Client B must:
1) Process RVCamReceiver.OnVideoAccessRequest event. In response to the actions of the client A, this event will be called with GUDUser parameter = <A-ID>. In response, the client B must call RVCamSender.AllowMediaAccess(GUIDUser);

----

Let A wants to end this video session.
It must
1) (optionally) destroy this viewer or clear its GUIDFrom
2) Call RVCamSender.SendMediaAccessCancelRequest(<B-ID>)
3) (optionally, for improving performance in future versions of RVMedia)
Call RVCamReceiver1.Senders[0].VideoSenders.DeleteGUID(<B-ID>);

Client B must:
1) Process RVCamReceiver.OnVideoAccessCancelRequest event. In response to the actions of the client A, this event will be called with GUDUser parameter = <A-ID>. In response, the client B must call RVCamSender.CancelMediaAccess(GUIDUser);
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Post by friman »

Is ok, thanks.

Still I am facing issue with the others:

1. Here is one http://www.pictureshack.us/view_78773_issue.png
What can be the reason to retrieve such video? (on left side client)

2. Is done the audio selection that you said?

3. Is possible any complete sample how to create Viewers on runtime?

Code: Select all

var Item:TCollectionItem; 
begin 
  Item:=RVCamMultiView1.Viewers.Add; 
  /// And now what? in this point I am lost
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1. Can you tell me which properties of sender and receiver did you change? You can see changes made at design time by right clicking the form, choosing "View as Text" and finding sender and receiver.

2. As for audio, I'll consult the developer and answer tomorrow.

3. While we can do a sample, there is nothing special with creating a viewer inside a multiviewer. All main properties are the same as in TRVCamView component. Properties of items of this collection are listed in the help file:
http://www.trichview.com/help-media/trv ... iewers.htm
Assign the following properties:
- GUIDFrom - identifier of the client to receive video from. In our VideoChats demos, this identifier is returned as GetUser().GUID
- Left, Top, Width, Height
Other properties are optional
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Post by friman »

In first moment I alter some values on Connection property (to avoid server disconnection on video/audio/data) but after this issue I copy and paste from sample demos and getting the same result. I am getting lost with that. I also add conference using another server into the same app, the conference work fine, the issue continue on per to per.

Anyway here are both controls on dfm

Code: Select all

object RVCamSender1: TRVCamSender
    CompressionOptions.Audio = rvtcParts
    CompressionOptions.UserData = rvtcParts
    Protocol = rvpTCP
    TCPConnectionType = rvtcpSenderToReceiver
    ReceiverPort = 0
    Encoding = rvetJPEGChange
    VideoSource = RVCamera1
    AudioSource = RVMicrophone1
    GUIDFrom = '{D104ECBB-D1E5-4A8D-9231-567C8ED73A04}'
    VideoResolution = rv320_240
    Left = 248
    Top = 48
  end
  object RVCamReceiver1: TRVCamReceiver
    Protocol = rvpTCP
    TCPConnectionType = rvtcpReceiverToSender
    Senders = <
      item
        SenderPort = 0
        VideoSenders = <>
        AudioSenders = <>
        UserDataSenders = <>
        FileSenders = <>
        CmdSenders = <>
      end>
    OnReceiveUserData = RVCamReceiver1ReceiveUserData
    OnReceiveFileData = RVCamReceiver1ReceiveFileData
    OnReceiveCmdData = RVCamReceiver1ReceiveCmdData
    OnReceivedFile = RVCamReceiver1ReceivedFile
    OnVideoAccessRequest = RVCamReceiver1VideoAccessRequest
    OnVideoAccessCancelRequest = RVCamReceiver1VideoAccessCancelRequest
    OnUserEnter = RVCamReceiver1UserEnter
    OnUserExit = RVCamReceiver1UserExit
    OnSessionConnected = RVCamReceiver1SessionConnected
    OnSessionDisconnected = RVCamReceiver1SessionDisconnected
    Left = 248
    Top = 95
  end
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

VideoResolution = rv320_240 lowers the video quality
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

As for audio, I can explain how I understand it, if I am wrong somewhere, I'll correct tomorrow.

Briefly, video and audio data are received together (unless you turn off receiving video or audio completely). The "media access request" methods work both for video and audio. The events are called "video access", but this is not exactly correct, "media access" work for all data types.

More detailed explanation:

The "media access request" methods allow managing "default receivers" on the media server
( http://www.trichview.com/help-media/trv ... ethods.htm )
For each client, a server stores a list of "default receivers" (i.e. a list of other clients which receive data from this client). If the client sends data without specifying an addressee (neither as a client ID nor as a group ID), the media server sends these data to all its default receivers.

For video and audio data, an addressee may be specified in RVCamSender.GUIDTo or GUIDGroup properties. Otherwise, data are sent to default receivers.
For other type of data (user data, commands, files), an addressee may be specified in the methods that send them. If not specified, they are sent using the same rules as video and audio.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

By the way, in the next update we plan to implement "default receivers" for specific data types. So you will be able to define default addressees of video, audio, files, etc. separately.
Post Reply