OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VPX_H_ | 5 #ifndef REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ |
6 #define REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ | 6 #define REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "remoting/codec/scoped_vpx_codec.h" | 10 #include "remoting/codec/scoped_vpx_codec.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class VideoEncoderVpx : public VideoEncoder { | 23 class VideoEncoderVpx : public VideoEncoder { |
24 public: | 24 public: |
25 // Create encoder for the specified protocol. | 25 // Create encoder for the specified protocol. |
26 static scoped_ptr<VideoEncoderVpx> CreateForVP8(); | 26 static scoped_ptr<VideoEncoderVpx> CreateForVP8(); |
27 static scoped_ptr<VideoEncoderVpx> CreateForVP9(); | 27 static scoped_ptr<VideoEncoderVpx> CreateForVP9(); |
28 | 28 |
29 virtual ~VideoEncoderVpx(); | 29 virtual ~VideoEncoderVpx(); |
30 | 30 |
31 // VideoEncoder interface. | 31 // VideoEncoder interface. |
32 virtual void SetLosslessEncode(bool want_lossless) OVERRIDE; | 32 virtual void SetLosslessEncode(bool want_lossless) override; |
33 virtual void SetLosslessColor(bool want_lossless) OVERRIDE; | 33 virtual void SetLosslessColor(bool want_lossless) override; |
34 virtual scoped_ptr<VideoPacket> Encode( | 34 virtual scoped_ptr<VideoPacket> Encode( |
35 const webrtc::DesktopFrame& frame) OVERRIDE; | 35 const webrtc::DesktopFrame& frame) override; |
36 | 36 |
37 private: | 37 private: |
38 explicit VideoEncoderVpx(bool use_vp9); | 38 explicit VideoEncoderVpx(bool use_vp9); |
39 | 39 |
40 // Initializes the codec for frames of |size|. Returns true if successful. | 40 // Initializes the codec for frames of |size|. Returns true if successful. |
41 bool Initialize(const webrtc::DesktopSize& size); | 41 bool Initialize(const webrtc::DesktopSize& size); |
42 | 42 |
43 // Prepares |image_| for encoding. Writes updated rectangles into | 43 // Prepares |image_| for encoding. Writes updated rectangles into |
44 // |updated_region|. | 44 // |updated_region|. |
45 void PrepareImage(const webrtc::DesktopFrame& frame, | 45 void PrepareImage(const webrtc::DesktopFrame& frame, |
(...skipping 25 matching lines...) Expand all Loading... |
71 | 71 |
72 // Used to help initialize VideoPackets from DesktopFrames. | 72 // Used to help initialize VideoPackets from DesktopFrames. |
73 VideoEncoderHelper helper_; | 73 VideoEncoderHelper helper_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx); | 75 DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace remoting | 78 } // namespace remoting |
79 | 79 |
80 #endif // REMOTING_CODEC_VIDEO_ENCODER_VP8_H_ | 80 #endif // REMOTING_CODEC_VIDEO_ENCODER_VP8_H_ |
OLD | NEW |