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

Side by Side Diff: media/cast/sender/fake_software_video_encoder.h

Issue 2113783002: Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 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 FrameSenderConfig video_config_;
miu 2016/06/30 21:59:43 const please.
xjz 2016/07/01 23:52:09 Done.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698