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