mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
5becf67dac
@ -20,6 +20,7 @@
|
|||||||
#else
|
#else
|
||||||
#import "platform/darwin/VideoMetalView.h"
|
#import "platform/darwin/VideoMetalView.h"
|
||||||
#import "platform/darwin/GLVideoView.h"
|
#import "platform/darwin/GLVideoView.h"
|
||||||
|
#import "platform/darwin/VideoSampleBufferView.h"
|
||||||
#import "platform/darwin/CustomExternalCapturer.h"
|
#import "platform/darwin/CustomExternalCapturer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -145,6 +146,49 @@
|
|||||||
|
|
||||||
@end
|
@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 () {
|
@interface OngoingCallThreadLocalContextVideoCapturer () {
|
||||||
bool _keepLandscape;
|
bool _keepLandscape;
|
||||||
std::shared_ptr<std::vector<uint8_t>> _croppingBuffer;
|
std::shared_ptr<std::vector<uint8_t>> _croppingBuffer;
|
||||||
@ -1228,7 +1272,7 @@ private:
|
|||||||
id<OngoingCallThreadLocalContextQueueWebrtc> queue = _queue;
|
id<OngoingCallThreadLocalContextQueueWebrtc> queue = _queue;
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
if ([VideoMetalView isSupported]) {
|
if ([VideoMetalView isSupported]) {
|
||||||
VideoMetalView *remoteRenderer = [[VideoMetalView alloc] initWithFrame:CGRectZero];
|
VideoSampleBufferView *remoteRenderer = [[VideoSampleBufferView alloc] initWithFrame:CGRectZero];
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
remoteRenderer.videoContentMode = UIViewContentModeScaleToFill;
|
remoteRenderer.videoContentMode = UIViewContentModeScaleToFill;
|
||||||
#else
|
#else
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e66d8a025c9a5c6b1097c0017af18ff6a085d8e9
|
Subproject commit 75eec7a93832688e87d9134e4a314393009ad38f
|
2
third-party/libvpx/libvpx
vendored
2
third-party/libvpx/libvpx
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 4808d831dbc4e9ff83fa0efe11207bc135c6d6f5
|
Subproject commit 66c1ff6850fd53bcf5c17247569bea1d700d6247
|
22
third-party/webrtc/BUILD
vendored
22
third-party/webrtc/BUILD
vendored
@ -1,6 +1,18 @@
|
|||||||
|
|
||||||
webrtc_source_dir = "webrtc"
|
webrtc_source_dir = "webrtc"
|
||||||
|
|
||||||
|
config_setting(
|
||||||
|
name = "debug_build",
|
||||||
|
values = {
|
||||||
|
"compilation_mode": "dbg",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
optimization_flags = select({
|
||||||
|
":debug_build": ["-Os"],
|
||||||
|
"//conditions:default": [],
|
||||||
|
})
|
||||||
|
|
||||||
rnnoise_sources = [ "dependencies/third_party/rnnoise/src/" + x for x in [
|
rnnoise_sources = [ "dependencies/third_party/rnnoise/src/" + x for x in [
|
||||||
"rnn_vad_weights.cc",
|
"rnn_vad_weights.cc",
|
||||||
"rnn_vad_weights.h",
|
"rnn_vad_weights.h",
|
||||||
@ -3318,7 +3330,7 @@ cc_library(
|
|||||||
"-D__Userspace_os_Darwin",
|
"-D__Userspace_os_Darwin",
|
||||||
"-DPACKAGE_VERSION=''",
|
"-DPACKAGE_VERSION=''",
|
||||||
"-DHAVE_SCTP",
|
"-DHAVE_SCTP",
|
||||||
] + arch_specific_cflags,
|
] + arch_specific_cflags + optimization_flags,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3396,7 +3408,7 @@ cc_library(
|
|||||||
"-DHAVE_UNISTD_H",
|
"-DHAVE_UNISTD_H",
|
||||||
"-DPACKAGE_STRING='\"\"'",
|
"-DPACKAGE_STRING='\"\"'",
|
||||||
"-DHAVE_SCTP",
|
"-DHAVE_SCTP",
|
||||||
] + arch_specific_cflags,
|
] + arch_specific_cflags + optimization_flags,
|
||||||
deps = [
|
deps = [
|
||||||
"//third-party/boringssl:crypto",
|
"//third-party/boringssl:crypto",
|
||||||
"//third-party/boringssl:ssl",
|
"//third-party/boringssl:ssl",
|
||||||
@ -3443,7 +3455,7 @@ cc_library(
|
|||||||
"-Ithird-party/webrtc/dependencies/base/third_party/libevent",
|
"-Ithird-party/webrtc/dependencies/base/third_party/libevent",
|
||||||
"-Ithird-party/webrtc/dependencies",
|
"-Ithird-party/webrtc/dependencies",
|
||||||
"-Ithird-party/webrtc/" + webrtc_source_dir,
|
"-Ithird-party/webrtc/" + webrtc_source_dir,
|
||||||
] + arch_specific_cflags,
|
] + arch_specific_cflags + optimization_flags,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3521,7 +3533,7 @@ cc_library(
|
|||||||
copts = [
|
copts = [
|
||||||
"-ffp-contract=fast",
|
"-ffp-contract=fast",
|
||||||
"-Ithird-party/webrtc/dependencies/third_party/libyuv/include",
|
"-Ithird-party/webrtc/dependencies/third_party/libyuv/include",
|
||||||
] + arch_specific_cflags,
|
] + arch_specific_cflags + optimization_flags,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3565,7 +3577,7 @@ objc_library(
|
|||||||
"-D__Userspace_os_Darwin",
|
"-D__Userspace_os_Darwin",
|
||||||
"-DPACKAGE_VERSION='\"\"'",
|
"-DPACKAGE_VERSION='\"\"'",
|
||||||
"-DHAVE_SCTP",
|
"-DHAVE_SCTP",
|
||||||
] + arch_specific_cflags,
|
] + arch_specific_cflags + optimization_flags,
|
||||||
deps = [
|
deps = [
|
||||||
"//third-party/boringssl:crypto",
|
"//third-party/boringssl:crypto",
|
||||||
"//third-party/boringssl:ssl",
|
"//third-party/boringssl:ssl",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user