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

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1649493004: Support multiple rtx codecs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 10 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 | « talk/media/base/constants.cc ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('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 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 static const int kDefaultRtcpReceiverReportSsrc = 1; 351 static const int kDefaultRtcpReceiverReportSsrc = 1;
352 352
353 std::vector<VideoCodec> DefaultVideoCodecList() { 353 std::vector<VideoCodec> DefaultVideoCodecList() {
354 std::vector<VideoCodec> codecs; 354 std::vector<VideoCodec> codecs;
355 codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultVp8PlType, 355 codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultVp8PlType,
356 kVp8CodecName)); 356 kVp8CodecName));
357 if (CodecIsInternallySupported(kVp9CodecName)) { 357 if (CodecIsInternallySupported(kVp9CodecName)) {
358 codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultVp9PlType, 358 codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultVp9PlType,
359 kVp9CodecName)); 359 kVp9CodecName));
360 // TODO(andresp): Add rtx codec for vp9 and verify it works.
361 } 360 }
362 if (CodecIsInternallySupported(kH264CodecName)) { 361 if (CodecIsInternallySupported(kH264CodecName)) {
363 codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultH264PlType, 362 codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultH264PlType,
364 kH264CodecName)); 363 kH264CodecName));
365 } 364 }
366 codecs.push_back( 365 codecs.push_back(
367 VideoCodec::CreateRtxCodec(kDefaultRtxVp8PlType, kDefaultVp8PlType)); 366 VideoCodec::CreateRtxCodec(kDefaultRtxVp8PlType, kDefaultVp8PlType));
367 if (CodecIsInternallySupported(kVp9CodecName)) {
368 codecs.push_back(
369 VideoCodec::CreateRtxCodec(kDefaultRtxVp9PlType, kDefaultVp9PlType));
370 }
368 codecs.push_back(VideoCodec(kDefaultRedPlType, kRedCodecName)); 371 codecs.push_back(VideoCodec(kDefaultRedPlType, kRedCodecName));
372 codecs.push_back(
373 VideoCodec::CreateRtxCodec(kDefaultRtxRedPlType, kDefaultRedPlType));
369 codecs.push_back(VideoCodec(kDefaultUlpfecType, kUlpfecCodecName)); 374 codecs.push_back(VideoCodec(kDefaultUlpfecType, kUlpfecCodecName));
370 return codecs; 375 return codecs;
371 } 376 }
372 377
373 std::vector<webrtc::VideoStream> 378 std::vector<webrtc::VideoStream>
374 WebRtcVideoChannel2::WebRtcVideoSendStream::CreateSimulcastVideoStreams( 379 WebRtcVideoChannel2::WebRtcVideoSendStream::CreateSimulcastVideoStreams(
375 const VideoCodec& codec, 380 const VideoCodec& codec,
376 const VideoOptions& options, 381 const VideoOptions& options,
377 int max_bitrate_bps, 382 int max_bitrate_bps,
378 size_t num_streams) { 383 size_t num_streams) {
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2553 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2549 } 2554 }
2550 } 2555 }
2551 2556
2552 return video_codecs; 2557 return video_codecs;
2553 } 2558 }
2554 2559
2555 } // namespace cricket 2560 } // namespace cricket
2556 2561
2557 #endif // HAVE_WEBRTC_VIDEO 2562 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « talk/media/base/constants.cc ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698