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

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

#include <VideoSink.h>

Inheritance diagram for opentera::VideoSink:

Public Member Functions

 VideoSink (VideoSinkCallback onFrameReceived)
 Construct a VideoSink. More...
 
void OnFrame (const webrtc::VideoFrame &frame) override
 Process incoming frames from webrtc. More...
 
rtc::VideoSinkWants wants () const
 get frame requirements for this sink More...
 

Detailed Description

Class that sinks frame from a webrtc stream.

Constructor & Destructor Documentation

◆ VideoSink()

VideoSink::VideoSink ( VideoSinkCallback  onFrameReceived)
explicit

Construct a VideoSink.

Parameters
onFrameReceivedcallback function that gets called whenever a frame is received

Member Function Documentation

◆ OnFrame()

void VideoSink::OnFrame ( const webrtc::VideoFrame &  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

◆ wants()

rtc::VideoSinkWants opentera::VideoSink::wants ( ) const
inline

get frame requirements for this sink

Returns
frame requirements for this sink

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