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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine.cc

Issue 2998843002: Default enable content type rtp header extension (Closed)
Patch Set: Remove unit test for the removed code Created 3 years, 4 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 | « no previous file | webrtc/media/engine/webrtcvideoengine_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 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03"); 48 return webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03");
49 } 49 }
50 50
51 // If this field trial is enabled, the "flexfec-03" codec may have been 51 // If this field trial is enabled, the "flexfec-03" codec may have been
52 // advertised as being supported in the local SDP. That means that we must be 52 // advertised as being supported in the local SDP. That means that we must be
53 // ready to receive FlexFEC packets. See internalencoderfactory.cc. 53 // ready to receive FlexFEC packets. See internalencoderfactory.cc.
54 bool IsFlexfecAdvertisedFieldTrialEnabled() { 54 bool IsFlexfecAdvertisedFieldTrialEnabled() {
55 return webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03-Advertised"); 55 return webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03-Advertised");
56 } 56 }
57 57
58 // If this field trial is enabled, we will report VideoContentType RTP extension
59 // in capabilities (thus, it will end up in the default SDP and extension will
60 // be sent for all key-frames).
61 bool IsVideoContentTypeExtensionFieldTrialEnabled() {
62 return webrtc::field_trial::IsEnabled("WebRTC-VideoContentTypeExtension");
63 }
64
65 // An encoder factory that wraps Create requests for simulcastable codec types 58 // An encoder factory that wraps Create requests for simulcastable codec types
66 // with a webrtc::SimulcastEncoderAdapter. Non simulcastable codec type 59 // with a webrtc::SimulcastEncoderAdapter. Non simulcastable codec type
67 // requests are just passed through to the contained encoder factory. 60 // requests are just passed through to the contained encoder factory.
68 class WebRtcSimulcastEncoderFactory 61 class WebRtcSimulcastEncoderFactory
69 : public cricket::WebRtcVideoEncoderFactory { 62 : public cricket::WebRtcVideoEncoderFactory {
70 public: 63 public:
71 // WebRtcSimulcastEncoderFactory doesn't take ownership of |factory|, which is 64 // WebRtcSimulcastEncoderFactory doesn't take ownership of |factory|, which is
72 // owned by e.g. PeerConnectionFactory. 65 // owned by e.g. PeerConnectionFactory.
73 explicit WebRtcSimulcastEncoderFactory( 66 explicit WebRtcSimulcastEncoderFactory(
74 cricket::WebRtcVideoEncoderFactory* factory) 67 cricket::WebRtcVideoEncoderFactory* factory)
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 webrtc::RtpExtension::kAbsSendTimeDefaultId)); 416 webrtc::RtpExtension::kAbsSendTimeDefaultId));
424 capabilities.header_extensions.push_back( 417 capabilities.header_extensions.push_back(
425 webrtc::RtpExtension(webrtc::RtpExtension::kVideoRotationUri, 418 webrtc::RtpExtension(webrtc::RtpExtension::kVideoRotationUri,
426 webrtc::RtpExtension::kVideoRotationDefaultId)); 419 webrtc::RtpExtension::kVideoRotationDefaultId));
427 capabilities.header_extensions.push_back(webrtc::RtpExtension( 420 capabilities.header_extensions.push_back(webrtc::RtpExtension(
428 webrtc::RtpExtension::kTransportSequenceNumberUri, 421 webrtc::RtpExtension::kTransportSequenceNumberUri,
429 webrtc::RtpExtension::kTransportSequenceNumberDefaultId)); 422 webrtc::RtpExtension::kTransportSequenceNumberDefaultId));
430 capabilities.header_extensions.push_back( 423 capabilities.header_extensions.push_back(
431 webrtc::RtpExtension(webrtc::RtpExtension::kPlayoutDelayUri, 424 webrtc::RtpExtension(webrtc::RtpExtension::kPlayoutDelayUri,
432 webrtc::RtpExtension::kPlayoutDelayDefaultId)); 425 webrtc::RtpExtension::kPlayoutDelayDefaultId));
433 if (IsVideoContentTypeExtensionFieldTrialEnabled()) { 426 capabilities.header_extensions.push_back(
434 capabilities.header_extensions.push_back( 427 webrtc::RtpExtension(webrtc::RtpExtension::kVideoContentTypeUri,
435 webrtc::RtpExtension(webrtc::RtpExtension::kVideoContentTypeUri, 428 webrtc::RtpExtension::kVideoContentTypeDefaultId));
436 webrtc::RtpExtension::kVideoContentTypeDefaultId));
437 }
438 // TODO(ilnik): Add kVideoTimingUri/kVideoTimingDefaultId to capabilities. 429 // TODO(ilnik): Add kVideoTimingUri/kVideoTimingDefaultId to capabilities.
439 // Possibly inside field trial. 430 // Possibly inside field trial.
440 return capabilities; 431 return capabilities;
441 } 432 }
442 433
443 void WebRtcVideoEngine::SetExternalDecoderFactory( 434 void WebRtcVideoEngine::SetExternalDecoderFactory(
444 WebRtcVideoDecoderFactory* decoder_factory) { 435 WebRtcVideoDecoderFactory* decoder_factory) {
445 RTC_DCHECK(!initialized_); 436 RTC_DCHECK(!initialized_);
446 external_decoder_factory_ = decoder_factory; 437 external_decoder_factory_ = decoder_factory;
447 } 438 }
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - 2651 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() -
2661 1); 2652 1);
2662 } 2653 }
2663 2654
2664 std::vector<webrtc::VideoStream> streams; 2655 std::vector<webrtc::VideoStream> streams;
2665 streams.push_back(stream); 2656 streams.push_back(stream);
2666 return streams; 2657 return streams;
2667 } 2658 }
2668 2659
2669 } // namespace cricket 2660 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698