| 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 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 namespace cast { | 13 namespace cast { |
| 14 | 14 |
| 15 class FakeSoftwareVideoEncoder : public SoftwareVideoEncoder { | 15 class FakeSoftwareVideoEncoder : public SoftwareVideoEncoder { |
| 16 public: | 16 public: |
| 17 FakeSoftwareVideoEncoder(const VideoSenderConfig& video_config); | 17 FakeSoftwareVideoEncoder(const VideoSenderConfig& video_config); |
| 18 ~FakeSoftwareVideoEncoder() final; | 18 ~FakeSoftwareVideoEncoder() final; |
| 19 | 19 |
| 20 // SoftwareVideoEncoder implementations. | 20 // SoftwareVideoEncoder implementations. |
| 21 void Initialize() final; | 21 void Initialize() final; |
| 22 void Encode(const scoped_refptr<media::VideoFrame>& video_frame, | 22 void Encode(const scoped_refptr<media::VideoFrame>& video_frame, |
| 23 const base::TimeTicks& reference_time, | 23 const base::TimeTicks& reference_time, |
| 24 SenderEncodedFrame* encoded_frame) final; | 24 SenderEncodedFrame* encoded_frame) final; |
| 25 void UpdateRates(uint32 new_bitrate) final; | 25 void UpdateRates(uint32_t new_bitrate) final; |
| 26 void GenerateKeyFrame() final; | 26 void GenerateKeyFrame() final; |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 VideoSenderConfig video_config_; | 29 VideoSenderConfig video_config_; |
| 30 gfx::Size last_frame_size_; | 30 gfx::Size last_frame_size_; |
| 31 bool next_frame_is_key_; | 31 bool next_frame_is_key_; |
| 32 uint32 frame_id_; | 32 uint32_t frame_id_; |
| 33 int frame_size_; | 33 int frame_size_; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace cast | 36 } // namespace cast |
| 37 } // namespace media | 37 } // namespace media |
| 38 | 38 |
| 39 #endif // MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ | 39 #endif // MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ |
| OLD | NEW |