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

Side by Side Diff: remoting/protocol/webrtc_video_stream.h

Issue 2782523003: [Remoting Host] Supporting WebRTC VP9 streaming (Closed)
Patch Set: Fix Feedback Created 3 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/webrtc_transport.cc ('k') | remoting/protocol/webrtc_video_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_
6 #define REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
18 #include "remoting/codec/webrtc_video_encoder.h" 18 #include "remoting/codec/webrtc_video_encoder.h"
19 #include "remoting/protocol/host_video_stats_dispatcher.h" 19 #include "remoting/protocol/host_video_stats_dispatcher.h"
20 #include "remoting/protocol/video_stream.h" 20 #include "remoting/protocol/video_stream.h"
21 #include "third_party/webrtc/common_types.h"
21 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" 22 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 class MediaStreamInterface; 25 class MediaStreamInterface;
25 class PeerConnectionInterface; 26 class PeerConnectionInterface;
26 } // namespace webrtc 27 } // namespace webrtc
27 28
28 namespace remoting { 29 namespace remoting {
29 namespace protocol { 30 namespace protocol {
30 31
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void CaptureNextFrame(); 68 void CaptureNextFrame();
68 69
69 // Task running on the encoder thread to encode the |frame|. 70 // Task running on the encoder thread to encode the |frame|.
70 static EncodedFrameWithStats EncodeFrame( 71 static EncodedFrameWithStats EncodeFrame(
71 WebrtcVideoEncoder* encoder, 72 WebrtcVideoEncoder* encoder,
72 std::unique_ptr<webrtc::DesktopFrame> frame, 73 std::unique_ptr<webrtc::DesktopFrame> frame,
73 WebrtcVideoEncoder::FrameParams params, 74 WebrtcVideoEncoder::FrameParams params,
74 std::unique_ptr<WebrtcVideoStream::FrameStats> stats); 75 std::unique_ptr<WebrtcVideoStream::FrameStats> stats);
75 void OnFrameEncoded(EncodedFrameWithStats frame); 76 void OnFrameEncoded(EncodedFrameWithStats frame);
76 77
78 void OnEncoderCreated(webrtc::VideoCodecType codec_type);
79
77 // Capturer used to capture the screen. 80 // Capturer used to capture the screen.
78 std::unique_ptr<webrtc::DesktopCapturer> capturer_; 81 std::unique_ptr<webrtc::DesktopCapturer> capturer_;
79 // Used to send across encoded frames. 82 // Used to send across encoded frames.
80 WebrtcTransport* webrtc_transport_ = nullptr; 83 WebrtcTransport* webrtc_transport_ = nullptr;
81 // Task runner used to run |encoder_|. 84 // Task runner used to run |encoder_|.
82 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_; 85 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
83 // Used to encode captured frames. Always accessed on the encode thread. 86 // Used to encode captured frames. Always accessed on the encode thread.
84 std::unique_ptr<WebrtcVideoEncoder> encoder_; 87 std::unique_ptr<WebrtcVideoEncoder> encoder_;
85 88
86 scoped_refptr<InputEventTimestampsSource> event_timestamps_source_; 89 scoped_refptr<InputEventTimestampsSource> event_timestamps_source_;
(...skipping 16 matching lines...) Expand all
103 106
104 base::WeakPtrFactory<WebrtcVideoStream> weak_factory_; 107 base::WeakPtrFactory<WebrtcVideoStream> weak_factory_;
105 108
106 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream); 109 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream);
107 }; 110 };
108 111
109 } // namespace protocol 112 } // namespace protocol
110 } // namespace remoting 113 } // namespace remoting
111 114
112 #endif // REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ 115 #endif // REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_
OLDNEW
« no previous file with comments | « remoting/protocol/webrtc_transport.cc ('k') | remoting/protocol/webrtc_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698