| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  *  Copyright 2017 The WebRTC project authors. All Rights Reserved. |   2  *  Copyright 2017 The WebRTC project authors. All Rights Reserved. | 
|   3  * |   3  * | 
|   4  *  Use of this source code is governed by a BSD-style license |   4  *  Use of this source code is governed by a BSD-style license | 
|   5  *  that can be found in the LICENSE file in the root of the source |   5  *  that can be found in the LICENSE file in the root of the source | 
|   6  *  tree. An additional intellectual property rights grant can be found |   6  *  tree. An additional intellectual property rights grant can be found | 
|   7  *  in the file PATENTS.  All contributing project authors may |   7  *  in the file PATENTS.  All contributing project authors may | 
|   8  *  be found in the AUTHORS file in the root of the source tree. |   8  *  be found in the AUTHORS file in the root of the source tree. | 
|   9  */ |   9  */ | 
|  10  |  10  | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  51   NSMutableArray<RTCVideoCodecInfo *> *codecs = [NSMutableArray array]; |  51   NSMutableArray<RTCVideoCodecInfo *> *codecs = [NSMutableArray array]; | 
|  52   NSString *codecName = [NSString stringWithUTF8String:cricket::kH264CodecName]; |  52   NSString *codecName = [NSString stringWithUTF8String:cricket::kH264CodecName]; | 
|  53  |  53  | 
|  54   if (IsHighProfileEnabled()) { |  54   if (IsHighProfileEnabled()) { | 
|  55     NSDictionary<NSString *, NSString *> *constrainedHighParams = @{ |  55     NSDictionary<NSString *, NSString *> *constrainedHighParams = @{ | 
|  56       @"profile-level-id" : kLevel31ConstrainedHigh, |  56       @"profile-level-id" : kLevel31ConstrainedHigh, | 
|  57       @"level-asymmetry-allowed" : @"1", |  57       @"level-asymmetry-allowed" : @"1", | 
|  58       @"packetization-mode" : @"1", |  58       @"packetization-mode" : @"1", | 
|  59     }; |  59     }; | 
|  60     RTCVideoCodecInfo *constrainedHighInfo = |  60     RTCVideoCodecInfo *constrainedHighInfo = | 
|  61         [[RTCVideoCodecInfo alloc] initWithPayload:0 |  61         [[RTCVideoCodecInfo alloc] initWithName:codecName parameters:constrained
    HighParams]; | 
|  62                                               name:codecName |  | 
|  63                                         parameters:constrainedHighParams]; |  | 
|  64     [codecs addObject:constrainedHighInfo]; |  62     [codecs addObject:constrainedHighInfo]; | 
|  65   } |  63   } | 
|  66  |  64  | 
|  67   NSDictionary<NSString *, NSString *> *constrainedBaselineParams = @{ |  65   NSDictionary<NSString *, NSString *> *constrainedBaselineParams = @{ | 
|  68     @"profile-level-id" : kLevel31ConstrainedBaseline, |  66     @"profile-level-id" : kLevel31ConstrainedBaseline, | 
|  69     @"level-asymmetry-allowed" : @"1", |  67     @"level-asymmetry-allowed" : @"1", | 
|  70     @"packetization-mode" : @"1", |  68     @"packetization-mode" : @"1", | 
|  71   }; |  69   }; | 
|  72   RTCVideoCodecInfo *constrainedBaselineInfo = |  70   RTCVideoCodecInfo *constrainedBaselineInfo = | 
|  73       [[RTCVideoCodecInfo alloc] initWithPayload:0 |  71       [[RTCVideoCodecInfo alloc] initWithName:codecName parameters:constrainedBa
    selineParams]; | 
|  74                                             name:codecName |  | 
|  75                                       parameters:constrainedBaselineParams]; |  | 
|  76   [codecs addObject:constrainedBaselineInfo]; |  72   [codecs addObject:constrainedBaselineInfo]; | 
|  77  |  73  | 
|  78   return [codecs copy]; |  74   return [codecs copy]; | 
|  79 } |  75 } | 
|  80  |  76  | 
|  81 - (id<RTCVideoEncoder>)createEncoder:(RTCVideoCodecInfo *)info { |  77 - (id<RTCVideoEncoder>)createEncoder:(RTCVideoCodecInfo *)info { | 
|  82   return [[RTCVideoEncoderH264 alloc] initWithCodecInfo:info]; |  78   return [[RTCVideoEncoderH264 alloc] initWithCodecInfo:info]; | 
|  83 } |  79 } | 
|  84  |  80  | 
|  85 @end |  81 @end | 
|  86  |  82  | 
|  87 // Decoder factory. |  83 // Decoder factory. | 
|  88 @implementation RTCVideoDecoderFactoryH264 |  84 @implementation RTCVideoDecoderFactoryH264 | 
|  89  |  85  | 
|  90 - (id<RTCVideoDecoder>)createDecoder:(RTCVideoCodecInfo *)info { |  86 - (id<RTCVideoDecoder>)createDecoder:(RTCVideoCodecInfo *)info { | 
|  91   return [[RTCVideoDecoderH264 alloc] init]; |  87   return [[RTCVideoDecoderH264 alloc] init]; | 
|  92 } |  88 } | 
|  93  |  89  | 
|  94 - (NSArray<RTCVideoCodecInfo *> *)supportedCodecs { |  90 - (NSArray<RTCVideoCodecInfo *> *)supportedCodecs { | 
|  95   NSString *codecName = [NSString stringWithUTF8String:cricket::kH264CodecName]; |  91   NSString *codecName = [NSString stringWithUTF8String:cricket::kH264CodecName]; | 
|  96   return @[ [[RTCVideoCodecInfo alloc] initWithPayload:0 name:codecName paramete
    rs:@{}] ]; |  92   return @[ [[RTCVideoCodecInfo alloc] initWithName:codecName parameters:nil] ]; | 
|  97 } |  93 } | 
|  98  |  94  | 
|  99 @end |  95 @end | 
| OLD | NEW |