OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 private: | 144 private: |
145 typedef std::map<uint8_t, VCMDecoderMapItem*> DecoderMap; | 145 typedef std::map<uint8_t, VCMDecoderMapItem*> DecoderMap; |
146 typedef std::map<uint8_t, VCMExtDecoderMapItem*> ExternalDecoderMap; | 146 typedef std::map<uint8_t, VCMExtDecoderMapItem*> ExternalDecoderMap; |
147 | 147 |
148 VCMGenericDecoder* CreateAndInitDecoder(uint8_t payload_type, | 148 VCMGenericDecoder* CreateAndInitDecoder(uint8_t payload_type, |
149 VideoCodec* new_codec) const; | 149 VideoCodec* new_codec) const; |
150 | 150 |
151 // Determines whether a new codec has to be created or not. | 151 // Determines whether a new codec has to be created or not. |
152 // Checks every setting apart from maxFramerate and startBitrate. | 152 // Checks every setting apart from maxFramerate and startBitrate. |
153 bool RequiresEncoderReset(const VideoCodec& send_codec); | 153 bool RequiresEncoderReset(const VideoCodec& send_codec); |
154 // Create an internal encoder given a codec type. | |
155 VCMGenericEncoder* CreateEncoder(const VideoCodecType type) const; | |
156 | 154 |
157 void DeleteEncoder(); | 155 void DeleteEncoder(); |
158 | 156 |
159 // Create an internal Decoder given a codec type | 157 // Create an internal Decoder given a codec type |
160 VCMGenericDecoder* CreateDecoder(VideoCodecType type) const; | 158 VCMGenericDecoder* CreateDecoder(VideoCodecType type) const; |
161 | 159 |
162 const VCMDecoderMapItem* FindDecoderItem(uint8_t payload_type) const; | 160 const VCMDecoderMapItem* FindDecoderItem(uint8_t payload_type) const; |
163 | 161 |
164 const VCMExtDecoderMapItem* FindExternalDecoderItem( | 162 const VCMExtDecoderMapItem* FindExternalDecoderItem( |
165 uint8_t payload_type) const; | 163 uint8_t payload_type) const; |
166 | 164 |
167 int number_of_cores_; | 165 int number_of_cores_; |
168 size_t max_payload_size_; | 166 size_t max_payload_size_; |
169 bool periodic_key_frames_; | 167 bool periodic_key_frames_; |
170 bool pending_encoder_reset_; | 168 bool pending_encoder_reset_; |
171 bool current_enc_is_external_; | |
172 VideoCodec send_codec_; | 169 VideoCodec send_codec_; |
173 VideoCodec receive_codec_; | 170 VideoCodec receive_codec_; |
174 uint8_t external_payload_type_; | 171 uint8_t encoder_payload_type_; |
175 VideoEncoder* external_encoder_; | 172 VideoEncoder* external_encoder_; |
176 bool internal_source_; | 173 bool internal_source_; |
177 VideoEncoderRateObserver* const encoder_rate_observer_; | 174 VideoEncoderRateObserver* const encoder_rate_observer_; |
178 VCMGenericEncoder* ptr_encoder_; | 175 VCMGenericEncoder* ptr_encoder_; |
179 VCMGenericDecoder* ptr_decoder_; | 176 VCMGenericDecoder* ptr_decoder_; |
180 DecoderMap dec_map_; | 177 DecoderMap dec_map_; |
181 ExternalDecoderMap dec_external_map_; | 178 ExternalDecoderMap dec_external_map_; |
182 }; // VCMCodecDataBase | 179 }; // VCMCodecDataBase |
183 | 180 |
184 } // namespace webrtc | 181 } // namespace webrtc |
185 | 182 |
186 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_CODEC_DATABASE_H_ | 183 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_CODEC_DATABASE_H_ |
OLD | NEW |