This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change applies #243912b03f7d089b1cdda31197baf05a2e37cb70 on m76 branch. It also fixes compile issues on iOS introduced by \#6c5fb0208451b8fbfc15087465ea8c3dc9421c92.
- Loading branch information
Showing
10 changed files
with
1,308 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2018 The WebRTC project authors. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license | ||
* that can be found in the LICENSE file in the root of the source | ||
* tree. An additional intellectual property rights grant can be found | ||
* in the file PATENTS. All contributing project authors may | ||
* be found in the AUTHORS file in the root of the source tree. | ||
*/ | ||
|
||
/* This file is borrowed from webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h */ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import <WebRTC/RTCMacros.h> | ||
#import <WebRTC/RTCVideoCodecFactory.h> | ||
|
||
RTC_OBJC_EXPORT | ||
API_AVAILABLE(ios(11.0)) | ||
@interface RTCCodecSpecificInfoH265 : NSObject <RTCCodecSpecificInfo> | ||
@end | ||
|
||
/** Encoder. */ | ||
RTC_OBJC_EXPORT | ||
API_AVAILABLE(ios(11.0)) | ||
@interface RTCVideoEncoderH265 : NSObject<RTCVideoEncoder> | ||
|
||
- (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo; | ||
|
||
@end | ||
|
||
/** Decoder. */ | ||
RTC_OBJC_EXPORT | ||
API_AVAILABLE(ios(11.0)) | ||
@interface RTCVideoDecoderH265 : NSObject<RTCVideoDecoder> | ||
@end | ||
|
||
/** Encoder factory. */ | ||
RTC_OBJC_EXPORT | ||
API_AVAILABLE(ios(11.0)) | ||
@interface RTCVideoEncoderFactoryH265 : NSObject<RTCVideoEncoderFactory> | ||
@end | ||
|
||
/** Decoder factory. */ | ||
RTC_OBJC_EXPORT | ||
API_AVAILABLE(ios(11.0)) | ||
@interface RTCVideoDecoderFactoryH265 : NSObject<RTCVideoDecoderFactory> | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright 2018 The WebRTC project authors. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license | ||
* that can be found in the LICENSE file in the root of the source | ||
* tree. An additional intellectual property rights grant can be found | ||
* in the file PATENTS. All contributing project authors may | ||
* be found in the AUTHORS file in the root of the source tree. | ||
*/ | ||
|
||
/* This file is borrowed from | ||
* webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH265.mm */ | ||
|
||
#import "WebRTC/RTCVideoCodecH265.h" | ||
|
||
#include <vector> | ||
|
||
#import "WebRTC/RTCVideoCodec.h" | ||
|
||
#include "rtc_base/time_utils.h" | ||
#include "system_wrappers/include/field_trial.h" | ||
|
||
static NSString* kH265CodecName = @"H265"; | ||
// TODO(jianjunz): This is value is not correct. | ||
static NSString* kLevel31Main = @"4d001f"; | ||
|
||
@implementation RTCCodecSpecificInfoH265 | ||
@end | ||
|
||
// Encoder factory. | ||
@implementation RTCVideoEncoderFactoryH265 | ||
|
||
- (NSArray<RTCVideoCodecInfo*>*)supportedCodecs { | ||
NSMutableArray<RTCVideoCodecInfo*>* codecs = [NSMutableArray array]; | ||
NSString* codecName = kH265CodecName; | ||
|
||
NSDictionary<NSString*, NSString*>* mainParams = @{ | ||
@"profile-level-id" : kLevel31Main, | ||
@"level-asymmetry-allowed" : @"1", | ||
@"packetization-mode" : @"1", | ||
}; | ||
RTCVideoCodecInfo* constrainedBaselineInfo = | ||
[[RTCVideoCodecInfo alloc] initWithName:codecName parameters:mainParams]; | ||
[codecs addObject:constrainedBaselineInfo]; | ||
|
||
return [codecs copy]; | ||
} | ||
|
||
- (id<RTCVideoEncoder>)createEncoder:(RTCVideoCodecInfo*)info { | ||
return [[RTCVideoEncoderH265 alloc] initWithCodecInfo:info]; | ||
} | ||
|
||
@end | ||
|
||
// Decoder factory. | ||
@implementation RTCVideoDecoderFactoryH265 | ||
|
||
- (id<RTCVideoDecoder>)createDecoder:(RTCVideoCodecInfo*)info { | ||
return [[RTCVideoDecoderH265 alloc] init]; | ||
} | ||
|
||
- (NSArray<RTCVideoCodecInfo*>*)supportedCodecs { | ||
NSString* codecName = kH265CodecName; | ||
return @[ [[RTCVideoCodecInfo alloc] initWithName:codecName parameters:nil] ]; | ||
} | ||
|
||
@end |
Oops, something went wrong.