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

Unified Diff: webrtc/video/video_send_stream.h

Issue 1896413002: Reland of Initialize/configure video encoders asychronously. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase2 Created 4 years, 8 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_quality_test.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.h
diff --git a/webrtc/video/video_send_stream.h b/webrtc/video/video_send_stream.h
index 688e8fc60f979a2454dbd181dd56ce6f78e5ffe2..e52106cefd1ae2601c9573696e38789b7ae4b542 100644
--- a/webrtc/video/video_send_stream.h
+++ b/webrtc/video/video_send_stream.h
@@ -15,6 +15,7 @@
#include <vector>
#include "webrtc/call/bitrate_allocator.h"
+#include "webrtc/base/criticalsection.h"
#include "webrtc/call.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/video/encoded_frame_callback_adapter.h"
@@ -90,6 +91,10 @@ class VideoSendStream : public webrtc::VideoSendStream,
uint32_t* sent_fec_rate_bps) override;
private:
+ struct EncoderSettings {
+ VideoCodec video_codec;
+ int min_transmit_bitrate_bps;
+ };
static bool EncoderThreadFunction(void* obj);
void EncoderProcess();
@@ -110,6 +115,9 @@ class VideoSendStream : public webrtc::VideoSendStream,
rtc::PlatformThread encoder_thread_;
rtc::Event encoder_wakeup_event_;
volatile int stop_encoder_thread_;
+ rtc::CriticalSection encoder_settings_crit_;
+ rtc::Optional<EncoderSettings> pending_encoder_settings_
+ GUARDED_BY(encoder_settings_crit_);
OveruseFrameDetector overuse_detector_;
EncoderStateFeedback encoder_feedback_;
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698