Remove deprecated type alias for RtpVideoCodecTypes.

First phase of this removal landed with cl https://webrtc-review.googlesource.com/79561

Bug: webrtc:8995
Change-Id: I9dc152e2f1bac17e2959af7e18106760ca5435c8
Reviewed-on: https://webrtc-review.googlesource.com/95720
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24447}
This commit is contained in:
Kári Tristan Helgason
2018-08-27 13:26:52 +02:00
committed by Commit Bot
parent 638d4d375f
commit 01a89904c0
4 changed files with 3 additions and 27 deletions

View File

@ -342,13 +342,6 @@ enum VideoCodecType {
kVideoCodecMultiplex,
// DEPRECATED. Do not use.
kVideoCodecUnknown,
// TODO(nisse): Deprecated aliases, for code expecting RtpVideoCodecTypes.
kRtpVideoNone = kVideoCodecGeneric,
kRtpVideoGeneric = kVideoCodecGeneric,
kRtpVideoVp8 = kVideoCodecVP8,
kRtpVideoVp9 = kVideoCodecVP9,
kRtpVideoH264 = kVideoCodecH264,
};
// Translates from name of codec to codec type and vice versa.

View File

@ -32,9 +32,6 @@
namespace webrtc {
// TODO(nisse): Deprecated, use webrtc::VideoCodecType instead.
using RtpVideoCodecTypes = VideoCodecType;
struct WebRtcRTPHeader {
RTPVideoHeader& video_header() { return video; }
const RTPVideoHeader& video_header() const { return video; }

View File

@ -23,7 +23,7 @@ RtpPacketizer* RtpPacketizer::Create(VideoCodecType type,
size_t last_packet_reduction_len,
const RTPVideoHeader* rtp_video_header,
FrameType frame_type) {
RTC_CHECK(type == kVideoCodecGeneric || rtp_video_header);
RTC_CHECK(rtp_video_header);
switch (type) {
case kVideoCodecH264: {
const auto& h264 =
@ -40,13 +40,10 @@ RtpPacketizer* RtpPacketizer::Create(VideoCodecType type,
return new RtpPacketizerVp9(vp9, max_payload_len,
last_packet_reduction_len);
}
case kVideoCodecGeneric:
RTC_CHECK(rtp_video_header);
default:
return new RtpPacketizerGeneric(*rtp_video_header, frame_type,
max_payload_len,
last_packet_reduction_len);
default:
RTC_NOTREACHED();
}
return nullptr;
}

View File

@ -47,20 +47,9 @@ RtpUtility::Payload CreatePayloadType(const SdpAudioFormat& audio_format) {
PayloadUnion(AudioPayload{audio_format, 0})};
}
RtpVideoCodecTypes ConvertToRtpVideoCodecType(VideoCodecType type) {
switch (type) {
case kVideoCodecVP8:
case kVideoCodecVP9:
case kVideoCodecH264:
return type;
default:
return kVideoCodecGeneric;
}
}
RtpUtility::Payload CreatePayloadType(const VideoCodec& video_codec) {
VideoPayload p;
p.videoCodecType = ConvertToRtpVideoCodecType(video_codec.codecType);
p.videoCodecType = video_codec.codecType;
if (video_codec.codecType == kVideoCodecH264)
p.h264_profile = video_codec.H264().profile;
return {CodecTypeToPayloadString(video_codec.codecType), PayloadUnion(p)};