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

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

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

Powered by Google App Engine
This is Rietveld 408576698