1 #ifndef OPENTERA_WEBRTC_NATIVE_CLIENT_ENCODED_VIDEO_SINK_H
2 #define OPENTERA_WEBRTC_NATIVE_CLIENT_ENCODED_VIDEO_SINK_H
4 #include <api/video/recordable_encoded_frame.h>
5 #include <api/video/video_sink_interface.h>
9 enum class VideoCodecType
19 using EncodedVideoSinkCallback = std::function<void(
22 VideoCodecType codecType,
26 uint64_t timestampUs)>;
31 class EncodedVideoSink :
public rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>
33 EncodedVideoSinkCallback m_onFrameReceived;
38 void OnFrame(
const webrtc::RecordableEncodedFrame& frame)
override;
Class that sinks frame from a webrtc stream.
Definition: EncodedVideoSink.h:32
EncodedVideoSink(EncodedVideoSinkCallback onFrameReceived)
Construct a VideoSink.
Definition: EncodedVideoSink.cpp:15
void OnFrame(const webrtc::RecordableEncodedFrame &frame) override
Process incoming frames from webrtc.
Definition: EncodedVideoSink.cpp:28