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:

committed by
Commit Bot

parent
638d4d375f
commit
01a89904c0
@ -342,13 +342,6 @@ enum VideoCodecType {
|
|||||||
kVideoCodecMultiplex,
|
kVideoCodecMultiplex,
|
||||||
// DEPRECATED. Do not use.
|
// DEPRECATED. Do not use.
|
||||||
kVideoCodecUnknown,
|
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.
|
// Translates from name of codec to codec type and vice versa.
|
||||||
|
@ -32,9 +32,6 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
// TODO(nisse): Deprecated, use webrtc::VideoCodecType instead.
|
|
||||||
using RtpVideoCodecTypes = VideoCodecType;
|
|
||||||
|
|
||||||
struct WebRtcRTPHeader {
|
struct WebRtcRTPHeader {
|
||||||
RTPVideoHeader& video_header() { return video; }
|
RTPVideoHeader& video_header() { return video; }
|
||||||
const RTPVideoHeader& video_header() const { return video; }
|
const RTPVideoHeader& video_header() const { return video; }
|
||||||
|
@ -23,7 +23,7 @@ RtpPacketizer* RtpPacketizer::Create(VideoCodecType type,
|
|||||||
size_t last_packet_reduction_len,
|
size_t last_packet_reduction_len,
|
||||||
const RTPVideoHeader* rtp_video_header,
|
const RTPVideoHeader* rtp_video_header,
|
||||||
FrameType frame_type) {
|
FrameType frame_type) {
|
||||||
RTC_CHECK(type == kVideoCodecGeneric || rtp_video_header);
|
RTC_CHECK(rtp_video_header);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case kVideoCodecH264: {
|
case kVideoCodecH264: {
|
||||||
const auto& h264 =
|
const auto& h264 =
|
||||||
@ -40,13 +40,10 @@ RtpPacketizer* RtpPacketizer::Create(VideoCodecType type,
|
|||||||
return new RtpPacketizerVp9(vp9, max_payload_len,
|
return new RtpPacketizerVp9(vp9, max_payload_len,
|
||||||
last_packet_reduction_len);
|
last_packet_reduction_len);
|
||||||
}
|
}
|
||||||
case kVideoCodecGeneric:
|
default:
|
||||||
RTC_CHECK(rtp_video_header);
|
|
||||||
return new RtpPacketizerGeneric(*rtp_video_header, frame_type,
|
return new RtpPacketizerGeneric(*rtp_video_header, frame_type,
|
||||||
max_payload_len,
|
max_payload_len,
|
||||||
last_packet_reduction_len);
|
last_packet_reduction_len);
|
||||||
default:
|
|
||||||
RTC_NOTREACHED();
|
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -47,20 +47,9 @@ RtpUtility::Payload CreatePayloadType(const SdpAudioFormat& audio_format) {
|
|||||||
PayloadUnion(AudioPayload{audio_format, 0})};
|
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) {
|
RtpUtility::Payload CreatePayloadType(const VideoCodec& video_codec) {
|
||||||
VideoPayload p;
|
VideoPayload p;
|
||||||
p.videoCodecType = ConvertToRtpVideoCodecType(video_codec.codecType);
|
p.videoCodecType = video_codec.codecType;
|
||||||
if (video_codec.codecType == kVideoCodecH264)
|
if (video_codec.codecType == kVideoCodecH264)
|
||||||
p.h264_profile = video_codec.H264().profile;
|
p.h264_profile = video_codec.H264().profile;
|
||||||
return {CodecTypeToPayloadString(video_codec.codecType), PayloadUnion(p)};
|
return {CodecTypeToPayloadString(video_codec.codecType), PayloadUnion(p)};
|
||||||
|
Reference in New Issue
Block a user