-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28) Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40) rotationOverride should not be assign (#44) [ObjC] Expose properties / methods required for AV1 codec support (#60) Workaround: Render PixelBuffer in RTCMTLVideoView (#58) Improve iOS/macOS H264 encoder (#70) Co-authored-by: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com>
- Loading branch information
1 parent
79af6cc
commit ef5f700
Showing
23 changed files
with
988 additions
and
232 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,33 @@ | ||
/* | ||
* Copyright 2023 LiveKit | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "RTCRtpCapabilities.h" | ||
|
||
#include "api/rtp_parameters.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface RTC_OBJC_TYPE (RTCRtpCapabilities) | ||
() | ||
|
||
@property(nonatomic, readonly) webrtc::RtpCapabilities nativeCapabilities; | ||
|
||
- (instancetype)initWithNativeCapabilities:(const webrtc::RtpCapabilities &)nativeCapabilities | ||
NS_DESIGNATED_INITIALIZER; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_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,40 @@ | ||
/* | ||
* Copyright 2023 LiveKit | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "RTCMacros.h" | ||
|
||
@class RTC_OBJC_TYPE(RTCRtpCodecCapability); | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
RTC_OBJC_EXPORT | ||
@interface RTC_OBJC_TYPE (RTCRtpCapabilities) : NSObject | ||
|
||
- (instancetype)init NS_UNAVAILABLE; | ||
|
||
@property(nonatomic, readonly) NSArray<RTC_OBJC_TYPE(RTCRtpCodecCapability) *> *codecs; | ||
|
||
// Not implemented. | ||
// std::vector<RtpHeaderExtensionCapability> header_extensions; | ||
|
||
// Not implemented. | ||
// std::vector<FecMechanism> fec; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_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,50 @@ | ||
/* | ||
* Copyright 2023 LiveKit | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "RTCRtpCapabilities+Private.h" | ||
#import "RTCRtpCodecCapability+Private.h" | ||
|
||
#import "RTCMediaStreamTrack.h" | ||
#import "helpers/NSString+StdString.h" | ||
|
||
#include "media/base/media_constants.h" | ||
#include "rtc_base/checks.h" | ||
|
||
@implementation RTC_OBJC_TYPE (RTCRtpCapabilities) | ||
|
||
@synthesize nativeCapabilities = _nativeCapabilities; | ||
|
||
- (instancetype)initWithNativeCapabilities:(const webrtc::RtpCapabilities &)nativeCapabilities { | ||
if (self = [super init]) { | ||
_nativeCapabilities = nativeCapabilities; | ||
} | ||
|
||
return self; | ||
} | ||
|
||
- (NSArray<RTC_OBJC_TYPE(RTCRtpCodecCapability) *> *)codecs { | ||
NSMutableArray *result = [NSMutableArray array]; | ||
|
||
for (auto &element : _nativeCapabilities.codecs) { | ||
RTCRtpCodecCapability *object = | ||
[[RTCRtpCodecCapability alloc] initWithNativeCodecCapability:element]; | ||
[result addObject:object]; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@end |
33 changes: 33 additions & 0 deletions
33
sdk/objc/api/peerconnection/RTCRtpCodecCapability+Private.h
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,33 @@ | ||
/* | ||
* Copyright 2023 LiveKit | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "RTCRtpCodecCapability.h" | ||
|
||
#include "api/rtp_parameters.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface RTC_OBJC_TYPE (RTCRtpCodecCapability) | ||
() | ||
|
||
@property(nonatomic, readonly) webrtc::RtpCodecCapability nativeCodecCapability; | ||
|
||
- (instancetype)initWithNativeCodecCapability: | ||
(const webrtc::RtpCodecCapability &)nativeCodecCapability NS_DESIGNATED_INITIALIZER; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.