How to create multiple VideoRendererGui?

433 views
Skip to first unread message

Albert

unread,
Feb 3, 2015, 7:06:18 AM2/3/15
to discuss...@googlegroups.com
Hi,
I'm developing a Android WebRTC app and I wanted to create more than one VideoRendererGui. In fact, I want to create an VideoRenderGui view for the remote streams and another one for the local stream. I have been looking at examples (AppRTCDemo and github's AndroidRTC projects) but I have not seen it anywhere. Is there a possible way to do it?

Thanks!

gla...@webrtc.org

unread,
Feb 3, 2015, 1:18:00 PM2/3/15
to discuss...@googlegroups.com
Yes, you can create your own version of VideoRenderer and use it instead if VideoRendererGui. Your video renderer need to implement VideoRenderer.Callback interface https://code.google.com/p/webrtc/source/browse/trunk/talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java#150 and then you can add your own Callback interface implementation to video track something like this: https://code.google.com/p/webrtc/source/browse/trunk/talk/examples/android/src/org/appspot/apprtc/PeerConnectionClient.java#433  

Also note that if you want VP8 decoder to be hw accelerated you need to provide video render EGL context in PeerConnectionFactory.initializeAndroidGlobals: https://code.google.com/p/webrtc/source/browse/trunk/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java#52 . If your video renderer does not use OpenGL then set EGL context to NULL, but VP8 HW decoding may be rather slow then.

Thanks,
Alex.

James Firth

unread,
Jul 14, 2015, 12:07:47 PM7/14/15
to discuss...@googlegroups.com
Looks like those links are broken and the VideoRenderer is in the native code now not as Java. Is it possible to use your solution still?

Peter Boström

unread,
Jul 14, 2015, 12:12:28 PM7/14/15
to discuss...@googlegroups.com
Files are now here, I know nothing about the rest, just sub talk/... for whatever file was linked before: https://chromium.googlesource.com/external/webrtc/+/master/talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/02abd3e6-133c-4c28-9855-6fda463cdec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages