Update tgcalls

This commit is contained in:
Ali 2021-05-22 00:01:31 +04:00
parent 1567f13bb8
commit e375f634ed
2 changed files with 46 additions and 2 deletions

View file

@ -20,6 +20,7 @@
#else
#import "platform/darwin/VideoMetalView.h"
#import "platform/darwin/GLVideoView.h"
#import "platform/darwin/VideoSampleBufferView.h"
#import "platform/darwin/CustomExternalCapturer.h"
#endif
@ -145,6 +146,49 @@
@end
@interface VideoSampleBufferView (VideoViewImpl) <OngoingCallThreadLocalContextWebrtcVideoView, OngoingCallThreadLocalContextWebrtcVideoViewImpl>
@property (nonatomic, readwrite) OngoingCallVideoOrientationWebrtc orientation;
@property (nonatomic, readonly) CGFloat aspect;
@end
@implementation VideoSampleBufferView (VideoViewImpl)
- (OngoingCallVideoOrientationWebrtc)orientation {
return (OngoingCallVideoOrientationWebrtc)self.internalOrientation;
}
- (CGFloat)aspect {
return self.internalAspect;
}
- (void)setOrientation:(OngoingCallVideoOrientationWebrtc)orientation {
[self setInternalOrientation:(int)orientation];
}
- (void)setOnOrientationUpdated:(void (^ _Nullable)(OngoingCallVideoOrientationWebrtc, CGFloat))onOrientationUpdated {
if (onOrientationUpdated) {
[self internalSetOnOrientationUpdated:^(int value, CGFloat aspect) {
onOrientationUpdated((OngoingCallVideoOrientationWebrtc)value, aspect);
}];
} else {
[self internalSetOnOrientationUpdated:nil];
}
}
- (void)setOnIsMirroredUpdated:(void (^ _Nullable)(bool))onIsMirroredUpdated {
if (onIsMirroredUpdated) {
[self internalSetOnIsMirroredUpdated:^(bool value) {
onIsMirroredUpdated(value);
}];
} else {
[self internalSetOnIsMirroredUpdated:nil];
}
}
@end
@interface OngoingCallThreadLocalContextVideoCapturer () {
bool _keepLandscape;
std::shared_ptr<std::vector<uint8_t>> _croppingBuffer;
@ -1228,7 +1272,7 @@ private:
id<OngoingCallThreadLocalContextQueueWebrtc> queue = _queue;
dispatch_async(dispatch_get_main_queue(), ^{
if ([VideoMetalView isSupported]) {
VideoMetalView *remoteRenderer = [[VideoMetalView alloc] initWithFrame:CGRectZero];
VideoSampleBufferView *remoteRenderer = [[VideoSampleBufferView alloc] initWithFrame:CGRectZero];
#if TARGET_OS_IPHONE
remoteRenderer.videoContentMode = UIViewContentModeScaleToFill;
#else

@ -1 +1 @@
Subproject commit e66d8a025c9a5c6b1097c0017af18ff6a085d8e9
Subproject commit 75eec7a93832688e87d9134e4a314393009ad38f