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

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

Issue 892383002: RELAND: [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for 'access to uninitialized memory' error. Created 5 years, 10 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 "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 11
11 namespace media { 12 namespace media {
12 namespace cast { 13 namespace cast {
13 14
14 class FakeSoftwareVideoEncoder : public SoftwareVideoEncoder { 15 class FakeSoftwareVideoEncoder : public SoftwareVideoEncoder {
15 public: 16 public:
16 FakeSoftwareVideoEncoder(const VideoSenderConfig& video_config); 17 FakeSoftwareVideoEncoder(const VideoSenderConfig& video_config);
17 ~FakeSoftwareVideoEncoder() override; 18 ~FakeSoftwareVideoEncoder() override;
18 19
19 // SoftwareVideoEncoder implementations. 20 // SoftwareVideoEncoder implementations.
20 void Initialize() override; 21 void Initialize() override;
21 void Encode(const scoped_refptr<media::VideoFrame>& video_frame, 22 void Encode(const scoped_refptr<media::VideoFrame>& video_frame,
22 const base::TimeTicks& reference_time, 23 const base::TimeTicks& reference_time,
23 EncodedFrame* encoded_frame) override; 24 EncodedFrame* encoded_frame) override;
24 void UpdateRates(uint32 new_bitrate) override; 25 void UpdateRates(uint32 new_bitrate) override;
25 void GenerateKeyFrame() override; 26 void GenerateKeyFrame() override;
26 void LatestFrameIdToReference(uint32 frame_id) override; 27 void LatestFrameIdToReference(uint32 frame_id) override;
27 28
28 private: 29 private:
29 VideoSenderConfig video_config_; 30 VideoSenderConfig video_config_;
31 gfx::Size last_frame_size_;
30 bool next_frame_is_key_; 32 bool next_frame_is_key_;
31 uint32 frame_id_; 33 uint32 frame_id_;
32 uint32 frame_id_to_reference_; 34 uint32 frame_id_to_reference_;
33 int frame_size_; 35 int frame_size_;
34 }; 36 };
35 37
36 } // namespace cast 38 } // namespace cast
37 } // namespace media 39 } // namespace media
38 40
39 #endif // MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_ 41 #endif // MEDIA_CAST_SENDER_FAKE_SOFTWARE_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « media/cast/sender/external_video_encoder.cc ('k') | media/cast/sender/fake_software_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698