Answers for "how to define connected camera as media source to webrtc android"

0

how to define connected camera as media source to webrtc android

public void onReceive(byte[] videoBuffer, int size, int width, int height) {
    long timestampNS = TimeUnit.MILLISECONDS.toNanos(SystemClock.elapsedRealtime());
    NV21Buffer buffer = new NV21Buffer(videoBuffer, width, height, null);

    VideoFrame videoFrame = new VideoFrame(buffer, 0, timestampNS);
    videoSource.getCapturerObserver().onFrameCaptured(videoFrame);

    videoFrame.release();
}
Posted by: Guest on November-22-2020

Code answers related to "how to define connected camera as media source to webrtc android"

Browse Popular Code Answers by Language