Page 1 of 1

Chat and Conference into the same app.

Posted: Tue Nov 17, 2015 2:20 pm
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.

Posted: Tue Nov 17, 2015 3:59 pm
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.

Posted: Tue Nov 17, 2015 4:23 pm
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

Posted: Tue Nov 17, 2015 4:47 pm
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

Posted: Sun Nov 29, 2015 10:15 am
by friman
Hello

Any reply to my previous question?

Posted: Sun Nov 29, 2015 4:50 pm
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);

Posted: Sun Nov 29, 2015 4:58 pm
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

Posted: Sun Nov 29, 2015 7:41 pm
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

Posted: Sun Nov 29, 2015 8:32 pm
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

Posted: Sun Nov 29, 2015 8:37 pm
by Sergey Tkachenko
VideoResolution = rv320_240 lowers the video quality

Posted: Sun Nov 29, 2015 8:58 pm
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.

Posted: Tue Dec 01, 2015 8:45 am
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.