Set video codec names in public API using existing cricket constants

For better consistency between the Objective-C API constant definitions
and the existing constants defined in the underlying core, re-use the
available video codec-name constants from cricket to define the peer
constants in the public API.

BUG=None

Change-Id: I8d5ddc2c1bd6670810fca1665aaf9a116620a34e
Reviewed-on: https://webrtc-review.googlesource.com/25360
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20883}
This commit is contained in:
VladimirTechMan
2017-11-23 12:22:11 -05:00
committed by Commit Bot
parent 09819ec373
commit 80adac053c
2 changed files with 6 additions and 4 deletions

View File

@ -80,7 +80,7 @@ class ObjCVideoEncoder : public VideoEncoder {
// CodecSpecificInfo only handles a hard coded list of codecs
id<RTCCodecSpecificInfo> rtcCodecSpecificInfo = nil;
if (codec_specific_info) {
if (strcmp(codec_specific_info->codec_name, "H264") == 0) {
if (strcmp(codec_specific_info->codec_name, cricket::kH264CodecName) == 0) {
RTCCodecSpecificInfoH264 *h264Info = [[RTCCodecSpecificInfoH264 alloc] init];
h264Info.packetizationMode =
(RTCH264PacketizationMode)codec_specific_info->codecSpecific.H264.packetization_mode;