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

Unified Diff: remoting/protocol/webrtc_video_stream.h

Issue 2329653002: Add WebrtcVideoEncoder interface (Closed)
Patch Set: 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
« no previous file with comments | « remoting/protocol/webrtc_video_encoder_factory.cc ('k') | remoting/protocol/webrtc_video_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_video_stream.h
diff --git a/remoting/protocol/webrtc_video_stream.h b/remoting/protocol/webrtc_video_stream.h
index a400c737524e111f2def233a7add622169e79be4..fa1022b4c649ecfe95b5211f6cf5c006f1aa8948 100644
--- a/remoting/protocol/webrtc_video_stream.h
+++ b/remoting/protocol/webrtc_video_stream.h
@@ -15,7 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "base/timer/timer.h"
-#include "remoting/codec/video_encoder.h"
+#include "remoting/codec/webrtc_video_encoder.h"
#include "remoting/protocol/host_video_stats_dispatcher.h"
#include "remoting/protocol/video_stream.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
@@ -41,11 +41,9 @@ class WebrtcVideoStream : public VideoStream,
WebrtcVideoStream();
~WebrtcVideoStream() override;
- bool Start(
- std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer,
- WebrtcTransport* webrtc_transport,
- scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
- std::unique_ptr<VideoEncoder> video_encoder);
+ bool Start(std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer,
+ WebrtcTransport* webrtc_transport,
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner);
// VideoStream interface.
void Pause(bool pause) override;
@@ -74,11 +72,10 @@ class WebrtcVideoStream : public VideoStream,
// Task running on the encoder thread to encode the |frame|.
static EncodedFrameWithTimestamps EncodeFrame(
- VideoEncoder* encoder,
+ WebrtcVideoEncoder* encoder,
std::unique_ptr<webrtc::DesktopFrame> frame,
- std::unique_ptr<WebrtcVideoStream::FrameTimestamps> timestamps,
- uint32_t target_bitrate_kbps,
- bool key_frame_request);
+ WebrtcVideoEncoder::FrameParams params,
+ std::unique_ptr<WebrtcVideoStream::FrameTimestamps> timestamps);
void OnFrameEncoded(EncodedFrameWithTimestamps frame);
void SetKeyFrameRequest();
@@ -92,7 +89,7 @@ class WebrtcVideoStream : public VideoStream,
// Task runner used to run |encoder_|.
scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
// Used to encode captured frames. Always accessed on the encode thread.
- std::unique_ptr<VideoEncoder> encoder_;
+ std::unique_ptr<WebrtcVideoEncoder> encoder_;
scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
scoped_refptr<webrtc::MediaStreamInterface> stream_;
« no previous file with comments | « remoting/protocol/webrtc_video_encoder_factory.cc ('k') | remoting/protocol/webrtc_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698