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

Unified Diff: webrtc/video/video_send_stream.h

Issue 1757313002: Initialize/configure video encoders asychronously. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/video_send_stream.h
diff --git a/webrtc/video/video_send_stream.h b/webrtc/video/video_send_stream.h
index 88d8abc4fb647d7c49940bbc48e627b1ef6a6592..dd11d16b1a99a4db77026cbfee8039a9a382d760 100644
--- a/webrtc/video/video_send_stream.h
+++ b/webrtc/video/video_send_stream.h
@@ -14,6 +14,7 @@
#include <map>
#include <vector>
+#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"
@@ -75,6 +76,10 @@ class VideoSendStream : public webrtc::VideoSendStream,
int GetPaddingNeededBps() const;
private:
+ struct EncoderSettings {
+ VideoCodec video_codec;
+ int min_transmit_bitrate_bps;
+ };
static bool EncoderThreadFunction(void* obj);
void EncoderProcess();
@@ -93,6 +98,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_;
PayloadRouter payload_router_;

Powered by Google App Engine
This is Rietveld 408576698