Class that sinks frame from a webrtc stream.
More...
#include <VideoSink.h>
|
| 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...
|
|
Class that sinks frame from a webrtc stream.
◆ VideoSink()
VideoSink::VideoSink |
( |
VideoSinkCallback |
onFrameReceived | ) |
|
|
explicit |
Construct a VideoSink.
- Parameters
-
onFrameReceived | callback function that gets called whenever a frame is received |
◆ 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
-
frame | available 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: