I actually don't understand:
((IServiceCapableConnection) conn).invoke("newStream", new
Object[]{currentClient}, this);
in the method setSipTransport

Actually _every_ stream that starts broadcasting will trigger an Event in
OpenMeetings.
We catch those "stream start events" in the method:
@Override
    public synchronized void streamPublishStart(IBroadcastStream stream)

In the ScopeApplicationAdapter.

Where this stream is coming from, if its screensharing or audio/video, it
does not matter.
I would expect that if a SIP user connects via red5SIP, this method will be
still invoked, as it is just a "yet another stream" from the view of the
red5 server.
So why does "setSipTransport" call this method actively?
"streamPublishStart" (and through that "newStream") should be called
automatically as soon as the SIP user starts to stream audio to red5.

You just need to make sure that the Client (former RoomClient) has the
right flags set _before_ you start to stream. Cause the method
"streamPublishStart" will send a client object to all users. And you can't
pass any variables to "streamPublishStart" as this is a method/event
listener of Red5.

Calling "addNewUser" from "setSipTransport" makes sense for me, as this
logic is the same like in "setRoomValues". But calling "newStream" from
"setSipTransport" makes no sense to me. From my point of view you would get
a duplicated "newStream" method call everytime a SIP user connects:
1) When setSipTransport is invoked
2) When the actual stream starts

Can you check with that with Timur?

Sebastian


2013/2/13 [email protected] <[email protected]>

> Is this a problem that only happens with SIP integration or also
> standalone?
>
> I will have to test that first. It sounds a bit weird, but I can't test it
> as I don have 5-7 pc's.
> And using a single pc makes no sense when testing audio/video.
>
> We have two rtmp connection per stream, but that would still not explain
> your issues with the id.
> Which Id are your refering to exactly? broadCastId or streamId ?
> broadcastId would be the name of the stream under which the user publishs
> (aka NetStream) streamId is the rtmp connection (aka NetConnection),
> you connect to: rtmp://blabla:1935/openmeetings/
> And each client will publish his webcam+micro in one stream, with the name
> of the "broadCastId".
>
> The StreamId can stay the same, for example if you re-publish your
> settings, the NetConnection will always stay, but each time your webcam is
> published a new "broadCastId" is requested from the server. (See
> ScopeApplicationAdapter::getBroadCastId()). It is better to use a fresh
> broadCastId each time you make a new NetStream.
>
> "setSipTransport"  and "streamPublishStart" are new only methods that
> invoke "newStream" as event in the client.
>
> Sebastian
>
>
> 2013/2/13 Maxim Solodovnik <[email protected]>
>
>> Hello Sebastian,
>>
>> sorry for double post, but I would like to gain your attention at the
>> following problem:
>>
>>
>> if there is lot of users lots of users in the room (5-7) some of them
>> can't hear some others until "reload" of streams on the client.
>> Timur told me that according to the log of red5sip there is weird queue
>> of method calls: newStream gets called twice. Additionally if user has
>> stream with id 24 and select "reload" the following methods are gets called:
>> closeStream(25) // NOTE 25 not 24
>> then
>> newStream(25)
>>
>> Maybe you can say what is wrong?
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> [email protected]
>



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
[email protected]

Reply via email to