Giter Club home page Giter Club logo

Comments (8)

soommy12 avatar soommy12 commented on July 26, 2024 1

Hello @niroj08 ,
according to the official Android WebRTC example here (which is, unfortunately, a little bit complicated) you should create a private class which extends VideoSink:

private static class ProxyVideoSink implements VideoSink { private VideoSink target; @Override synchronized public void onFrame(VideoFrame frame) { if (target == null) { Logging.d(TAG, "Dropping frame in proxy because target is null."); return; } target.onFrame(frame); } synchronized void setTarget(VideoSink target) { this.target = target; } }

Then, you need to create it:
private final ProxyVideoSink localProxyVideoSink = new ProxyVideoSink();

and instead of adding a new render you add this sink to local video track:
localVideoTrack.addSink(localProxyVideoSink);

from webrtc-android-codelab.

kostyabakay avatar kostyabakay commented on July 26, 2024 1

@soommy12 thank you! Your comment helped me a lot.

from webrtc-android-codelab.

soommy12 avatar soommy12 commented on July 26, 2024

I tried to cast it to VideoRender.Callback as IDE suggested but then casting error occurs. Without that line I got a black screen but Logging says something like that:
I/org.webrtc.Logging: CameraStatistics: Camera fps: 31. and gives this lines with different fps (around ~30) consistently.

from webrtc-android-codelab.

soommy12 avatar soommy12 commented on July 26, 2024

@vivek1794 can you please take a look at this?

from webrtc-android-codelab.

jolsondc avatar jolsondc commented on July 26, 2024

yes . vivek worked on this project like 4 months ago. many things changed in Webrtc library after that. change dependency version. here and it should work for you

implementation 'org.webrtc:google-webrtc:1.0.21710'

from webrtc-android-codelab.

soommy12 avatar soommy12 commented on July 26, 2024

@jolsondc thanks, but I figured out how to do this using the newest version

from webrtc-android-codelab.

niroj08 avatar niroj08 commented on July 26, 2024

@soommy12 would have been great if you had posted your solution as well

from webrtc-android-codelab.

stonyz avatar stonyz commented on July 26, 2024

My fps is only 17!

CameraStatistics: Camera fps: 17. and don't know why...

from webrtc-android-codelab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.