mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge commit 'b0c24338e32af6f6054a627c431eece8fbc9fd3c' into experimental-2
This commit is contained in:
commit
196f0cc61e
@ -0,0 +1,19 @@
|
||||
//
|
||||
// SQueueLocalObject.h
|
||||
// SSignalKit
|
||||
//
|
||||
// Created by Mikhail Filimonov on 13.01.2021.
|
||||
// Copyright © 2021 Telegram. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SSignalKit/SQueue.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SQueueLocalObject : NSObject
|
||||
-(id)initWithQueue:(SQueue *)queue generate:(id (^)(void))next;
|
||||
-(void)with:(void (^)(id object))f;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -0,0 +1,40 @@
|
||||
//
|
||||
// SQueueLocalObject.m
|
||||
// SSignalKit
|
||||
//
|
||||
// Created by Mikhail Filimonov on 13.01.2021.
|
||||
// Copyright © 2021 Telegram. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SQueueLocalObject.h"
|
||||
|
||||
@implementation SQueueLocalObject {
|
||||
SQueue *queue;
|
||||
id valueRef;
|
||||
}
|
||||
-(id)initWithQueue:(SQueue *)queue generate:(id _Nonnull (^)(void))next {
|
||||
if (self = [super init]) {
|
||||
self->queue = queue;
|
||||
[queue dispatch:^{
|
||||
self->valueRef = next();
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)with:(void (^)(id object))f {
|
||||
[self->queue dispatch:^{
|
||||
f(self->valueRef);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)dealloc {
|
||||
__block id value = self->valueRef;
|
||||
self->valueRef = nil;
|
||||
[queue dispatch:^{
|
||||
value = nil;
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -35,3 +35,4 @@ FOUNDATION_EXPORT const unsigned char SSignalKitVersionString[];
|
||||
#import <SSignalKit/SMulticastSignalManager.h>
|
||||
#import <SSignalKit/STimer.h>
|
||||
#import <SSignalKit/SVariable.h>
|
||||
#import <SSignalKit/SQueueLocalObject.h>
|
||||
|
@ -1379,7 +1379,7 @@ static void processJoinPayload(tgcalls::GroupJoinPayload &payload, void (^ _Nonn
|
||||
completion(remoteRenderer);
|
||||
} else {
|
||||
GLVideoView *remoteRenderer = [[GLVideoView alloc] initWithFrame:CGRectZero];
|
||||
|
||||
// [remoteRenderer setVideoContentMode:kCAGravityResizeAspectFill];
|
||||
std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink = [remoteRenderer getSink];
|
||||
|
||||
[queue dispatch:^{
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1c6747b73fd19043d7bd382ea208ba78314fed00
|
||||
Subproject commit ff6c6f97a6546049f0543bb5322789348e119b9d
|
Loading…
x
Reference in New Issue
Block a user