OLD | NEW |
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 MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ |
6 #define MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ | 6 #define MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ |
7 | 7 |
8 #include "media/cast/cast_config.h" | 8 #include "media/cast/cast_config.h" |
9 #include "media/cast/sender/software_video_encoder.h" | 9 #include "media/cast/sender/software_video_encoder.h" |
10 | 10 |
11 namespace media { | 11 namespace media { |
12 namespace cast { | 12 namespace cast { |
13 | 13 |
14 class FakeSoftwareVideoEncoder : public SoftwareVideoEncoder { | 14 class FakeSoftwareVideoEncoder : public SoftwareVideoEncoder { |
15 public: | 15 public: |
16 FakeSoftwareVideoEncoder(const VideoSenderConfig& video_config); | 16 FakeSoftwareVideoEncoder(const VideoSenderConfig& video_config); |
17 virtual ~FakeSoftwareVideoEncoder(); | 17 virtual ~FakeSoftwareVideoEncoder(); |
18 | 18 |
19 // SoftwareVideoEncoder implementations. | 19 // SoftwareVideoEncoder implementations. |
20 virtual void Initialize() OVERRIDE; | 20 virtual void Initialize() override; |
21 virtual bool Encode(const scoped_refptr<media::VideoFrame>& video_frame, | 21 virtual bool Encode(const scoped_refptr<media::VideoFrame>& video_frame, |
22 EncodedFrame* encoded_image) OVERRIDE; | 22 EncodedFrame* encoded_image) override; |
23 virtual void UpdateRates(uint32 new_bitrate) OVERRIDE; | 23 virtual void UpdateRates(uint32 new_bitrate) override; |
24 virtual void GenerateKeyFrame() OVERRIDE; | 24 virtual void GenerateKeyFrame() override; |
25 virtual void LatestFrameIdToReference(uint32 frame_id) OVERRIDE; | 25 virtual void LatestFrameIdToReference(uint32 frame_id) override; |
26 | 26 |
27 private: | 27 private: |
28 VideoSenderConfig video_config_; | 28 VideoSenderConfig video_config_; |
29 bool next_frame_is_key_; | 29 bool next_frame_is_key_; |
30 uint32 frame_id_; | 30 uint32 frame_id_; |
31 uint32 frame_id_to_reference_; | 31 uint32 frame_id_to_reference_; |
32 int frame_size_; | 32 int frame_size_; |
33 }; | 33 }; |
34 | 34 |
35 } // namespace cast | 35 } // namespace cast |
36 } // namespace media | 36 } // namespace media |
37 | 37 |
38 #endif // MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ | 38 #endif // MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ |
OLD | NEW |