Revert of Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload (patchset #1 id:40001 of https://codereview.webrtc.org/2525693003/ )

Reason for revert:
The CL doesn't actually set profile information in VideoPayload.

Original issue's description:
> Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload
>
> It's necessary to check H264 profile information as well as payload name
> in PayloadIsCompatible in RTPPayloadRegistry.
>
> BUG=webrtc:6743
>
> Committed: https://crrev.com/bdbc4b7ef578ba1d61ceec351bc47c33da115329
> Cr-Commit-Position: refs/heads/master@{#15248}

TBR=mflodman@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6743

Review-Url: https://codereview.webrtc.org/2529143002
Cr-Commit-Position: refs/heads/master@{#15251}
This commit is contained in:
magjed 2016-11-25 09:34:10 -08:00 committed by Commit bot
parent c7805dbd0e
commit d7e6ccbc53
6 changed files with 10 additions and 31 deletions

View File

@ -548,19 +548,6 @@ struct VideoCodecVP9 {
bool flexibleMode;
};
// TODO(magjed): Move this and other H264 related classes out to their own file.
namespace H264 {
enum Profile {
kProfileConstrainedBaseline,
kProfileBaseline,
kProfileMain,
kProfileConstrainedHigh,
kProfileHigh,
};
} // namespace H264
// H264 specific.
struct VideoCodecH264 {
bool frameDroppingOn;
@ -570,7 +557,6 @@ struct VideoCodecH264 {
size_t spsLen;
const uint8_t* ppsData;
size_t ppsLen;
H264::Profile profile;
};
// Video codec types

View File

@ -15,7 +15,6 @@
#include <string>
#include "webrtc/base/optional.h"
#include "webrtc/common_types.h"
namespace webrtc {
namespace H264 {
@ -23,6 +22,14 @@ namespace H264 {
// Map containting SDP codec parameters.
typedef std::map<std::string, std::string> CodecParameterMap;
enum Profile {
kProfileConstrainedBaseline,
kProfileBaseline,
kProfileMain,
kProfileConstrainedHigh,
kProfileHigh,
};
// All values are equal to ten times the level number, except level 1b which is
// special.
enum Level {

View File

@ -15,7 +15,6 @@
#include <list>
#include <vector>
#include "webrtc/common_types.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/typedefs.h"
@ -45,9 +44,7 @@ struct AudioPayload {
};
struct VideoPayload {
RtpVideoCodecTypes videoCodecType;
// The H264 profile only matters if videoCodecType == kRtpVideoH264.
H264::Profile h264_profile;
RtpVideoCodecTypes videoCodecType;
};
union PayloadUnion {

View File

@ -37,14 +37,7 @@ bool PayloadIsCompatible(const RtpUtility::Payload& payload,
bool PayloadIsCompatible(const RtpUtility::Payload& payload,
const VideoCodec& video_codec) {
if (payload.audio || _stricmp(payload.name, video_codec.plName) != 0)
return false;
// For H264, profiles must match as well.
if (video_codec.codecType == kVideoCodecH264) {
return video_codec.H264().profile ==
payload.typeSpecific.Video.h264_profile;
}
return true;
return !payload.audio && _stricmp(payload.name, video_codec.plName) == 0;
}
RtpUtility::Payload CreatePayloadType(const CodecInst& audio_codec) {

View File

@ -68,7 +68,6 @@ VideoCodecH264 VideoEncoder::GetDefaultH264Settings() {
h264_settings.spsLen = 0;
h264_settings.ppsData = nullptr;
h264_settings.ppsLen = 0;
h264_settings.profile = H264::kProfileConstrainedBaseline;
return h264_settings;
}

View File

@ -19,7 +19,6 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/optional.h"
#include "webrtc/common_video/h264/profile_level_id.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/congestion_controller/include/congestion_controller.h"
#include "webrtc/modules/utility/include/process_thread.h"
@ -170,8 +169,6 @@ VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) {
*(codec.VP9()) = VideoEncoder::GetDefaultVp9Settings();
} else if (codec.codecType == kVideoCodecH264) {
*(codec.H264()) = VideoEncoder::GetDefaultH264Settings();
codec.H264()->profile =
H264::ParseSdpProfileLevelId(decoder.codec_params)->profile;
}
codec.width = 320;