[jitsi-dev] [jitsi-videobridge] Synchronize access to RtpChannel.stream. (#130)


#1

This fixes a nasty race condition during media channel establishment. We noticed it in mixer mode using an automated test with all components on a single machine, so it might be due to very tight timing.

In RtpChannel, during the execution of

    stream.start()

a media packet from the peer comes in already, indirectly triggering

    stream.setDirection(MediaDirection.SENDRECV);

in another thread.
However, as MediaStreamImpl.started is not yet set to true, this call effectively does not start the outgoing stream, resulting in a one-way media stream.

This could alternatively be fixed by declaring MediaStreamImpl.start/stop/setDirection as "synchronized" in libjitsi.
You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi-videobridge/pull/130

-- Commit Summary --

  * Synchronize access to stream.

-- File Changes --

    M src/main/java/org/jitsi/videobridge/RtpChannel.java (10)

-- Patch Links --

https://github.com/jitsi/jitsi-videobridge/pull/130.patch
https://github.com/jitsi/jitsi-videobridge/pull/130.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/130


#2

Your described problem with all components installed on the same machine seems similar to the one I encountered as described in: [jitsi-dev] [jitsi-videobridge] JVB downstream RTP/RTCP link Setup implementation

that leads to only one-way media stream with missing outgoing stream.

I tried your patches to the RtpChannel.java. However it does not fix my problem even after the fixes.

Note: I am using the latest jitsi-videobridge source pull on Feb 6, 2016.

Any further advice that I can try to pin-point the problem?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/130#issuecomment-180663204


#3

Merged #130.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/130#event-557189448


#4

Merged. Thank you, @joqn!

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/130#issuecomment-186432679