forked from open-webrtc-toolkit/owt-deps-webrtc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 2 "Refactoring DataContentDescription class"
(substantial changes since version 1) This CL splits the cricket::DataContentDescription class into two classes: cricket::RtpDataContentDescription (used for RTP data) and cricket::SctpDataContentDescription (used for SCTP only). SctpDataContentDescription no longer inherits from MediaContentDescriptionImpl, and no longer contains "codecs". Due to usage of internal interfaces by consumers, shimming the old DataContentDescription API is needed. A new cricket::DataContentDescription class is defined, which is a shim over RtpDataContentDescription and SctpDataContentDescription. It exposes as little functionality as possible, but supports the concerned consumer's usage Design document: https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit# Version 1 reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700 Bug: webrtc:10358 Change-Id: Icf95fb7308244d6f2ebfdb403aaffc544e358580 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133900 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27853}
- 76-sdk
- 79-sdk
- 83-sdk
- 88-sdk
- android_83
- android_error
- audio_playback_switch
- audio_switch
- av_unbundle
- cloudgaming-83
- dependency_descriptor
- diff_serv_fix
- diff_serv_fix_ios
- enable_m83_test
- ffmpeg_removal
- fix_76
- fix_android_error
- fix_av1_dump
- fix_ci
- fix_ci_2
- fix_clang_build
- fix_data_ptr
- fix_gpra_crash
- fix_m88_build
- fix_scan_issues
- fix_scanissue
- fix_u22
- frame_sync
- (open-webrtc-toolkit/owt-deps-webrtc#109)
- h265_rtp
- hw_ip_enabling
- ios_build_fix
- johny_76_sdk
- lntf
- log_prefix
- m88_android
- missing_case
- msvc_warning
- os_version
- payload_check
- per_frame_delay
- (open-webrtc-toolkit/owt-deps-webrtc#144)
- perf_opt_changes
- prefix_parser
- remove_ffmpeg
- remove_gn_arg_override
- rename_av1x
- suppress_warning
- tcae_enable
- (open-webrtc-toolkit/owt-deps-webrtc#148)
- tcae_latest
- vp9_send
Harald Alvestrand
authored and
Commit Bot
committed
May 5, 2019
1 parent
2390a13
commit 14b2758
Showing
21 changed files
with
1,344 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2019 The WebRTC project authors. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license | ||
* that can be found in the LICENSE file in the root of the source | ||
* tree. An additional intellectual property rights grant can be found | ||
* in the file PATENTS. All contributing project authors may | ||
* be found in the AUTHORS file in the root of the source tree. | ||
*/ | ||
|
||
#include "pc/media_protocol_names.h" | ||
|
||
namespace cricket { | ||
|
||
const char kMediaProtocolRtpPrefix[] = "RTP/"; | ||
|
||
const char kMediaProtocolSctp[] = "SCTP"; | ||
const char kMediaProtocolDtlsSctp[] = "DTLS/SCTP"; | ||
const char kMediaProtocolUdpDtlsSctp[] = "UDP/DTLS/SCTP"; | ||
const char kMediaProtocolTcpDtlsSctp[] = "TCP/DTLS/SCTP"; | ||
|
||
bool IsDtlsSctp(const std::string& protocol) { | ||
return protocol == kMediaProtocolDtlsSctp || | ||
protocol == kMediaProtocolUdpDtlsSctp || | ||
protocol == kMediaProtocolTcpDtlsSctp; | ||
} | ||
|
||
bool IsPlainSctp(const std::string& protocol) { | ||
return protocol == kMediaProtocolSctp; | ||
} | ||
|
||
bool IsRtpProtocol(const std::string& protocol) { | ||
return protocol.empty() || | ||
(protocol.find(cricket::kMediaProtocolRtpPrefix) != std::string::npos); | ||
} | ||
|
||
bool IsSctpProtocol(const std::string& protocol) { | ||
return IsPlainSctp(protocol) || IsDtlsSctp(protocol); | ||
} | ||
|
||
} // namespace cricket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2019 The WebRTC project authors. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license | ||
* that can be found in the LICENSE file in the root of the source | ||
* tree. An additional intellectual property rights grant can be found | ||
* in the file PATENTS. All contributing project authors may | ||
* be found in the AUTHORS file in the root of the source tree. | ||
*/ | ||
|
||
#ifndef PC_MEDIA_PROTOCOL_NAMES_H_ | ||
#define PC_MEDIA_PROTOCOL_NAMES_H_ | ||
|
||
#include <string> | ||
|
||
namespace cricket { | ||
|
||
// Names or name prefixes of protocols as defined by SDP specifications. | ||
extern const char kMediaProtocolRtpPrefix[]; | ||
extern const char kMediaProtocolSctp[]; | ||
extern const char kMediaProtocolDtlsSctp[]; | ||
extern const char kMediaProtocolUdpDtlsSctp[]; | ||
extern const char kMediaProtocolTcpDtlsSctp[]; | ||
|
||
bool IsDtlsSctp(const std::string& protocol); | ||
bool IsPlainSctp(const std::string& protocol); | ||
|
||
// Returns true if the given media section protocol indicates use of RTP. | ||
bool IsRtpProtocol(const std::string& protocol); | ||
// Returns true if the given media section protocol indicates use of SCTP. | ||
bool IsSctpProtocol(const std::string& protocol); | ||
|
||
} // namespace cricket | ||
|
||
#endif // PC_MEDIA_PROTOCOL_NAMES_H_ |
Oops, something went wrong.