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

Side by Side Diff: media/base/codec.cc

Issue 2951033003: [EXPERIMENTAL] Generic stereo codec with index header sending single frames
Patch Set: Rebase and add external codec support. Created 3 years, 2 months 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
« no previous file with comments | « media/base/codec.h ('k') | media/base/mediaconstants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 return true; 256 return true;
257 } 257 }
258 258
259 VideoCodec VideoCodec::CreateRtxCodec(int rtx_payload_type, 259 VideoCodec VideoCodec::CreateRtxCodec(int rtx_payload_type,
260 int associated_payload_type) { 260 int associated_payload_type) {
261 VideoCodec rtx_codec(rtx_payload_type, kRtxCodecName); 261 VideoCodec rtx_codec(rtx_payload_type, kRtxCodecName);
262 rtx_codec.SetParam(kCodecParamAssociatedPayloadType, associated_payload_type); 262 rtx_codec.SetParam(kCodecParamAssociatedPayloadType, associated_payload_type);
263 return rtx_codec; 263 return rtx_codec;
264 } 264 }
265 265
266 // static
267 VideoCodec VideoCodec::CreateStereoCodec(int stereo_payload_type,
268 const VideoCodec& codec) {
269 VideoCodec stereo_codec(stereo_payload_type, kStereoCodecName);
270 stereo_codec.SetParam(kCodecParamAssociatedPayloadType, codec.id);
271 return stereo_codec;
272 }
273
274 // static
275 bool VideoCodec::IsStereoCodec(const VideoCodec& codec) {
276 return CodecNamesEq(codec.name.c_str(), kStereoCodecName);
277 }
278
266 VideoCodec::CodecType VideoCodec::GetCodecType() const { 279 VideoCodec::CodecType VideoCodec::GetCodecType() const {
267 const char* payload_name = name.c_str(); 280 const char* payload_name = name.c_str();
268 if (_stricmp(payload_name, kRedCodecName) == 0) { 281 if (_stricmp(payload_name, kRedCodecName) == 0) {
269 return CODEC_RED; 282 return CODEC_RED;
270 } 283 }
271 if (_stricmp(payload_name, kUlpfecCodecName) == 0) { 284 if (_stricmp(payload_name, kUlpfecCodecName) == 0) {
272 return CODEC_ULPFEC; 285 return CODEC_ULPFEC;
273 } 286 }
274 if (_stricmp(payload_name, kFlexfecCodecName) == 0) { 287 if (_stricmp(payload_name, kFlexfecCodecName) == 0) {
275 return CODEC_FLEXFEC; 288 return CODEC_FLEXFEC;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 if (CodecNamesEq(codec.name.c_str(), kH264CodecName) && 366 if (CodecNamesEq(codec.name.c_str(), kH264CodecName) &&
354 !IsSameH264Profile(codec.params, supported_codec.params)) { 367 !IsSameH264Profile(codec.params, supported_codec.params)) {
355 continue; 368 continue;
356 } 369 }
357 return &supported_codec; 370 return &supported_codec;
358 } 371 }
359 return nullptr; 372 return nullptr;
360 } 373 }
361 374
362 } // namespace cricket 375 } // namespace cricket
OLDNEW
« no previous file with comments | « media/base/codec.h ('k') | media/base/mediaconstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698