Fix iOS demo H264 profile display.
Bug: none Change-Id: I5e770f0b6b90822f4ab00432f0cbebc510d46a48 Reviewed-on: https://webrtc-review.googlesource.com/96360 Reviewed-by: Anders Carlsson <andersc@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24462}
This commit is contained in:
@ -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];
|
||||
|
Reference in New Issue
Block a user