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

Side by Side Diff: webrtc/modules/video_coding/codec_database.cc

Issue 2470103002: Add new codec for FlexFEC. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 /* 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 VCM_DEFAULT_FRAME_RATE / 1000 / 2; 171 VCM_DEFAULT_FRAME_RATE / 1000 / 2;
172 settings->maxBitrate = settings->startBitrate; 172 settings->maxBitrate = settings->startBitrate;
173 settings->maxFramerate = VCM_DEFAULT_FRAME_RATE; 173 settings->maxFramerate = VCM_DEFAULT_FRAME_RATE;
174 settings->width = VCM_DEFAULT_CODEC_WIDTH; 174 settings->width = VCM_DEFAULT_CODEC_WIDTH;
175 settings->height = VCM_DEFAULT_CODEC_HEIGHT; 175 settings->height = VCM_DEFAULT_CODEC_HEIGHT;
176 settings->minBitrate = VCM_MIN_BITRATE; 176 settings->minBitrate = VCM_MIN_BITRATE;
177 settings->numberOfSimulcastStreams = 0; 177 settings->numberOfSimulcastStreams = 0;
178 return; 178 return;
179 case kVideoCodecRED: 179 case kVideoCodecRED:
180 case kVideoCodecULPFEC: 180 case kVideoCodecULPFEC:
181 case kVideoCodecFlexfec:
181 case kVideoCodecGeneric: 182 case kVideoCodecGeneric:
182 case kVideoCodecUnknown: 183 case kVideoCodecUnknown:
183 RTC_NOTREACHED(); 184 RTC_NOTREACHED();
184 return; 185 return;
185 } 186 }
186 } 187 }
187 188
188 // Assuming only one registered encoder - since only one used, no need for more. 189 // Assuming only one registered encoder - since only one used, no need for more.
189 bool VCMCodecDataBase::SetSendCodec(const VideoCodec* send_codec, 190 bool VCMCodecDataBase::SetSendCodec(const VideoCodec* send_codec,
190 int number_of_cores, 191 int number_of_cores,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 sizeof(new_send_codec.H264())) != 0) { 344 sizeof(new_send_codec.H264())) != 0) {
344 return true; 345 return true;
345 } 346 }
346 break; 347 break;
347 case kVideoCodecGeneric: 348 case kVideoCodecGeneric:
348 break; 349 break;
349 // Known codecs without payload-specifics 350 // Known codecs without payload-specifics
350 case kVideoCodecI420: 351 case kVideoCodecI420:
351 case kVideoCodecRED: 352 case kVideoCodecRED:
352 case kVideoCodecULPFEC: 353 case kVideoCodecULPFEC:
354 case kVideoCodecFlexfec:
353 break; 355 break;
354 // Unknown codec type, reset just to be sure. 356 // Unknown codec type, reset just to be sure.
355 case kVideoCodecUnknown: 357 case kVideoCodecUnknown:
356 return true; 358 return true;
357 } 359 }
358 360
359 if (new_send_codec.numberOfSimulcastStreams > 0) { 361 if (new_send_codec.numberOfSimulcastStreams > 0) {
360 for (unsigned char i = 0; i < new_send_codec.numberOfSimulcastStreams; 362 for (unsigned char i = 0; i < new_send_codec.numberOfSimulcastStreams;
361 ++i) { 363 ++i) {
362 if (memcmp(&new_send_codec.simulcastStream[i], 364 if (memcmp(&new_send_codec.simulcastStream[i],
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 600
599 const VCMExtDecoderMapItem* VCMCodecDataBase::FindExternalDecoderItem( 601 const VCMExtDecoderMapItem* VCMCodecDataBase::FindExternalDecoderItem(
600 uint8_t payload_type) const { 602 uint8_t payload_type) const {
601 ExternalDecoderMap::const_iterator it = dec_external_map_.find(payload_type); 603 ExternalDecoderMap::const_iterator it = dec_external_map_.find(payload_type);
602 if (it != dec_external_map_.end()) { 604 if (it != dec_external_map_.end()) {
603 return (*it).second; 605 return (*it).second;
604 } 606 }
605 return nullptr; 607 return nullptr;
606 } 608 }
607 } // namespace webrtc 609 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/modules/video_coding/rtp_frame_reference_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698