WebRtcVideoEngine: Enable encoded frame sink.
This change ultimately enables wiring up VideoRtpReceiver::OnGenerateKeyFrame
and OnEncodedSinkEnabled into internal::VideoReceiveStream so that encoded
frames can flow to sinks installed in VideoTrackSourceInterface.
Bug: chromium:1013590
Change-Id: I136132c210e5811547f2522ddc371d0acac90664
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161093
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30001}
diff --git a/media/base/media_channel.h b/media/base/media_channel.h
index 696e5f7..be4730e 100644
--- a/media/base/media_channel.h
+++ b/media/base/media_channel.h
@@ -31,6 +31,7 @@
#include "api/video/video_source_interface.h"
#include "api/video/video_timing.h"
#include "api/video_codecs/video_encoder_config.h"
+#include "call/video_receive_stream.h"
#include "common_video/include/quality_limitation_reason.h"
#include "media/base/codec.h"
#include "media/base/delayable.h"
@@ -41,6 +42,7 @@
#include "modules/rtp_rtcp/include/report_block_data.h"
#include "rtc_base/async_packet_socket.h"
#include "rtc_base/buffer.h"
+#include "rtc_base/callback.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/dscp.h"
@@ -897,6 +899,14 @@
virtual void FillBitrateInfo(BandwidthEstimationInfo* bwe_info) = 0;
// Gets quality stats for the channel.
virtual bool GetStats(VideoMediaInfo* info) = 0;
+ // Set recordable encoded frame callback for |ssrc|
+ virtual void SetRecordableEncodedFrameCallback(
+ uint32_t ssrc,
+ std::function<void(const webrtc::RecordableEncodedFrame&)> callback) = 0;
+ // Clear recordable encoded frame callback for |ssrc|
+ virtual void ClearRecordableEncodedFrameCallback(uint32_t ssrc) = 0;
+ // Cause generation of a keyframe for |ssrc|
+ virtual void GenerateKeyFrame(uint32_t ssrc) = 0;
virtual std::vector<webrtc::RtpSource> GetSources(uint32_t ssrc) const = 0;
};