Delete the VideoCodec::plName string.

It holds the same information as codecType, but in different format.

Bug: webrtc:8830
Change-Id: Ia83e2dff4fd9a5ddb489501b7a1fe80759fa4218
Reviewed-on: https://webrtc-review.googlesource.com/56100
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22307}
This commit is contained in:
Niels Möller
2018-02-23 15:41:13 +01:00
committed by Commit Bot
parent f9fbce9cc4
commit 2e1d784956
19 changed files with 14 additions and 41 deletions

View File

@ -192,7 +192,6 @@ class TestVp8Simulcast : public ::testing::Test {
const int* temporal_layer_profile) {
RTC_CHECK(settings);
memset(settings, 0, sizeof(VideoCodec));
strncpy(settings->plName, "VP8", 4);
settings->codecType = kVideoCodecVP8;
// 96 to 127 dynamic payload types for video codecs
settings->plType = 120;

View File

@ -142,7 +142,6 @@ bool VCMEncoderDataBase::RequiresEncoderReset(
// Does not check startBitrate or maxFramerate
if (new_send_codec.codecType != send_codec_.codecType ||
strcmp(new_send_codec.plName, send_codec_.plName) != 0 ||
new_send_codec.plType != send_codec_.plType ||
new_send_codec.width != send_codec_.width ||
new_send_codec.height != send_codec_.height ||

View File

@ -68,8 +68,9 @@ int32_t VCMGenericEncoder::InitEncode(const VideoCodec* settings,
if (encoder_->InitEncode(settings, number_of_cores, max_payload_size) != 0) {
RTC_LOG(LS_ERROR) << "Failed to initialize the encoder associated with "
"payload name: "
<< settings->plName;
"codec type: "
<< CodecTypeToPayloadString(settings->codecType)
<< " (" << settings->codecType <<")";
return -1;
}
vcm_encoded_frame_callback_->Reset();

View File

@ -42,8 +42,6 @@ bool VideoCodecInitializer::SetupCodec(
return false;
}
codec->codecType = kVideoCodecMultiplex;
strncpy(codec->plName, settings.payload_name.c_str(),
sizeof(codec->plName));
return true;
}
@ -185,8 +183,6 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
break;
}
strncpy(video_codec.plName, payload_name.c_str(), kPayloadNameSize - 1);
video_codec.plName[kPayloadNameSize - 1] = '\0';
video_codec.plType = payload_type;
video_codec.numberOfSimulcastStreams =
static_cast<unsigned char>(streams.size());

View File

@ -68,8 +68,8 @@ int32_t VideoSender::RegisterSendCodec(const VideoCodec* sendCodec,
current_codec_ = *sendCodec;
if (!ret) {
RTC_LOG(LS_ERROR) << "Failed to initialize set encoder with payload name '"
<< sendCodec->plName << "'.";
RTC_LOG(LS_ERROR) << "Failed to initialize set encoder with codec type '"
<< sendCodec->codecType << "'.";
return VCM_CODEC_ERROR;
}