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

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

Issue 1571543002: Implement missing features in WebrtcVideoStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
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 "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
11 #include "remoting/protocol/video_stream.h" 13 #include "remoting/protocol/video_stream.h"
12 #include "third_party/webrtc/base/scoped_ref_ptr.h"
13 14
14 namespace webrtc { 15 namespace webrtc {
16 class DesktopSize;
17 class DesktopCapturer;
15 class MediaStreamInterface; 18 class MediaStreamInterface;
16 class PeerConnectionInterface; 19 class PeerConnectionInterface;
20 class PeerConnectionFactoryInterface;
21 class VideoTrackInterface;
17 } // namespace webrtc 22 } // namespace webrtc
18 23
19 namespace remoting { 24 namespace remoting {
20 namespace protocol { 25 namespace protocol {
21 26
27 class WebrtcVideoCapturerAdapter;
28
22 class WebrtcVideoStream : public VideoStream { 29 class WebrtcVideoStream : public VideoStream {
23 public: 30 public:
24 WebrtcVideoStream( 31 WebrtcVideoStream();
25 rtc::scoped_refptr<webrtc::PeerConnectionInterface> connection,
26 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream);
27 ~WebrtcVideoStream() override; 32 ~WebrtcVideoStream() override;
28 33
34 bool Start(scoped_ptr<webrtc::DesktopCapturer> desktop_capturer,
35 scoped_refptr<webrtc::PeerConnectionInterface> connection,
36 scoped_refptr<webrtc::PeerConnectionFactoryInterface>
37 peer_connection_factory);
38
29 // VideoStream interface. 39 // VideoStream interface.
30 void Pause(bool pause) override; 40 void Pause(bool pause) override;
31 void OnInputEventReceived(int64_t event_timestamp) override; 41 void OnInputEventReceived(int64_t event_timestamp) override;
32 void SetLosslessEncode(bool want_lossless) override; 42 void SetLosslessEncode(bool want_lossless) override;
33 void SetLosslessColor(bool want_lossless) override; 43 void SetLosslessColor(bool want_lossless) override;
34 void SetSizeCallback(const SizeCallback& size_callback) override; 44 void SetSizeCallback(const SizeCallback& size_callback) override;
35 45
36 private: 46 private:
37 rtc::scoped_refptr<webrtc::PeerConnectionInterface> connection_; 47 WebrtcVideoCapturerAdapter* capturer_adapter();
38 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream_; 48
49 scoped_refptr<webrtc::PeerConnectionInterface> connection_;
50 scoped_refptr<webrtc::MediaStreamInterface> stream_;
51 scoped_refptr<webrtc::VideoTrackInterface> video_track_;
39 52
40 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream); 53 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream);
41 }; 54 };
42 55
43 } // namespace protocol 56 } // namespace protocol
44 } // namespace remoting 57 } // namespace remoting
45 58
46 #endif // REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ 59 #endif // REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698