OpenTera WebRTC API (C++) 1.2.6
Public Member Functions | List of all members
opentera::EncodedVideoSink Class Reference

Class that sinks frame from a webrtc stream. More...

#include <EncodedVideoSink.h>

Inheritance diagram for opentera::EncodedVideoSink:

Public Member Functions

 EncodedVideoSink (EncodedVideoSinkCallback onFrameReceived)
 Construct a VideoSink. More...
 
void OnFrame (const webrtc::RecordableEncodedFrame &frame) override
 Process incoming frames from webrtc. More...
 

Detailed Description

Class that sinks frame from a webrtc stream.

Constructor & Destructor Documentation

◆ EncodedVideoSink()

EncodedVideoSink::EncodedVideoSink ( EncodedVideoSinkCallback  onFrameReceived)
explicit

Construct a VideoSink.

Parameters
onFrameReceivedcallback function that gets called whenever a frame is received

Member Function Documentation

◆ OnFrame()

void EncodedVideoSink::OnFrame ( const webrtc::RecordableEncodedFrame &  frame)
override

Process incoming frames from webrtc.

This function is called by the webrtc transport layer whenever a frame is available. It convert YUV frame data from the I420 buffer to BGR data and call the callback function with a cv::Mat

Parameters
frameavailable webrtc frame

The documentation for this class was generated from the following files: