OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 int64_t min_low_ms = 10000; | 70 int64_t min_low_ms = 10000; |
71 const int kMaxPixelsStart = 320 * 240; | 71 const int kMaxPixelsStart = 320 * 240; |
72 const int kMinPixelsStop = 320 * 180; | 72 const int kMinPixelsStop = 320 * 180; |
73 }; | 73 }; |
74 | 74 |
75 bool RequestForcedFallback(); | 75 bool RequestForcedFallback(); |
76 bool TryReleaseForcedFallbackEncoder(); | 76 bool TryReleaseForcedFallbackEncoder(); |
77 bool TryReInitForcedFallbackEncoder(); | 77 bool TryReInitForcedFallbackEncoder(); |
78 void ValidateSettingsForForcedFallback(); | 78 void ValidateSettingsForForcedFallback(); |
79 bool IsForcedFallbackActive() const; | 79 bool IsForcedFallbackActive() const; |
| 80 void MaybeModifyCodecForFallback(); |
80 | 81 |
81 // Settings used in the last InitEncode call and used if a dynamic fallback to | 82 // Settings used in the last InitEncode call and used if a dynamic fallback to |
82 // software is required. | 83 // software is required. |
83 VideoCodec codec_settings_; | 84 VideoCodec codec_settings_; |
84 int32_t number_of_cores_; | 85 int32_t number_of_cores_; |
85 size_t max_payload_size_; | 86 size_t max_payload_size_; |
86 | 87 |
87 // The last bitrate/framerate set, and a flag for noting they are set. | 88 // The last bitrate/framerate set, and a flag for noting they are set. |
88 bool rates_set_; | 89 bool rates_set_; |
89 BitrateAllocation bitrate_allocation_; | 90 BitrateAllocation bitrate_allocation_; |
90 uint32_t framerate_; | 91 uint32_t framerate_; |
91 | 92 |
92 // The last channel parameters set, and a flag for noting they are set. | 93 // The last channel parameters set, and a flag for noting they are set. |
93 bool channel_parameters_set_; | 94 bool channel_parameters_set_; |
94 uint32_t packet_loss_; | 95 uint32_t packet_loss_; |
95 int64_t rtt_; | 96 int64_t rtt_; |
96 | 97 |
97 const cricket::VideoCodec codec_; | 98 cricket::VideoCodec codec_; |
98 webrtc::VideoEncoder* const encoder_; | 99 webrtc::VideoEncoder* const encoder_; |
99 | 100 |
100 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; | 101 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; |
101 std::string fallback_implementation_name_; | 102 std::string fallback_implementation_name_; |
102 EncodedImageCallback* callback_; | 103 EncodedImageCallback* callback_; |
103 | 104 |
104 bool forced_fallback_possible_; | 105 bool forced_fallback_possible_; |
105 ForcedFallbackParams forced_fallback_; | 106 ForcedFallbackParams forced_fallback_; |
106 }; | 107 }; |
107 | 108 |
108 } // namespace webrtc | 109 } // namespace webrtc |
109 | 110 |
110 #endif // WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ | 111 #endif // WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ |
OLD | NEW |