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

Unified Diff: webrtc/video/vie_encoder.h

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: Fix build on Win 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
Index: webrtc/video/vie_encoder.h
diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h
index c534b5566caae4b7b5b49cca6bab7e9b0202bad2..5e4bff35d1226cf9beba28128c0729e0f5076b63 100644
--- a/webrtc/video/vie_encoder.h
+++ b/webrtc/video/vie_encoder.h
@@ -21,6 +21,7 @@
#include "webrtc/base/task_queue.h"
#include "webrtc/call.h"
#include "webrtc/common_types.h"
+#include "webrtc/common_video/rotation.h"
#include "webrtc/media/base/videosinkinterface.h"
#include "webrtc/modules/video_coding/include/video_coding_defines.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
@@ -99,11 +100,27 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
private:
class EncodeTask;
- class VideoSourceProxy;
class ConfigureEncoderTask;
mflodman 2016/09/28 13:17:07 Alphabetic order.
perkj_webrtc 2016/09/29 15:05:18 Done.
+ class VideoSourceProxy;
+
+ struct VideoFrameInfo {
+ VideoFrameInfo(int width,
+ int height,
+ VideoRotation rotation,
+ bool is_texture)
+ : width(width),
+ height(height),
+ rotation(rotation),
+ is_texture(is_texture) {}
+ int width;
+ int height;
+ webrtc::VideoRotation rotation;
+ bool is_texture;
+ };
void ConfigureEncoderOnTaskQueue(VideoEncoderConfig config,
size_t max_data_payload_length);
+ void ReconfigureEncoder();
// Implements VideoSinkInterface.
void OnFrame(const VideoFrame& video_frame) override;
@@ -138,7 +155,6 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
const VideoSendStream::Config::EncoderSettings settings_;
const VideoCodecType codec_type_;
- const std::unique_ptr<VideoProcessing> vp_;
vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_);
OveruseFrameDetector overuse_detector_ ACCESS_ON(&encoder_queue_);
@@ -159,6 +175,11 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
std::unique_ptr<SimulcastRateAllocator> rate_allocator_
ACCESS_ON(&encoder_queue_);
+ // Set when ConfigureEncoder has been called in order to lazy reconfigure the
+ // encoder on the next frame.
+ bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_);
+ rtc::Optional<VideoFrameInfo> last_frame_info_ ACCESS_ON(&encoder_queue_);
+
uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_);
size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_);
uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_);

Powered by Google App Engine
This is Rietveld 408576698