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(); | |
81 | 80 |
82 // Settings used in the last InitEncode call and used if a dynamic fallback to | 81 // Settings used in the last InitEncode call and used if a dynamic fallback to |
83 // software is required. | 82 // software is required. |
84 VideoCodec codec_settings_; | 83 VideoCodec codec_settings_; |
85 int32_t number_of_cores_; | 84 int32_t number_of_cores_; |
86 size_t max_payload_size_; | 85 size_t max_payload_size_; |
87 | 86 |
88 // The last bitrate/framerate set, and a flag for noting they are set. | 87 // The last bitrate/framerate set, and a flag for noting they are set. |
89 bool rates_set_; | 88 bool rates_set_; |
90 BitrateAllocation bitrate_allocation_; | 89 BitrateAllocation bitrate_allocation_; |
91 uint32_t framerate_; | 90 uint32_t framerate_; |
92 | 91 |
93 // The last channel parameters set, and a flag for noting they are set. | 92 // The last channel parameters set, and a flag for noting they are set. |
94 bool channel_parameters_set_; | 93 bool channel_parameters_set_; |
95 uint32_t packet_loss_; | 94 uint32_t packet_loss_; |
96 int64_t rtt_; | 95 int64_t rtt_; |
97 | 96 |
98 cricket::VideoCodec codec_; | 97 const cricket::VideoCodec codec_; |
99 webrtc::VideoEncoder* const encoder_; | 98 webrtc::VideoEncoder* const encoder_; |
100 | 99 |
101 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; | 100 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; |
102 std::string fallback_implementation_name_; | 101 std::string fallback_implementation_name_; |
103 EncodedImageCallback* callback_; | 102 EncodedImageCallback* callback_; |
104 | 103 |
105 bool forced_fallback_possible_; | 104 bool forced_fallback_possible_; |
106 ForcedFallbackParams forced_fallback_; | 105 ForcedFallbackParams forced_fallback_; |
107 }; | 106 }; |
108 | 107 |
109 } // namespace webrtc | 108 } // namespace webrtc |
110 | 109 |
111 #endif // WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ | 110 #endif // WEBRTC_MEDIA_ENGINE_VIDEOENCODERSOFTWAREFALLBACKWRAPPER_H_ |
OLD | NEW |