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

Unified Diff: webrtc/video/video_capture_input.h

Issue 1600973002: Initialize VideoEncoder objects asynchronously. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rename new_codec_settings Created 4 years, 11 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/payload_router_unittest.cc ('k') | webrtc/video/video_capture_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_capture_input.h
diff --git a/webrtc/video/video_capture_input.h b/webrtc/video/video_capture_input.h
index d44907cd0ee83270f15aed1ae3d18969f20854bb..7d3cc7dfaba270406a23312c2ca6edff7f6a4f08 100644
--- a/webrtc/video/video_capture_input.h
+++ b/webrtc/video/video_capture_input.h
@@ -15,6 +15,7 @@
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/event.h"
+#include "webrtc/base/optional.h"
#include "webrtc/base/platform_thread.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
@@ -38,6 +39,7 @@ class OveruseFrameDetector;
class ProcessThread;
class RegistrableCpuOveruseMetricsObserver;
class SendStatisticsProxy;
+class VideoCodingModule;
class VideoRenderer;
class VideoCaptureCallback {
@@ -48,17 +50,21 @@ class VideoCaptureCallback {
};
namespace internal {
+
+class VideoSendStream;
class VideoCaptureInput : public webrtc::VideoCaptureInput {
public:
VideoCaptureInput(ProcessThread* module_process_thread,
VideoCaptureCallback* frame_callback,
- VideoRenderer* local_renderer,
+ VideoCodingModule* vcm,
+ VideoSendStream* video_send_stream,
+ const webrtc::VideoSendStream::Config& config,
SendStatisticsProxy* send_stats_proxy,
- CpuOveruseObserver* overuse_observer,
- EncodingTimeObserver* encoding_time_observer);
+ CpuOveruseObserver* overuse_observer);
~VideoCaptureInput();
void IncomingCapturedFrame(const VideoFrame& video_frame) override;
+ void TriggerSetSendCodec(const VideoCodec& video_codec);
private:
// Thread functions for deliver captured frames to receivers.
@@ -69,26 +75,25 @@ class VideoCaptureInput : public webrtc::VideoCaptureInput {
ProcessThread* const module_process_thread_;
VideoCaptureCallback* const frame_callback_;
- VideoRenderer* const local_renderer_;
+ VideoCodingModule* const vcm_;
+ VideoSendStream* const video_send_stream_;
+ const webrtc::VideoSendStream::Config config_;
+ bool encoder_registered_;
SendStatisticsProxy* const stats_proxy_;
- // Frame used in IncomingFrameI420.
- rtc::scoped_ptr<CriticalSectionWrapper> incoming_frame_cs_;
- VideoFrame incoming_frame_;
-
rtc::PlatformThread encoder_thread_;
rtc::Event capture_event_;
volatile int stop_;
- VideoFrame captured_frame_ GUARDED_BY(capture_cs_.get());
+ rtc::Optional<VideoCodec> replacement_codec_settings_ GUARDED_BY(capture_cs_);
+ VideoFrame captured_frame_ GUARDED_BY(capture_cs_);
// Used to make sure incoming time stamp is increasing for every frame.
int64_t last_captured_timestamp_;
// Delta used for translating between NTP and internal timestamps.
const int64_t delta_ntp_internal_ms_;
rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_;
- EncodingTimeObserver* const encoding_time_observer_;
};
} // namespace internal
« no previous file with comments | « webrtc/video/payload_router_unittest.cc ('k') | webrtc/video/video_capture_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698