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

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"
13 #include "base/memory/weak_ptr.h"
11 #include "remoting/protocol/video_stream.h" 14 #include "remoting/protocol/video_stream.h"
12 #include "third_party/webrtc/base/scoped_ref_ptr.h"
13 15
14 namespace webrtc { 16 namespace webrtc {
17 class DesktopSize;
18 class DesktopCapturer;
15 class MediaStreamInterface; 19 class MediaStreamInterface;
16 class PeerConnectionInterface; 20 class PeerConnectionInterface;
21 class PeerConnectionFactoryInterface;
22 class VideoTrackInterface;
17 } // namespace webrtc 23 } // namespace webrtc
18 24
19 namespace remoting { 25 namespace remoting {
20 namespace protocol { 26 namespace protocol {
21 27
28 class WebrtcVideoCapturerAdapter;
29
22 class WebrtcVideoStream : public VideoStream { 30 class WebrtcVideoStream : public VideoStream {
23 public: 31 public:
24 WebrtcVideoStream( 32 WebrtcVideoStream();
25 rtc::scoped_refptr<webrtc::PeerConnectionInterface> connection,
26 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream);
27 ~WebrtcVideoStream() override; 33 ~WebrtcVideoStream() override;
28 34
35 bool Start(scoped_ptr<webrtc::DesktopCapturer> desktop_capturer,
36 scoped_refptr<webrtc::PeerConnectionInterface> connection,
37 scoped_refptr<webrtc::PeerConnectionFactoryInterface>
38 peer_connection_factory);
39
29 // VideoStream interface. 40 // VideoStream interface.
30 void Pause(bool pause) override; 41 void Pause(bool pause) override;
31 void OnInputEventReceived(int64_t event_timestamp) override; 42 void OnInputEventReceived(int64_t event_timestamp) override;
32 void SetLosslessEncode(bool want_lossless) override; 43 void SetLosslessEncode(bool want_lossless) override;
33 void SetLosslessColor(bool want_lossless) override; 44 void SetLosslessColor(bool want_lossless) override;
34 void SetSizeCallback(const SizeCallback& size_callback) override; 45 void SetSizeCallback(const SizeCallback& size_callback) override;
35 46
36 private: 47 private:
37 rtc::scoped_refptr<webrtc::PeerConnectionInterface> connection_; 48 scoped_refptr<webrtc::PeerConnectionInterface> connection_;
38 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream_; 49 scoped_refptr<webrtc::MediaStreamInterface> stream_;
50
51 // Owned by the |stream_|.
52 base::WeakPtr<WebrtcVideoCapturerAdapter> capturer_adapter_;
39 53
40 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream); 54 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream);
41 }; 55 };
42 56
43 } // namespace protocol 57 } // namespace protocol
44 } // namespace remoting 58 } // namespace remoting
45 59
46 #endif // REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ 60 #endif // REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_
OLDNEW
« no previous file with comments | « remoting/protocol/webrtc_video_capturer_adapter.cc ('k') | remoting/protocol/webrtc_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698