diff --git a/examples/objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m b/examples/objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m index de1998a693..6c18cf3ebb 100644 --- a/examples/objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m +++ b/examples/objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m @@ -9,15 +9,20 @@ */ #import "RTCVideoCodecInfo+HumanReadable.h" +#import "WebRTC/RTCVideoCodecH264.h" @implementation RTCVideoCodecInfo (HumanReadable) - (NSString *)humanReadableDescription { if ([self.name isEqualToString:@"H264"]) { NSString *profileId = self.parameters[@"profile-level-id"]; - if ([profileId isEqualToString:@"640c1f"]) { + RTCH264ProfileLevelId *profileLevelId = + [[RTCH264ProfileLevelId alloc] initWithHexString:profileId]; + if (profileLevelId.profile == RTCH264ProfileConstrainedHigh || + profileLevelId.profile == RTCH264ProfileHigh) { return @"H264 (High)"; - } else if ([profileId isEqualToString:@"42e01f"]) { + } else if (profileLevelId.profile == RTCH264ProfileConstrainedBaseline || + profileLevelId.profile == RTCH264ProfileBaseline) { return @"H264 (Baseline)"; } else { return [NSString stringWithFormat:@"H264 (%@)", profileId];