mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Revert "Define cricket::MediaType in terms of webrtc::MediaType"
This reverts commit 3ce6391b38
.
Reason for revert: Breaks downstream test
Original change's description:
> Define cricket::MediaType in terms of webrtc::MediaType
>
> This is one step in getting rid of cricket::MediaType.
>
> Bug: webrtc:12754
> Fixes: webrtc:12764
> Change-Id: Idee832572bdc4c0e3bfdec6fb31ec0ba9db3e995
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218346
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33994}
TBR=mbonadei@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I64772018dea55e4f0946464364a60a39cec7e9ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12754
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218603
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34000}
This commit is contained in:
parent
6174173f81
commit
99261af5a4
4 changed files with 16 additions and 19 deletions
|
@ -15,23 +15,16 @@
|
|||
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
enum class MediaType { ANY, AUDIO, VIDEO, DATA, UNSUPPORTED };
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
// The cricket and webrtc have separate definitions for what a media type is.
|
||||
// They used to be incompatible, but now cricket is defined in terms of the
|
||||
// webrtc definition.
|
||||
// They're not compatible. Watch out for this.
|
||||
|
||||
namespace cricket {
|
||||
|
||||
enum MediaType {
|
||||
MEDIA_TYPE_AUDIO = static_cast<int>(webrtc::MediaType::AUDIO),
|
||||
MEDIA_TYPE_VIDEO = static_cast<int>(webrtc::MediaType::VIDEO),
|
||||
MEDIA_TYPE_DATA = static_cast<int>(webrtc::MediaType::DATA),
|
||||
MEDIA_TYPE_UNSUPPORTED = static_cast<int>(webrtc::MediaType::UNSUPPORTED),
|
||||
MEDIA_TYPE_AUDIO,
|
||||
MEDIA_TYPE_VIDEO,
|
||||
MEDIA_TYPE_DATA,
|
||||
MEDIA_TYPE_UNSUPPORTED
|
||||
};
|
||||
|
||||
extern const char kMediaTypeAudio[];
|
||||
|
@ -42,4 +35,10 @@ RTC_EXPORT std::string MediaTypeToString(MediaType type);
|
|||
|
||||
} // namespace cricket
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
enum class MediaType { ANY, AUDIO, VIDEO, DATA };
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_MEDIA_TYPES_H_
|
||||
|
|
|
@ -452,7 +452,6 @@ webrtc::NetworkState FakeCall::GetNetworkState(webrtc::MediaType media) const {
|
|||
return video_network_state_;
|
||||
case webrtc::MediaType::DATA:
|
||||
case webrtc::MediaType::ANY:
|
||||
case webrtc::MediaType::UNSUPPORTED:
|
||||
ADD_FAILURE() << "GetNetworkState called with unknown parameter.";
|
||||
return webrtc::kNetworkDown;
|
||||
}
|
||||
|
@ -639,7 +638,6 @@ void FakeCall::SignalChannelNetworkState(webrtc::MediaType media,
|
|||
break;
|
||||
case webrtc::MediaType::DATA:
|
||||
case webrtc::MediaType::ANY:
|
||||
case webrtc::MediaType::UNSUPPORTED:
|
||||
ADD_FAILURE()
|
||||
<< "SignalChannelNetworkState called with unknown parameter.";
|
||||
}
|
||||
|
|
|
@ -199,9 +199,9 @@ TEST_P(PeerConnectionHeaderExtensionTest, NegotiatedExtensionsAreAccessible) {
|
|||
INSTANTIATE_TEST_SUITE_P(
|
||||
,
|
||||
PeerConnectionHeaderExtensionTest,
|
||||
Combine(Values(cricket::MediaType::MEDIA_TYPE_AUDIO,
|
||||
cricket::MediaType::MEDIA_TYPE_VIDEO),
|
||||
Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan)),
|
||||
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
|
||||
Values(cricket::MediaType::MEDIA_TYPE_AUDIO,
|
||||
cricket::MediaType::MEDIA_TYPE_VIDEO)),
|
||||
[](const testing::TestParamInfo<
|
||||
PeerConnectionHeaderExtensionTest::ParamType>& info) {
|
||||
cricket::MediaType media_type;
|
||||
|
|
|
@ -30,8 +30,8 @@ public class MediaStreamTrack {
|
|||
|
||||
// Must be kept in sync with cricket::MediaType.
|
||||
public enum MediaType {
|
||||
MEDIA_TYPE_AUDIO(1),
|
||||
MEDIA_TYPE_VIDEO(2);
|
||||
MEDIA_TYPE_AUDIO(0),
|
||||
MEDIA_TYPE_VIDEO(1);
|
||||
|
||||
private final int nativeIndex;
|
||||
|
||||
|
|
Loading…
Reference in a new issue