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 issue also fixes some H.265 depacketizer issues for all platforms. There are still some issues expected to be fixed later. - H.265 only supported on iOS 11, iPhone 7 and later. Device and system check should be performed before calling H.265 APIs. - Profile, tier and level are not correctly handled. - QP is not enabled. This change has been modified during rebasing since some C++ files already been picked to 70-sdk branch. Change-Id: Idf6087bae4f12432178b571ab76ab55127b66f5f Reviewed-on: https://git-ccr-1.devtools.intel.com/gerrit/78608 Reviewed-by: Qiu, Jianlin <jianlin.qiu@intel.com> Tested-by: Qiu, Jianlin <jianlin.qiu@intel.com>
- Loading branch information
Showing
11 changed files
with
1,328 additions
and
220 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
68 changes: 68 additions & 0 deletions
68
sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH265.mm
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,68 @@ | ||
/* | ||
* 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 "RTCVideoCodec+Private.h" | ||
#import "WebRTC/RTCVideoCodec.h" | ||
|
||
#include "rtc_base/timeutils.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.