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

Side by Side Diff: remoting/codec/video_encoder_helper.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
« no previous file with comments | « remoting/codec/video_encoder.h ('k') | remoting/codec/video_encoder_helper.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CODEC_VIDEO_ENCODER_HELPER_H_ 5 #ifndef REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_
6 #define REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_ 6 #define REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
11 12
12 namespace webrtc { 13 namespace webrtc {
13 class DesktopFrame; 14 class DesktopFrame;
14 class DesktopRegion; 15 class DesktopRegion;
15 } 16 }
16 17
17 namespace remoting { 18 namespace remoting {
18 19
19 class VideoPacket; 20 class VideoPacket;
20 21
21 class VideoEncoderHelper { 22 class VideoEncoderHelper {
22 public: 23 public:
23 VideoEncoderHelper(); 24 VideoEncoderHelper();
24 25
25 // Returns a new VideoPacket with common fields (e.g. capture_time_ms, rects 26 // Returns a new VideoPacket with common fields (e.g. capture_time_ms, rects
26 // list, frame shape if any) initialized based on the supplied |frame|. 27 // list, frame shape if any) initialized based on the supplied |frame|.
27 // Screen width and height will be set iff |frame|'s size differs from that 28 // Screen width and height will be set iff |frame|'s size differs from that
28 // of the previously-supplied frame. 29 // of the previously-supplied frame.
29 scoped_ptr<VideoPacket> CreateVideoPacket(const webrtc::DesktopFrame& frame); 30 std::unique_ptr<VideoPacket> CreateVideoPacket(
31 const webrtc::DesktopFrame& frame);
30 32
31 // Returns a new VideoPacket with the common fields populated from |frame|, 33 // Returns a new VideoPacket with the common fields populated from |frame|,
32 // but the updated rects overridden by |updated_region|. This is useful for 34 // but the updated rects overridden by |updated_region|. This is useful for
33 // encoders which alter the updated region e.g. by expanding it to macroblock 35 // encoders which alter the updated region e.g. by expanding it to macroblock
34 // boundaries. 36 // boundaries.
35 scoped_ptr<VideoPacket> CreateVideoPacketWithUpdatedRegion( 37 std::unique_ptr<VideoPacket> CreateVideoPacketWithUpdatedRegion(
36 const webrtc::DesktopFrame& frame, 38 const webrtc::DesktopFrame& frame,
37 const webrtc::DesktopRegion& updated_region); 39 const webrtc::DesktopRegion& updated_region);
40
38 private: 41 private:
39 // The most recent screen size. Used to detect screen size changes. 42 // The most recent screen size. Used to detect screen size changes.
40 webrtc::DesktopSize screen_size_; 43 webrtc::DesktopSize screen_size_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(VideoEncoderHelper); 45 DISALLOW_COPY_AND_ASSIGN(VideoEncoderHelper);
43 }; 46 };
44 47
45 } // namespace remoting 48 } // namespace remoting
46 49
47 #endif // REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_ 50 #endif // REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_
OLDNEW
« no previous file with comments | « remoting/codec/video_encoder.h ('k') | remoting/codec/video_encoder_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698