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_VP8_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_VP8_ENCODER_H_ |
6 #define MEDIA_CAST_SENDER_VP8_ENCODER_H_ | 6 #define MEDIA_CAST_SENDER_VP8_ENCODER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 return config_.g_timebase.den != 0; | 46 return config_.g_timebase.den != 0; |
47 } | 47 } |
48 | 48 |
49 // If the |encoder_| is live, attempt reconfiguration to allow it to encode | 49 // If the |encoder_| is live, attempt reconfiguration to allow it to encode |
50 // frames at a new |frame_size|. Otherwise, tear it down and re-create a new | 50 // frames at a new |frame_size|. Otherwise, tear it down and re-create a new |
51 // |encoder_| instance. | 51 // |encoder_| instance. |
52 void ConfigureForNewFrameSize(const gfx::Size& frame_size); | 52 void ConfigureForNewFrameSize(const gfx::Size& frame_size); |
53 | 53 |
54 const VideoSenderConfig cast_config_; | 54 const VideoSenderConfig cast_config_; |
55 | 55 |
56 const double target_deadline_utilization_; | 56 const double target_encoder_utilization_; |
57 | 57 |
58 // VP8 internal objects. These are valid for use only while is_initialized() | 58 // VP8 internal objects. These are valid for use only while is_initialized() |
59 // returns true. | 59 // returns true. |
60 vpx_codec_enc_cfg_t config_; | 60 vpx_codec_enc_cfg_t config_; |
61 vpx_codec_ctx_t encoder_; | 61 vpx_codec_ctx_t encoder_; |
62 | 62 |
63 // Set to true to request the next frame emitted by Vp8Encoder be a key frame. | 63 // Set to true to request the next frame emitted by Vp8Encoder be a key frame. |
64 bool key_frame_requested_; | 64 bool key_frame_requested_; |
65 | 65 |
66 // Saves the current bitrate setting, for when the |encoder_| is reconfigured | 66 // Saves the current bitrate setting, for when the |encoder_| is reconfigured |
(...skipping 21 matching lines...) Expand all Loading... |
88 // The higher the speed, the less CPU usage, and the lower quality. | 88 // The higher the speed, the less CPU usage, and the lower quality. |
89 int encoding_speed_; | 89 int encoding_speed_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(Vp8Encoder); | 91 DISALLOW_COPY_AND_ASSIGN(Vp8Encoder); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace cast | 94 } // namespace cast |
95 } // namespace media | 95 } // namespace media |
96 | 96 |
97 #endif // MEDIA_CAST_SENDER_VP8_ENCODER_H_ | 97 #endif // MEDIA_CAST_SENDER_VP8_ENCODER_H_ |
OLD | NEW |