diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift index 25daec2156..05618a191c 100644 --- a/submodules/ChatListUI/Sources/ChatListController.swift +++ b/submodules/ChatListUI/Sources/ChatListController.swift @@ -207,6 +207,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController self.tabBarItem.image = icon self.tabBarItem.selectedImage = icon self.tabBarItem.animationName = "TabChats" + self.tabBarItem.animationOffset = CGPoint(x: 0.0, y: UIScreenPixel) let leftBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Edit, style: .plain, target: self, action: #selector(self.editPressed)) leftBarButtonItem.accessibilityLabel = self.presentationData.strings.Common_Edit diff --git a/submodules/TabBarUI/Sources/TabBarNode.swift b/submodules/TabBarUI/Sources/TabBarNode.swift index 9e5069d040..7a03f80e1e 100644 --- a/submodules/TabBarUI/Sources/TabBarNode.swift +++ b/submodules/TabBarUI/Sources/TabBarNode.swift @@ -654,10 +654,11 @@ class TabBarNode: ASDisplayNode { let scaleFactor: CGFloat = horizontal ? 0.8 : 1.0 node.animationContainerNode.subnodeTransform = CATransform3DMakeScale(scaleFactor, scaleFactor, 1.0) + let animationOffset: CGPoint = self.tabBarItems[i].item.animationOffset if horizontal { node.animationNode.frame = CGRect(origin: CGPoint(x: -10.0 - UIScreenPixel, y: -4.0 - UIScreenPixel), size: CGSize(width: 51.0, height: 51.0)) } else { - node.animationNode.frame = CGRect(origin: CGPoint(x: floorToScreenPixels((nodeSize.width - 51.0) / 2.0), y: -10.0 - UIScreenPixel), size: CGSize(width: 51.0, height: 51.0)) + node.animationNode.frame = CGRect(origin: CGPoint(x: floorToScreenPixels((nodeSize.width - 51.0) / 2.0), y: -10.0 - UIScreenPixel).offsetBy(dx: animationOffset.x, dy: animationOffset.y), size: CGSize(width: 51.0, height: 51.0)) } if container.badgeValue != container.appliedBadgeValue { diff --git a/submodules/TelegramUI/Sources/ChatQrCodeScreen.swift b/submodules/TelegramUI/Sources/ChatQrCodeScreen.swift index 4ce12005e5..b4cb282917 100644 --- a/submodules/TelegramUI/Sources/ChatQrCodeScreen.swift +++ b/submodules/TelegramUI/Sources/ChatQrCodeScreen.swift @@ -2187,7 +2187,6 @@ func renderVideo(context: AccountContext, backgroundImage: UIImage, media: Teleg let timeRange = CMTimeRange(start: .zero, duration: duration) try compositionTrack.insertTimeRange(timeRange, of: assetTrack, at: .zero) } catch { - print(error) completion(nil) return } @@ -2228,7 +2227,6 @@ func renderVideo(context: AccountContext, backgroundImage: UIImage, media: Teleg instruction.layerInstructions = [layerInstruction] guard let export = AVAssetExportSession(asset: composition, presetName: AVAssetExportPresetHighestQuality) else { - print("Cannot create export session.") completion(nil) return } @@ -2240,13 +2238,11 @@ func renderVideo(context: AccountContext, backgroundImage: UIImage, media: Teleg export.outputURL = exportURL export.exportAsynchronously { - DispatchQueue.main.async { + Queue.mainQueue().async { switch export.status { case .completed: completion(exportURL) default: - print("Something went wrong during export.") - print(export.error ?? "unknown error") completion(nil) break } diff --git a/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift index 9292ecc789..3a5ca4785a 100644 --- a/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift +++ b/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift @@ -330,7 +330,7 @@ final class ReplyAccessoryPanelNode: AccessoryPanelNode { } if let dustNode = self.dustNode { - dustNode.update(size: textFrame.size, color: self.theme.chat.inputPanel.primaryTextColor, textColor: self.theme.chat.inputPanel.primaryTextColor, rects: textLayout.spoilers.map { $0.1.offsetBy(dx: 3.0, dy: 3.0).insetBy(dx: 1.0, dy: 1.0) }, wordRects: textLayout.spoilerWords.map { $0.1.offsetBy(dx: 3.0, dy: 3.0).insetBy(dx: 1.0, dy: 1.0) }) + dustNode.update(size: textFrame.size, color: self.theme.chat.inputPanel.secondaryTextColor, textColor: self.theme.chat.inputPanel.primaryTextColor, rects: textLayout.spoilers.map { $0.1.offsetBy(dx: 3.0, dy: 3.0).insetBy(dx: 1.0, dy: 1.0) }, wordRects: textLayout.spoilerWords.map { $0.1.offsetBy(dx: 3.0, dy: 3.0).insetBy(dx: 1.0, dy: 1.0) }) dustNode.frame = textFrame.insetBy(dx: -3.0, dy: -3.0).offsetBy(dx: 0.0, dy: 3.0) } } else if let dustNode = self.dustNode { diff --git a/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.h b/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.h index 366137ba47..d74520c5d6 100644 --- a/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.h +++ b/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.h @@ -49,5 +49,6 @@ NSInteger UITabBarItem_addSetBadgeListener(UITabBarItem * _Nonnull item, UITabBa - (void)removeSetSelectedImageListener:(NSInteger)key; @property (nonatomic, strong) NSString * _Nullable animationName; +@property (nonatomic, assign) CGPoint animationOffset; @end diff --git a/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.m b/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.m index 99f6b435aa..bac5ab17db 100644 --- a/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.m +++ b/submodules/UIKitRuntimeUtils/Source/UIKitRuntimeUtils/UINavigationItem+Proxy.m @@ -17,6 +17,7 @@ static const void *setBackBarButtonItemListenerBagKey = &setBackBarButtonItemLis static const void *setBadgeListenerBagKey = &setBadgeListenerBagKey; static const void *badgeKey = &badgeKey; static const void *animationNameKey = &animationNameKey; +static const void *animationOffsetKey = &animationOffsetKey; @implementation UINavigationItem (Proxy) @@ -404,14 +405,18 @@ NSInteger UITabBarItem_addSetBadgeListener(UITabBarItem *item, UITabBarItemSetBa - (void)setAnimationName:(NSString *)animationName { [self setAssociatedObject:animationName forKey:animationNameKey]; - -// [(NSBag *)[self associatedObjectForKey:setBadgeListenerBagKey] enumerateItems:^(UITabBarItemSetBadgeListener listener) { -// listener(badge); -// }]; } - (NSString *)animationName { return [self associatedObjectForKey:animationNameKey]; } +- (void)setAnimationOffset:(CGPoint)animationOffset { + [self setAssociatedObject:[NSValue valueWithCGPoint:animationOffset] forKey:animationOffsetKey]; +} + +- (CGPoint)animationOffset { + return ((NSValue *)[self associatedObjectForKey:animationOffsetKey]).CGPointValue; +} + @end diff --git a/third-party/webrtc/BUILD b/third-party/webrtc/BUILD index 86bec46394..65d1a425ab 100644 --- a/third-party/webrtc/BUILD +++ b/third-party/webrtc/BUILD @@ -2164,6 +2164,7 @@ webrtc_sources = [ "modules/rtp_rtcp/source/rtp_descriptor_authentication.h", "modules/rtp_rtcp/source/rtp_format.h", "modules/rtp_rtcp/source/rtp_format_h264.h", + "modules/rtp_rtcp/source/rtp_format_h265.h", "modules/rtp_rtcp/source/rtp_format_video_generic.h", "modules/rtp_rtcp/source/rtp_format_vp8.h", "modules/rtp_rtcp/source/rtp_format_vp9.h", @@ -2859,10 +2860,17 @@ webrtc_sources = [ "api/sequence_checker.h", "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h", "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h", + "modules/rtp_rtcp/source/video_rtp_depacketizer_h265.h", "modules/rtp_rtcp/source/packet_sequencer.h", "modules/rtp_rtcp/source/packet_sequencer.cc", "modules/video_coding/svc/scalability_structure_full_svc.h", "modules/video_coding/svc/scalability_structure_key_svc.h", + "modules/video_coding/codecs/h265/include/h265_globals.h", + "common_video/h265/h265_common.h", + "common_video/h265/h265_vps_parser.h", + "common_video/h265/h265_bitstream_parser.h", + "common_video/h265/h265_sps_parser.h", + "common_video/h265/h265_pps_parser.h", "rtc_base/async_resolver.h", "rtc_base/async_resolver.cc", "rtc_base/experiments/bandwidth_quality_scaler_settings.h", @@ -2936,6 +2944,7 @@ webrtc_sources = [ "modules/audio_processing/agc2/adaptive_digital_gain_controller.cc", "modules/video_coding/utility/framerate_controller_deprecated.h", "modules/video_coding/utility/framerate_controller_deprecated.cc", + "modules/video_coding/h265_vps_sps_pps_tracker.h", "video/adaptation/bandwidth_quality_scaler_resource.cc", "api/wrapping_async_dns_resolver.cc", "modules/video_coding/utility/bandwidth_quality_scaler.cc", @@ -3046,6 +3055,9 @@ ios_sources = [ "objc/components/video_codec/RTCVideoDecoderH264.mm", "objc/components/video_codec/RTCVideoEncoderH264.h", "objc/components/video_codec/RTCVideoEncoderH264.mm", + "objc/components/video_codec/RTCH265ProfileLevelId.h", + "objc/components/video_codec/RTCCodecSpecificInfoH265.h", + "objc/components/video_codec/RTCCodecSpecificInfoH265+Private.h", "objc/api/video_codec/RTCVideoCodecConstants.h", "objc/api/video_codec/RTCVideoCodecConstants.mm", "objc/components/video_codec/helpers.cc",