Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: webrtc/video/vie_encoder.h

Issue 2338133003: Let ViEEncoder tell VideoSendStream about reconfigurations. (Closed)
Patch Set: Rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video/vie_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_encoder.h
diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h
index eaf2536daba341b07adc8c99badeb6641bba8eab..15fd9cfa58c1ccd1cd373b23ab9b5d463be44bdf 100644
--- a/webrtc/video/vie_encoder.h
+++ b/webrtc/video/vie_encoder.h
@@ -49,6 +49,15 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
public VCMSendStatisticsCallback,
public CpuOveruseObserver {
public:
+ // Interface for receiving encoded video frames and notifications about
+ // configuration changes.
+ class EncoderSink : public EncodedImageCallback {
+ public:
+ virtual void OnEncoderConfigurationChanged(
+ std::vector<VideoStream> streams,
+ int min_transmit_bitrate_bps) = 0;
+ };
+
ViEEncoder(uint32_t number_of_cores,
SendStatisticsProxy* stats_proxy,
const webrtc::VideoSendStream::Config::EncoderSettings& settings,
@@ -64,12 +73,12 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
void DeRegisterProcessThread();
void SetSource(rtc::VideoSourceInterface<VideoFrame>* source);
- void SetSink(EncodedImageCallback* sink);
+ void SetSink(EncoderSink* sink);
// TODO(perkj): Can we remove VideoCodec.startBitrate ?
void SetStartBitrate(int start_bitrate_bps);
- void ConfigureEncoder(const VideoEncoderConfig& config,
+ void ConfigureEncoder(VideoEncoderConfig config,
size_t max_data_payload_length);
// Permanently stop encoding. After this method has returned, it is
@@ -92,7 +101,9 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
class VideoSourceProxy;
void ConfigureEncoderInternal(const VideoCodec& video_codec,
- size_t max_data_payload_length);
+ size_t max_data_payload_length,
+ std::vector<VideoStream> stream,
+ int min_transmit_bitrate);
// Implements VideoSinkInterface.
void OnFrame(const VideoFrame& video_frame) override;
@@ -123,7 +134,7 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
const uint32_t number_of_cores_;
const std::unique_ptr<VideoSourceProxy> source_proxy_;
- EncodedImageCallback* sink_;
+ EncoderSink* sink_;
const VideoSendStream::Config::EncoderSettings settings_;
const std::unique_ptr<VideoProcessing> vp_;
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698