diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfc74858c2..34d314c55e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: fetch-depth: '0' - name: Set active Xcode path - run: sudo xcode-select -s /Applications/Xcode_12.3.app/Contents/Developer + run: sudo xcode-select -s /Applications/Xcode_12.4.app/Contents/Developer - name: Create canonical source directory run: | @@ -40,8 +40,8 @@ jobs: # download bazel mkdir -p $HOME/bazel-dist pushd $HOME/bazel-dist - curl -O -L https://github.com/bazelbuild/bazel/releases/download/3.7.0/bazel-3.7.0-darwin-x86_64 - mv bazel-3.7.0* bazel + curl -O -L https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-darwin-x86_64 + mv bazel-4.0.0* bazel chmod +x bazel ./bazel --version popd diff --git a/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift b/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift index 3cb46c59b1..f63db4ddeb 100644 --- a/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift +++ b/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift @@ -258,7 +258,7 @@ private final class ImportManager { if !pathExtension.isEmpty, let value = TGMimeTypeMap.mimeType(forExtension: pathExtension) { mimeType = value } - return ChatHistoryImport.uploadMedia(account: account, session: session, file: tempFile, fileName: entry.0.path, mimeType: mimeType, type: entry.2) + return ChatHistoryImport.uploadMedia(account: account, session: session, file: tempFile, disposeFileAfterDone: true, fileName: entry.0.path, mimeType: mimeType, type: entry.2) |> mapError { error -> ImportError in switch error { case .chatAdminRequired: diff --git a/submodules/MediaPlayer/Sources/FFMpegAudioFrameDecoder.swift b/submodules/MediaPlayer/Sources/FFMpegAudioFrameDecoder.swift index 8324cb4d8e..c3d0d2b570 100644 --- a/submodules/MediaPlayer/Sources/FFMpegAudioFrameDecoder.swift +++ b/submodules/MediaPlayer/Sources/FFMpegAudioFrameDecoder.swift @@ -11,11 +11,29 @@ final class FFMpegAudioFrameDecoder: MediaTrackFrameDecoder { private var delayedFrames: [MediaTrackFrame] = [] - init(codecContext: FFMpegAVCodecContext) { + init(codecContext: FFMpegAVCodecContext, sampleRate: Int = 44100, channelCount: Int = 2) { self.codecContext = codecContext self.audioFrame = FFMpegAVFrame() - self.swrContext = FFMpegSWResample(sourceChannelCount: Int(codecContext.channels()), sourceSampleRate: Int(codecContext.sampleRate()), sourceSampleFormat: codecContext.sampleFormat(), destinationChannelCount: 2, destinationSampleRate: 44100, destinationSampleFormat: FFMPEG_AV_SAMPLE_FMT_S16) + self.swrContext = FFMpegSWResample(sourceChannelCount: Int(codecContext.channels()), sourceSampleRate: Int(codecContext.sampleRate()), sourceSampleFormat: codecContext.sampleFormat(), destinationChannelCount: channelCount, destinationSampleRate: sampleRate, destinationSampleFormat: FFMPEG_AV_SAMPLE_FMT_S16) + } + + func decodeRaw(frame: MediaTrackDecodableFrame) -> Data? { + let status = frame.packet.send(toDecoder: self.codecContext) + if status == 0 { + let result = self.codecContext.receive(into: self.audioFrame) + if case .success = result { + guard let data = self.swrContext.resample(self.audioFrame) else { + return nil + } + + return data + } else { + return nil + } + } else { + return nil + } } func decode(frame: MediaTrackDecodableFrame) -> MediaTrackFrame? { diff --git a/submodules/MediaPlayer/Sources/MediaTrackDecodableFrame.swift b/submodules/MediaPlayer/Sources/MediaTrackDecodableFrame.swift index 692e8f6484..9c49f4da3b 100644 --- a/submodules/MediaPlayer/Sources/MediaTrackDecodableFrame.swift +++ b/submodules/MediaPlayer/Sources/MediaTrackDecodableFrame.swift @@ -23,4 +23,8 @@ public final class MediaTrackDecodableFrame { self.packet = packet } + + public func copyPacketData() -> Data { + return Data(bytes: self.packet.data, count: Int(self.packet.size)) + } } diff --git a/submodules/MediaPlayer/Sources/SoftwareVideoSource.swift b/submodules/MediaPlayer/Sources/SoftwareVideoSource.swift index 1e252012a7..dfb882b54b 100644 --- a/submodules/MediaPlayer/Sources/SoftwareVideoSource.swift +++ b/submodules/MediaPlayer/Sources/SoftwareVideoSource.swift @@ -179,7 +179,7 @@ public final class SoftwareVideoSource { if endOfStream { break } else { - if let avFormatContext = self.avFormatContext, let videoStream = self.videoStream { + if let _ = self.avFormatContext, let _ = self.videoStream { endOfStream = true break } else { @@ -254,3 +254,197 @@ public final class SoftwareVideoSource { } } } + +private final class SoftwareAudioStream { + let index: Int + let fps: CMTime + let timebase: CMTime + let duration: CMTime + let decoder: FFMpegAudioFrameDecoder + + init(index: Int, fps: CMTime, timebase: CMTime, duration: CMTime, decoder: FFMpegAudioFrameDecoder) { + self.index = index + self.fps = fps + self.timebase = timebase + self.duration = duration + self.decoder = decoder + } +} + +public final class SoftwareAudioSource { + private var readingError = false + private var audioStream: SoftwareAudioStream? + private var avIoContext: FFMpegAVIOContext? + private var avFormatContext: FFMpegAVFormatContext? + private let path: String + fileprivate let fd: Int32? + fileprivate let size: Int32 + + private var hasReadToEnd: Bool = false + + public init(path: String) { + let _ = FFMpegMediaFrameSourceContextHelpers.registerFFMpegGlobals + + var s = stat() + stat(path, &s) + self.size = Int32(s.st_size) + + let fd = open(path, O_RDONLY, S_IRUSR) + if fd >= 0 { + self.fd = fd + } else { + self.fd = nil + } + + self.path = path + + let avFormatContext = FFMpegAVFormatContext() + + let ioBufferSize = 64 * 1024 + + let avIoContext = FFMpegAVIOContext(bufferSize: Int32(ioBufferSize), opaqueContext: Unmanaged.passUnretained(self).toOpaque(), readPacket: readPacketCallback, writePacket: nil, seek: seekCallback) + self.avIoContext = avIoContext + + avFormatContext.setIO(self.avIoContext!) + + if !avFormatContext.openInput() { + self.readingError = true + return + } + + if !avFormatContext.findStreamInfo() { + self.readingError = true + return + } + + self.avFormatContext = avFormatContext + + var audioStream: SoftwareAudioStream? + + for streamIndexNumber in avFormatContext.streamIndices(for: FFMpegAVFormatStreamTypeAudio) { + let streamIndex = streamIndexNumber.int32Value + if avFormatContext.isAttachedPic(atStreamIndex: streamIndex) { + continue + } + + let codecId = avFormatContext.codecId(atStreamIndex: streamIndex) + + let fpsAndTimebase = avFormatContext.fpsAndTimebase(forStreamIndex: streamIndex, defaultTimeBase: CMTimeMake(value: 1, timescale: 40000)) + let (fps, timebase) = (fpsAndTimebase.fps, fpsAndTimebase.timebase) + + let duration = CMTimeMake(value: avFormatContext.duration(atStreamIndex: streamIndex), timescale: timebase.timescale) + + let codec = FFMpegAVCodec.find(forId: codecId) + + if let codec = codec { + let codecContext = FFMpegAVCodecContext(codec: codec) + if avFormatContext.codecParams(atStreamIndex: streamIndex, to: codecContext) { + if codecContext.open() { + audioStream = SoftwareAudioStream(index: Int(streamIndex), fps: fps, timebase: timebase, duration: duration, decoder: FFMpegAudioFrameDecoder(codecContext: codecContext, sampleRate: 48000, channelCount: 1)) + break + } + } + } + } + + self.audioStream = audioStream + + if let audioStream = self.audioStream { + avFormatContext.seekFrame(forStreamIndex: Int32(audioStream.index), pts: 0, positionOnKeyframe: false) + } + } + + deinit { + if let fd = self.fd { + close(fd) + } + } + + private func readPacketInternal() -> FFMpegPacket? { + guard let avFormatContext = self.avFormatContext else { + return nil + } + + let packet = FFMpegPacket() + if avFormatContext.readFrame(into: packet) { + return packet + } else { + return nil + } + } + + func readDecodableFrame() -> (MediaTrackDecodableFrame?, Bool) { + var frames: [MediaTrackDecodableFrame] = [] + var endOfStream = false + + while !self.readingError && frames.isEmpty { + if let packet = self.readPacketInternal() { + if let audioStream = audioStream, Int(packet.streamIndex) == audioStream.index { + let packetPts = packet.pts + + let pts = CMTimeMake(value: packetPts, timescale: audioStream.timebase.timescale) + let dts = CMTimeMake(value: packet.dts, timescale: audioStream.timebase.timescale) + + let duration: CMTime + + let frameDuration = packet.duration + if frameDuration != 0 { + duration = CMTimeMake(value: frameDuration * audioStream.timebase.value, timescale: audioStream.timebase.timescale) + } else { + duration = audioStream.fps + } + + let frame = MediaTrackDecodableFrame(type: .audio, packet: packet, pts: pts, dts: dts, duration: duration) + frames.append(frame) + } + } else { + if endOfStream { + break + } else { + if let _ = self.avFormatContext, let _ = self.audioStream { + endOfStream = true + break + } else { + endOfStream = true + break + } + } + } + } + + return (frames.first, endOfStream) + } + + public func readFrame() -> Data? { + guard let audioStream = self.audioStream, let _ = self.avFormatContext else { + return nil + } + + let (decodableFrame, _) = self.readDecodableFrame() + if let decodableFrame = decodableFrame { + return audioStream.decoder.decodeRaw(frame: decodableFrame) + } else { + return nil + } + } + + public func readEncodedFrame() -> (Data, Int)? { + guard let _ = self.audioStream, let _ = self.avFormatContext else { + return nil + } + + let (decodableFrame, _) = self.readDecodableFrame() + if let decodableFrame = decodableFrame { + return (decodableFrame.copyPacketData(), Int(decodableFrame.packet.duration - max(0, -decodableFrame.packet.pts))) + } else { + return nil + } + } + + public func seek(timestamp: Double) { + if let stream = self.audioStream, let avFormatContext = self.avFormatContext { + let pts = CMTimeMakeWithSeconds(timestamp, preferredTimescale: stream.timebase.timescale) + avFormatContext.seekFrame(forStreamIndex: Int32(stream.index), pts: pts.value, positionOnKeyframe: false) + } + } +} diff --git a/submodules/OpusBinding/PublicHeaders/OpusBinding/OggOpusReader.h b/submodules/OpusBinding/PublicHeaders/OpusBinding/OggOpusReader.h index 2bfe4c5438..383b0b94e1 100644 --- a/submodules/OpusBinding/PublicHeaders/OpusBinding/OggOpusReader.h +++ b/submodules/OpusBinding/PublicHeaders/OpusBinding/OggOpusReader.h @@ -2,12 +2,21 @@ NS_ASSUME_NONNULL_BEGIN +@interface OggOpusFrame : NSObject + +@property (nonatomic, readonly) int numSamples; +@property (nonatomic, strong, readonly) NSData *data; + +@end + @interface OggOpusReader : NSObject - (instancetype _Nullable)initWithPath:(NSString *)path; - (int32_t)read:(void *)pcmData bufSize:(int)bufSize; ++ (NSArray * _Nullable)extractFrames:(NSData *)data; + @end NS_ASSUME_NONNULL_END diff --git a/submodules/OpusBinding/Sources/OggOpusReader.m b/submodules/OpusBinding/Sources/OggOpusReader.m index 5e8bd5af53..3df05d1b43 100644 --- a/submodules/OpusBinding/Sources/OggOpusReader.m +++ b/submodules/OpusBinding/Sources/OggOpusReader.m @@ -2,6 +2,37 @@ #import "opusfile/opusfile.h" +static int is_opus(ogg_page *og) { + ogg_stream_state os; + ogg_packet op; + + ogg_stream_init(&os, ogg_page_serialno(og)); + ogg_stream_pagein(&os, og); + if (ogg_stream_packetout(&os, &op) == 1) + { + if (op.bytes >= 19 && !memcmp(op.packet, "OpusHead", 8)) + { + ogg_stream_clear(&os); + return 1; + } + } + ogg_stream_clear(&os); + return 0; +} + +@implementation OggOpusFrame + +- (instancetype)initWithNumSamples:(int)numSamples data:(NSData *)data { + self = [super init]; + if (self != nil) { + _numSamples = numSamples; + _data = data; + } + return self; +} + +@end + @interface OggOpusReader () { OggOpusFile *_opusFile; } @@ -32,4 +63,132 @@ return op_read(_opusFile, pcmData, bufSize, NULL); } ++ (NSArray * _Nullable)extractFrames:(NSData *)data { + NSMutableArray *result = [[NSMutableArray alloc] init]; + + ogg_page opage; + ogg_packet opacket; + ogg_sync_state ostate; + ogg_stream_state ostream; + int sampleRate = 48000; + + if (ogg_sync_init(&ostate) < 0) { + return nil; + } + + char *obuffer; + long obufferSize = (long)data.length; + + obuffer = ogg_sync_buffer(&ostate, obufferSize); + if (!obuffer) { + return nil; + } + + memcpy(obuffer, data.bytes, data.length); + // ogg_sync_wrote function is used to tell the ogg_sync_state struct how many bytes we wrote into the buffer. + if (ogg_sync_wrote(&ostate, obufferSize) < 0) { + return nil; + } + + int pages = 0; + int packetsout = 0; + int invalid = 0; + int eos = 0; + + int headers = 0; + int serialno = 0; + + /* LOOP START */ + while (ogg_sync_pageout(&ostate, &opage) == 1) { + pages++; + + if (headers == 0) { + if (is_opus(&opage)) { + /* this is the start of an Opus stream */ + serialno = ogg_page_serialno(&opage); + if (ogg_stream_init(&ostream, ogg_page_serialno(&opage)) < 0) { + return nil; + } + + headers++; + } else if (!ogg_page_bos(&opage)) { + // We're past the header and haven't found an Opus stream. + // Time to give up. + break; + } else { + /* try again */ + continue; + } + } + + eos = ogg_page_eos(&opage); + + /* submit the page for packetization */ + if (ogg_stream_pagein(&ostream, &opage) < 0) { + return nil; + } + + /* read and process available packets */ + while (ogg_stream_packetout(&ostream, &opacket) == 1) { + + packetsout++; + + int samples; + /* skip header packets */ + if (headers == 1 && opacket.bytes >= 19 && !memcmp(opacket.packet, "OpusHead", 8)) { + headers++; + continue; + } + if (headers == 2 && opacket.bytes >= 16 && !memcmp(opacket.packet, "OpusTags", 8)) { + headers++; + continue; + } + + /* get packet duration */ + samples = opus_packet_get_nb_samples(opacket.packet, opacket.bytes, sampleRate); + if (samples <= 0) { + invalid++; + continue; // skipping invalid packet + } + + [result addObject:[[OggOpusFrame alloc] initWithNumSamples:samples data:[NSData dataWithBytes:opacket.packet length:opacket.bytes]]]; + + /* update the rtp header and send */ + /*this->rtp.header_size = 12 + 4 * this->rtp.cc; + this->rtp.seq++; + this->rtp.time += samples; + this->rtp.payload_size = opacket.bytes; + + // Create RTP Packet + unsigned char *packet; + size_t packetSize = this->rtp.header_size + this->rtp.payload_size; + packet = (unsigned char *)malloc(packetSize); + if (!packet) + throw Napi::Error::New(info.Env(), "Couldn't allocate packet buffer."); + + // Serialize header and copy to packet. Then copy payload to packet. + serialize_rtp_header(packet, this->rtp.header_size, &this->rtp); + memcpy(packet + this->rtp.header_size, opacket.packet, opacket.bytes); + + Napi::Buffer output = Napi::Buffer::Copy(env, reinterpret_cast(packet), packetSize); + + push.Call(thisObj, {output});*/ + } + + if (eos > 0) { + // End of the logical bitstream, clear headers to reset. + headers = 0; + } + } + + /* CLEAN UP */ + if (eos > 0) + { + ogg_stream_clear(&ostream); + ogg_sync_clear(&ostate); + } + + return result; +} + @end diff --git a/submodules/PhotoResources/Sources/PhotoResources.swift b/submodules/PhotoResources/Sources/PhotoResources.swift index 9e195e9130..91ec1a3454 100644 --- a/submodules/PhotoResources/Sources/PhotoResources.swift +++ b/submodules/PhotoResources/Sources/PhotoResources.swift @@ -100,6 +100,10 @@ public func chatMessagePhotoDatas(postbox: Postbox, photoReference: ImageMediaRe switch results[i].0 { case .image: if let data = results[i].1, data.count != 0 { + if Int(fullRepresentationSize.width) > 100 && i <= 1 && !isLastSize { + continue + } + subscriber.putNext(Tuple4(nil, data, .full, isLastSize)) foundData = true if isLastSize { @@ -623,6 +627,11 @@ public func chatMessagePhotoInternal(photoData: Signal Signal { + public static func uploadMedia(account: Account, session: Session, file: TempBoxFile, disposeFileAfterDone: Bool, fileName: String, mimeType: String, type: MediaType) -> Signal { var forceNoBigParts = true guard let size = fileSize(file.path), size != 0 else { return .single(1.0) @@ -160,6 +160,11 @@ public enum ChatHistoryImport { |> mapToSignal { result -> Signal in return .single(1.0) } + |> afterDisposed { + if disposeFileAfterDone { + TempBox.shared.dispose(file) + } + } } } diff --git a/submodules/TelegramUI/Resources/streaming_example/0000.ogg b/submodules/TelegramUI/Resources/streaming_example/0000.ogg new file mode 100644 index 0000000000..65d91e101c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0000.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0001.ogg b/submodules/TelegramUI/Resources/streaming_example/0001.ogg new file mode 100644 index 0000000000..594226ad77 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0001.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0002.ogg b/submodules/TelegramUI/Resources/streaming_example/0002.ogg new file mode 100644 index 0000000000..9917b25adc Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0002.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0003.ogg b/submodules/TelegramUI/Resources/streaming_example/0003.ogg new file mode 100644 index 0000000000..d0e91f7e65 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0003.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0004.ogg b/submodules/TelegramUI/Resources/streaming_example/0004.ogg new file mode 100644 index 0000000000..414edced10 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0004.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0005.ogg b/submodules/TelegramUI/Resources/streaming_example/0005.ogg new file mode 100644 index 0000000000..48055fe680 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0005.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0006.ogg b/submodules/TelegramUI/Resources/streaming_example/0006.ogg new file mode 100644 index 0000000000..77aad5e37b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0006.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0007.ogg b/submodules/TelegramUI/Resources/streaming_example/0007.ogg new file mode 100644 index 0000000000..8cd3c88932 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0007.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0008.ogg b/submodules/TelegramUI/Resources/streaming_example/0008.ogg new file mode 100644 index 0000000000..4404af8492 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0008.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0009.ogg b/submodules/TelegramUI/Resources/streaming_example/0009.ogg new file mode 100644 index 0000000000..84834e27d0 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0009.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0010.ogg b/submodules/TelegramUI/Resources/streaming_example/0010.ogg new file mode 100644 index 0000000000..e241d38535 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0010.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0011.ogg b/submodules/TelegramUI/Resources/streaming_example/0011.ogg new file mode 100644 index 0000000000..4656353540 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0011.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0012.ogg b/submodules/TelegramUI/Resources/streaming_example/0012.ogg new file mode 100644 index 0000000000..b70c325bca Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0012.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0013.ogg b/submodules/TelegramUI/Resources/streaming_example/0013.ogg new file mode 100644 index 0000000000..e8418b4976 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0013.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0014.ogg b/submodules/TelegramUI/Resources/streaming_example/0014.ogg new file mode 100644 index 0000000000..3dc76cd465 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0014.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0015.ogg b/submodules/TelegramUI/Resources/streaming_example/0015.ogg new file mode 100644 index 0000000000..19f70bc880 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0015.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0016.ogg b/submodules/TelegramUI/Resources/streaming_example/0016.ogg new file mode 100644 index 0000000000..c720a17207 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0016.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0017.ogg b/submodules/TelegramUI/Resources/streaming_example/0017.ogg new file mode 100644 index 0000000000..39dba56eff Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0017.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0018.ogg b/submodules/TelegramUI/Resources/streaming_example/0018.ogg new file mode 100644 index 0000000000..819e843708 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0018.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0019.ogg b/submodules/TelegramUI/Resources/streaming_example/0019.ogg new file mode 100644 index 0000000000..f0cfae0ca2 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0019.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0020.ogg b/submodules/TelegramUI/Resources/streaming_example/0020.ogg new file mode 100644 index 0000000000..05beb5df91 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0020.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0021.ogg b/submodules/TelegramUI/Resources/streaming_example/0021.ogg new file mode 100644 index 0000000000..43417d0ba3 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0021.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0022.ogg b/submodules/TelegramUI/Resources/streaming_example/0022.ogg new file mode 100644 index 0000000000..51f295983b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0022.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0023.ogg b/submodules/TelegramUI/Resources/streaming_example/0023.ogg new file mode 100644 index 0000000000..a6c0967996 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0023.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0024.ogg b/submodules/TelegramUI/Resources/streaming_example/0024.ogg new file mode 100644 index 0000000000..5da6685a6a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0024.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0025.ogg b/submodules/TelegramUI/Resources/streaming_example/0025.ogg new file mode 100644 index 0000000000..5ba0f3c6e4 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0025.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0026.ogg b/submodules/TelegramUI/Resources/streaming_example/0026.ogg new file mode 100644 index 0000000000..68e14a2d76 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0026.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0027.ogg b/submodules/TelegramUI/Resources/streaming_example/0027.ogg new file mode 100644 index 0000000000..91a250bd6e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0027.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0028.ogg b/submodules/TelegramUI/Resources/streaming_example/0028.ogg new file mode 100644 index 0000000000..58d37de38a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0028.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0029.ogg b/submodules/TelegramUI/Resources/streaming_example/0029.ogg new file mode 100644 index 0000000000..640817407c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0029.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0030.ogg b/submodules/TelegramUI/Resources/streaming_example/0030.ogg new file mode 100644 index 0000000000..0ff0b56048 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0030.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0031.ogg b/submodules/TelegramUI/Resources/streaming_example/0031.ogg new file mode 100644 index 0000000000..468dd585a8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0031.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0032.ogg b/submodules/TelegramUI/Resources/streaming_example/0032.ogg new file mode 100644 index 0000000000..dbd91e3b1b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0032.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0033.ogg b/submodules/TelegramUI/Resources/streaming_example/0033.ogg new file mode 100644 index 0000000000..8186403a82 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0033.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0034.ogg b/submodules/TelegramUI/Resources/streaming_example/0034.ogg new file mode 100644 index 0000000000..1c93c3f37e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0034.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0035.ogg b/submodules/TelegramUI/Resources/streaming_example/0035.ogg new file mode 100644 index 0000000000..ad07d1ef91 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0035.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0036.ogg b/submodules/TelegramUI/Resources/streaming_example/0036.ogg new file mode 100644 index 0000000000..0145c79a86 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0036.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0037.ogg b/submodules/TelegramUI/Resources/streaming_example/0037.ogg new file mode 100644 index 0000000000..6a6626ecbf Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0037.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0038.ogg b/submodules/TelegramUI/Resources/streaming_example/0038.ogg new file mode 100644 index 0000000000..7b907c2b0b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0038.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0039.ogg b/submodules/TelegramUI/Resources/streaming_example/0039.ogg new file mode 100644 index 0000000000..0fdfa5299d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0039.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0040.ogg b/submodules/TelegramUI/Resources/streaming_example/0040.ogg new file mode 100644 index 0000000000..bad62b0256 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0040.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0041.ogg b/submodules/TelegramUI/Resources/streaming_example/0041.ogg new file mode 100644 index 0000000000..df70686469 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0041.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0042.ogg b/submodules/TelegramUI/Resources/streaming_example/0042.ogg new file mode 100644 index 0000000000..3546d09051 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0042.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0043.ogg b/submodules/TelegramUI/Resources/streaming_example/0043.ogg new file mode 100644 index 0000000000..d7a371ab7c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0043.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0044.ogg b/submodules/TelegramUI/Resources/streaming_example/0044.ogg new file mode 100644 index 0000000000..3fe2a44b14 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0044.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0045.ogg b/submodules/TelegramUI/Resources/streaming_example/0045.ogg new file mode 100644 index 0000000000..61583712ac Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0045.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0046.ogg b/submodules/TelegramUI/Resources/streaming_example/0046.ogg new file mode 100644 index 0000000000..9e32caafbd Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0046.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0047.ogg b/submodules/TelegramUI/Resources/streaming_example/0047.ogg new file mode 100644 index 0000000000..510286e0d4 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0047.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0048.ogg b/submodules/TelegramUI/Resources/streaming_example/0048.ogg new file mode 100644 index 0000000000..eb6aa30a20 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0048.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0049.ogg b/submodules/TelegramUI/Resources/streaming_example/0049.ogg new file mode 100644 index 0000000000..153a0e26d6 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0049.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0050.ogg b/submodules/TelegramUI/Resources/streaming_example/0050.ogg new file mode 100644 index 0000000000..e8d257f722 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0050.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0051.ogg b/submodules/TelegramUI/Resources/streaming_example/0051.ogg new file mode 100644 index 0000000000..31b2c91238 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0051.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0052.ogg b/submodules/TelegramUI/Resources/streaming_example/0052.ogg new file mode 100644 index 0000000000..6de86832bf Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0052.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0053.ogg b/submodules/TelegramUI/Resources/streaming_example/0053.ogg new file mode 100644 index 0000000000..926d5fdce8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0053.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0054.ogg b/submodules/TelegramUI/Resources/streaming_example/0054.ogg new file mode 100644 index 0000000000..e114063f95 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0054.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0055.ogg b/submodules/TelegramUI/Resources/streaming_example/0055.ogg new file mode 100644 index 0000000000..88ca5cd0be Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0055.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0056.ogg b/submodules/TelegramUI/Resources/streaming_example/0056.ogg new file mode 100644 index 0000000000..503ba2c092 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0056.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0057.ogg b/submodules/TelegramUI/Resources/streaming_example/0057.ogg new file mode 100644 index 0000000000..db05369dc2 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0057.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0058.ogg b/submodules/TelegramUI/Resources/streaming_example/0058.ogg new file mode 100644 index 0000000000..198edfe1f0 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0058.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0059.ogg b/submodules/TelegramUI/Resources/streaming_example/0059.ogg new file mode 100644 index 0000000000..3d12703910 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0059.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0060.ogg b/submodules/TelegramUI/Resources/streaming_example/0060.ogg new file mode 100644 index 0000000000..3387e26845 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0060.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0061.ogg b/submodules/TelegramUI/Resources/streaming_example/0061.ogg new file mode 100644 index 0000000000..0505c8f224 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0061.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0062.ogg b/submodules/TelegramUI/Resources/streaming_example/0062.ogg new file mode 100644 index 0000000000..a9c14b1c21 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0062.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0063.ogg b/submodules/TelegramUI/Resources/streaming_example/0063.ogg new file mode 100644 index 0000000000..168a81ab1c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0063.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0064.ogg b/submodules/TelegramUI/Resources/streaming_example/0064.ogg new file mode 100644 index 0000000000..310d16020e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0064.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0065.ogg b/submodules/TelegramUI/Resources/streaming_example/0065.ogg new file mode 100644 index 0000000000..2affcdbcd3 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0065.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0066.ogg b/submodules/TelegramUI/Resources/streaming_example/0066.ogg new file mode 100644 index 0000000000..e36f205092 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0066.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0067.ogg b/submodules/TelegramUI/Resources/streaming_example/0067.ogg new file mode 100644 index 0000000000..058442a59a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0067.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0068.ogg b/submodules/TelegramUI/Resources/streaming_example/0068.ogg new file mode 100644 index 0000000000..1544906d11 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0068.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0069.ogg b/submodules/TelegramUI/Resources/streaming_example/0069.ogg new file mode 100644 index 0000000000..6faf68df72 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0069.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0070.ogg b/submodules/TelegramUI/Resources/streaming_example/0070.ogg new file mode 100644 index 0000000000..428714c31d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0070.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0071.ogg b/submodules/TelegramUI/Resources/streaming_example/0071.ogg new file mode 100644 index 0000000000..0c5314c053 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0071.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0072.ogg b/submodules/TelegramUI/Resources/streaming_example/0072.ogg new file mode 100644 index 0000000000..84300bea9f Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0072.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0073.ogg b/submodules/TelegramUI/Resources/streaming_example/0073.ogg new file mode 100644 index 0000000000..480378ddf5 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0073.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0074.ogg b/submodules/TelegramUI/Resources/streaming_example/0074.ogg new file mode 100644 index 0000000000..95c4b0cd87 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0074.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0075.ogg b/submodules/TelegramUI/Resources/streaming_example/0075.ogg new file mode 100644 index 0000000000..21fe708e14 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0075.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0076.ogg b/submodules/TelegramUI/Resources/streaming_example/0076.ogg new file mode 100644 index 0000000000..1cdde25109 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0076.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0077.ogg b/submodules/TelegramUI/Resources/streaming_example/0077.ogg new file mode 100644 index 0000000000..b9e45a1333 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0077.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0078.ogg b/submodules/TelegramUI/Resources/streaming_example/0078.ogg new file mode 100644 index 0000000000..a76d79e80a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0078.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0079.ogg b/submodules/TelegramUI/Resources/streaming_example/0079.ogg new file mode 100644 index 0000000000..3817c41754 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0079.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0080.ogg b/submodules/TelegramUI/Resources/streaming_example/0080.ogg new file mode 100644 index 0000000000..ee32a9c466 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0080.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0081.ogg b/submodules/TelegramUI/Resources/streaming_example/0081.ogg new file mode 100644 index 0000000000..d727131ce8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0081.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0082.ogg b/submodules/TelegramUI/Resources/streaming_example/0082.ogg new file mode 100644 index 0000000000..e7553ebc9e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0082.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0083.ogg b/submodules/TelegramUI/Resources/streaming_example/0083.ogg new file mode 100644 index 0000000000..e669dcb4cd Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0083.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0084.ogg b/submodules/TelegramUI/Resources/streaming_example/0084.ogg new file mode 100644 index 0000000000..112a7e725b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0084.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0085.ogg b/submodules/TelegramUI/Resources/streaming_example/0085.ogg new file mode 100644 index 0000000000..3348c4b59d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0085.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0086.ogg b/submodules/TelegramUI/Resources/streaming_example/0086.ogg new file mode 100644 index 0000000000..c00f2305a9 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0086.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0087.ogg b/submodules/TelegramUI/Resources/streaming_example/0087.ogg new file mode 100644 index 0000000000..ffa01e2bd6 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0087.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0088.ogg b/submodules/TelegramUI/Resources/streaming_example/0088.ogg new file mode 100644 index 0000000000..3d3b9fc85c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0088.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0089.ogg b/submodules/TelegramUI/Resources/streaming_example/0089.ogg new file mode 100644 index 0000000000..dcbde494ce Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0089.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0090.ogg b/submodules/TelegramUI/Resources/streaming_example/0090.ogg new file mode 100644 index 0000000000..8c83040dd5 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0090.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0091.ogg b/submodules/TelegramUI/Resources/streaming_example/0091.ogg new file mode 100644 index 0000000000..5bd9a3cf38 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0091.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0092.ogg b/submodules/TelegramUI/Resources/streaming_example/0092.ogg new file mode 100644 index 0000000000..c6cfc8fb13 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0092.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0093.ogg b/submodules/TelegramUI/Resources/streaming_example/0093.ogg new file mode 100644 index 0000000000..44ba19527c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0093.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0094.ogg b/submodules/TelegramUI/Resources/streaming_example/0094.ogg new file mode 100644 index 0000000000..f56282f4bb Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0094.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0095.ogg b/submodules/TelegramUI/Resources/streaming_example/0095.ogg new file mode 100644 index 0000000000..7b5f776f9c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0095.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0096.ogg b/submodules/TelegramUI/Resources/streaming_example/0096.ogg new file mode 100644 index 0000000000..511c558df5 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0096.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0097.ogg b/submodules/TelegramUI/Resources/streaming_example/0097.ogg new file mode 100644 index 0000000000..927c5e3640 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0097.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0098.ogg b/submodules/TelegramUI/Resources/streaming_example/0098.ogg new file mode 100644 index 0000000000..76e339b479 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0098.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0099.ogg b/submodules/TelegramUI/Resources/streaming_example/0099.ogg new file mode 100644 index 0000000000..5a4128f9c3 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0099.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0100.ogg b/submodules/TelegramUI/Resources/streaming_example/0100.ogg new file mode 100644 index 0000000000..9ced202bb7 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0100.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0101.ogg b/submodules/TelegramUI/Resources/streaming_example/0101.ogg new file mode 100644 index 0000000000..d074224023 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0101.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0102.ogg b/submodules/TelegramUI/Resources/streaming_example/0102.ogg new file mode 100644 index 0000000000..e3a10898bf Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0102.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0103.ogg b/submodules/TelegramUI/Resources/streaming_example/0103.ogg new file mode 100644 index 0000000000..b890403f82 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0103.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0104.ogg b/submodules/TelegramUI/Resources/streaming_example/0104.ogg new file mode 100644 index 0000000000..1c461fa07a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0104.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0105.ogg b/submodules/TelegramUI/Resources/streaming_example/0105.ogg new file mode 100644 index 0000000000..966fc29fbb Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0105.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0106.ogg b/submodules/TelegramUI/Resources/streaming_example/0106.ogg new file mode 100644 index 0000000000..a9d4116070 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0106.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0107.ogg b/submodules/TelegramUI/Resources/streaming_example/0107.ogg new file mode 100644 index 0000000000..032f9b5006 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0107.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0108.ogg b/submodules/TelegramUI/Resources/streaming_example/0108.ogg new file mode 100644 index 0000000000..f6fb0018a7 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0108.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0109.ogg b/submodules/TelegramUI/Resources/streaming_example/0109.ogg new file mode 100644 index 0000000000..62875a0a17 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0109.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0110.ogg b/submodules/TelegramUI/Resources/streaming_example/0110.ogg new file mode 100644 index 0000000000..a49c90538f Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0110.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0111.ogg b/submodules/TelegramUI/Resources/streaming_example/0111.ogg new file mode 100644 index 0000000000..920cbaa5ee Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0111.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0112.ogg b/submodules/TelegramUI/Resources/streaming_example/0112.ogg new file mode 100644 index 0000000000..ac70ed2e7c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0112.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0113.ogg b/submodules/TelegramUI/Resources/streaming_example/0113.ogg new file mode 100644 index 0000000000..2c2d849587 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0113.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0114.ogg b/submodules/TelegramUI/Resources/streaming_example/0114.ogg new file mode 100644 index 0000000000..5f8d9939a1 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0114.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0115.ogg b/submodules/TelegramUI/Resources/streaming_example/0115.ogg new file mode 100644 index 0000000000..041c7b2c13 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0115.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0116.ogg b/submodules/TelegramUI/Resources/streaming_example/0116.ogg new file mode 100644 index 0000000000..4f15bad3d5 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0116.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0117.ogg b/submodules/TelegramUI/Resources/streaming_example/0117.ogg new file mode 100644 index 0000000000..16fe956f1b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0117.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0118.ogg b/submodules/TelegramUI/Resources/streaming_example/0118.ogg new file mode 100644 index 0000000000..a21e982317 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0118.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0119.ogg b/submodules/TelegramUI/Resources/streaming_example/0119.ogg new file mode 100644 index 0000000000..366a11d2f2 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0119.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0120.ogg b/submodules/TelegramUI/Resources/streaming_example/0120.ogg new file mode 100644 index 0000000000..5103ca514f Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0120.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0121.ogg b/submodules/TelegramUI/Resources/streaming_example/0121.ogg new file mode 100644 index 0000000000..b953f3ae6a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0121.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0122.ogg b/submodules/TelegramUI/Resources/streaming_example/0122.ogg new file mode 100644 index 0000000000..eeda509a91 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0122.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0123.ogg b/submodules/TelegramUI/Resources/streaming_example/0123.ogg new file mode 100644 index 0000000000..e837105f40 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0123.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0124.ogg b/submodules/TelegramUI/Resources/streaming_example/0124.ogg new file mode 100644 index 0000000000..77c43699ef Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0124.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0125.ogg b/submodules/TelegramUI/Resources/streaming_example/0125.ogg new file mode 100644 index 0000000000..5887fb83b6 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0125.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0126.ogg b/submodules/TelegramUI/Resources/streaming_example/0126.ogg new file mode 100644 index 0000000000..11e5beb316 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0126.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0127.ogg b/submodules/TelegramUI/Resources/streaming_example/0127.ogg new file mode 100644 index 0000000000..c006dc0119 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0127.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0128.ogg b/submodules/TelegramUI/Resources/streaming_example/0128.ogg new file mode 100644 index 0000000000..7151e358fe Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0128.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0129.ogg b/submodules/TelegramUI/Resources/streaming_example/0129.ogg new file mode 100644 index 0000000000..6e34b1d2c8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0129.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0130.ogg b/submodules/TelegramUI/Resources/streaming_example/0130.ogg new file mode 100644 index 0000000000..4e4cb67bd2 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0130.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0131.ogg b/submodules/TelegramUI/Resources/streaming_example/0131.ogg new file mode 100644 index 0000000000..3a4cbf267e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0131.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0132.ogg b/submodules/TelegramUI/Resources/streaming_example/0132.ogg new file mode 100644 index 0000000000..4fae517eff Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0132.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0133.ogg b/submodules/TelegramUI/Resources/streaming_example/0133.ogg new file mode 100644 index 0000000000..dd3c1bc234 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0133.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0134.ogg b/submodules/TelegramUI/Resources/streaming_example/0134.ogg new file mode 100644 index 0000000000..3e642a51bd Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0134.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0135.ogg b/submodules/TelegramUI/Resources/streaming_example/0135.ogg new file mode 100644 index 0000000000..0e6f37e7e5 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0135.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0136.ogg b/submodules/TelegramUI/Resources/streaming_example/0136.ogg new file mode 100644 index 0000000000..04f90cbdee Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0136.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0137.ogg b/submodules/TelegramUI/Resources/streaming_example/0137.ogg new file mode 100644 index 0000000000..596bade03c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0137.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0138.ogg b/submodules/TelegramUI/Resources/streaming_example/0138.ogg new file mode 100644 index 0000000000..7e37b25584 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0138.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0139.ogg b/submodules/TelegramUI/Resources/streaming_example/0139.ogg new file mode 100644 index 0000000000..5bd428c422 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0139.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0140.ogg b/submodules/TelegramUI/Resources/streaming_example/0140.ogg new file mode 100644 index 0000000000..b689b23007 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0140.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0141.ogg b/submodules/TelegramUI/Resources/streaming_example/0141.ogg new file mode 100644 index 0000000000..d0bd220f7e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0141.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0142.ogg b/submodules/TelegramUI/Resources/streaming_example/0142.ogg new file mode 100644 index 0000000000..598044db31 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0142.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0143.ogg b/submodules/TelegramUI/Resources/streaming_example/0143.ogg new file mode 100644 index 0000000000..c1f1f1e661 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0143.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0144.ogg b/submodules/TelegramUI/Resources/streaming_example/0144.ogg new file mode 100644 index 0000000000..b17604b1ef Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0144.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0145.ogg b/submodules/TelegramUI/Resources/streaming_example/0145.ogg new file mode 100644 index 0000000000..3796d3c04d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0145.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0146.ogg b/submodules/TelegramUI/Resources/streaming_example/0146.ogg new file mode 100644 index 0000000000..1038bf30c0 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0146.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0147.ogg b/submodules/TelegramUI/Resources/streaming_example/0147.ogg new file mode 100644 index 0000000000..08e1eb0e80 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0147.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0148.ogg b/submodules/TelegramUI/Resources/streaming_example/0148.ogg new file mode 100644 index 0000000000..0d0e24d32c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0148.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0149.ogg b/submodules/TelegramUI/Resources/streaming_example/0149.ogg new file mode 100644 index 0000000000..e501bc429f Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0149.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0150.ogg b/submodules/TelegramUI/Resources/streaming_example/0150.ogg new file mode 100644 index 0000000000..8dca6ad892 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0150.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0151.ogg b/submodules/TelegramUI/Resources/streaming_example/0151.ogg new file mode 100644 index 0000000000..129a689a8a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0151.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0152.ogg b/submodules/TelegramUI/Resources/streaming_example/0152.ogg new file mode 100644 index 0000000000..a6c3c1622a Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0152.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0153.ogg b/submodules/TelegramUI/Resources/streaming_example/0153.ogg new file mode 100644 index 0000000000..de582c10b7 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0153.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0154.ogg b/submodules/TelegramUI/Resources/streaming_example/0154.ogg new file mode 100644 index 0000000000..55f4a7d48d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0154.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0155.ogg b/submodules/TelegramUI/Resources/streaming_example/0155.ogg new file mode 100644 index 0000000000..1682d0d11c Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0155.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0156.ogg b/submodules/TelegramUI/Resources/streaming_example/0156.ogg new file mode 100644 index 0000000000..add5aec12d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0156.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0157.ogg b/submodules/TelegramUI/Resources/streaming_example/0157.ogg new file mode 100644 index 0000000000..28b4303322 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0157.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0158.ogg b/submodules/TelegramUI/Resources/streaming_example/0158.ogg new file mode 100644 index 0000000000..90a3bafaec Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0158.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0159.ogg b/submodules/TelegramUI/Resources/streaming_example/0159.ogg new file mode 100644 index 0000000000..3d8c00192e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0159.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0160.ogg b/submodules/TelegramUI/Resources/streaming_example/0160.ogg new file mode 100644 index 0000000000..de52205ed5 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0160.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0161.ogg b/submodules/TelegramUI/Resources/streaming_example/0161.ogg new file mode 100644 index 0000000000..dc462cde0e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0161.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0162.ogg b/submodules/TelegramUI/Resources/streaming_example/0162.ogg new file mode 100644 index 0000000000..44d405f4fc Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0162.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0163.ogg b/submodules/TelegramUI/Resources/streaming_example/0163.ogg new file mode 100644 index 0000000000..dd0f5f8476 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0163.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0164.ogg b/submodules/TelegramUI/Resources/streaming_example/0164.ogg new file mode 100644 index 0000000000..5315b37000 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0164.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0165.ogg b/submodules/TelegramUI/Resources/streaming_example/0165.ogg new file mode 100644 index 0000000000..ae412c74e1 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0165.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0166.ogg b/submodules/TelegramUI/Resources/streaming_example/0166.ogg new file mode 100644 index 0000000000..1cc4a0dda9 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0166.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0167.ogg b/submodules/TelegramUI/Resources/streaming_example/0167.ogg new file mode 100644 index 0000000000..83d82bae90 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0167.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0168.ogg b/submodules/TelegramUI/Resources/streaming_example/0168.ogg new file mode 100644 index 0000000000..fe3dea0c64 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0168.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0169.ogg b/submodules/TelegramUI/Resources/streaming_example/0169.ogg new file mode 100644 index 0000000000..ffedde973b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0169.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0170.ogg b/submodules/TelegramUI/Resources/streaming_example/0170.ogg new file mode 100644 index 0000000000..0126c53e64 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0170.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0171.ogg b/submodules/TelegramUI/Resources/streaming_example/0171.ogg new file mode 100644 index 0000000000..c9f248f4c3 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0171.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0172.ogg b/submodules/TelegramUI/Resources/streaming_example/0172.ogg new file mode 100644 index 0000000000..6cd62f1f62 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0172.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0173.ogg b/submodules/TelegramUI/Resources/streaming_example/0173.ogg new file mode 100644 index 0000000000..0a5729065d Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0173.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0174.ogg b/submodules/TelegramUI/Resources/streaming_example/0174.ogg new file mode 100644 index 0000000000..733767efef Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0174.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0175.ogg b/submodules/TelegramUI/Resources/streaming_example/0175.ogg new file mode 100644 index 0000000000..cb566171dc Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0175.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0176.ogg b/submodules/TelegramUI/Resources/streaming_example/0176.ogg new file mode 100644 index 0000000000..19c521d6f8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0176.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0177.ogg b/submodules/TelegramUI/Resources/streaming_example/0177.ogg new file mode 100644 index 0000000000..dbd5c9e213 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0177.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0178.ogg b/submodules/TelegramUI/Resources/streaming_example/0178.ogg new file mode 100644 index 0000000000..54b45ea7fb Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0178.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0179.ogg b/submodules/TelegramUI/Resources/streaming_example/0179.ogg new file mode 100644 index 0000000000..f6c13785b8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0179.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0180.ogg b/submodules/TelegramUI/Resources/streaming_example/0180.ogg new file mode 100644 index 0000000000..8b2819c0dd Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0180.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0181.ogg b/submodules/TelegramUI/Resources/streaming_example/0181.ogg new file mode 100644 index 0000000000..c1bb42d9d2 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0181.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0182.ogg b/submodules/TelegramUI/Resources/streaming_example/0182.ogg new file mode 100644 index 0000000000..d15da9876b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0182.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0183.ogg b/submodules/TelegramUI/Resources/streaming_example/0183.ogg new file mode 100644 index 0000000000..2b6946323e Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0183.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0184.ogg b/submodules/TelegramUI/Resources/streaming_example/0184.ogg new file mode 100644 index 0000000000..1b080fdcd3 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0184.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0185.ogg b/submodules/TelegramUI/Resources/streaming_example/0185.ogg new file mode 100644 index 0000000000..3b53920ae3 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0185.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0186.ogg b/submodules/TelegramUI/Resources/streaming_example/0186.ogg new file mode 100644 index 0000000000..3571780d65 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0186.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0187.ogg b/submodules/TelegramUI/Resources/streaming_example/0187.ogg new file mode 100644 index 0000000000..26054261de Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0187.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0188.ogg b/submodules/TelegramUI/Resources/streaming_example/0188.ogg new file mode 100644 index 0000000000..879e1cb22b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0188.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0189.ogg b/submodules/TelegramUI/Resources/streaming_example/0189.ogg new file mode 100644 index 0000000000..bfdabe0387 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0189.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0190.ogg b/submodules/TelegramUI/Resources/streaming_example/0190.ogg new file mode 100644 index 0000000000..3b2baa2b49 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0190.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0191.ogg b/submodules/TelegramUI/Resources/streaming_example/0191.ogg new file mode 100644 index 0000000000..838b799a2f Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0191.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0192.ogg b/submodules/TelegramUI/Resources/streaming_example/0192.ogg new file mode 100644 index 0000000000..b3830fb8be Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0192.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0193.ogg b/submodules/TelegramUI/Resources/streaming_example/0193.ogg new file mode 100644 index 0000000000..51867fa807 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0193.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0194.ogg b/submodules/TelegramUI/Resources/streaming_example/0194.ogg new file mode 100644 index 0000000000..5692d39865 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0194.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0195.ogg b/submodules/TelegramUI/Resources/streaming_example/0195.ogg new file mode 100644 index 0000000000..009ae62136 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0195.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0196.ogg b/submodules/TelegramUI/Resources/streaming_example/0196.ogg new file mode 100644 index 0000000000..229a58b184 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0196.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0197.ogg b/submodules/TelegramUI/Resources/streaming_example/0197.ogg new file mode 100644 index 0000000000..4bb8119a01 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0197.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0198.ogg b/submodules/TelegramUI/Resources/streaming_example/0198.ogg new file mode 100644 index 0000000000..5af8ad03c8 Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0198.ogg differ diff --git a/submodules/TelegramUI/Resources/streaming_example/0199.ogg b/submodules/TelegramUI/Resources/streaming_example/0199.ogg new file mode 100644 index 0000000000..578f5f799b Binary files /dev/null and b/submodules/TelegramUI/Resources/streaming_example/0199.ogg differ diff --git a/submodules/TelegramVoip/BUILD b/submodules/TelegramVoip/BUILD index c4b6b81c56..85b01e2045 100644 --- a/submodules/TelegramVoip/BUILD +++ b/submodules/TelegramVoip/BUILD @@ -13,8 +13,10 @@ swift_library( "//submodules/Postbox:Postbox", "//submodules/TelegramUIPreferences:TelegramUIPreferences", "//submodules/TgVoip:TgVoip", - #"//submodules/TgVoipWebrtcCustom:TgVoipWebrtcCustom", "//submodules/TgVoipWebrtc:TgVoipWebrtc", + "//submodules/MediaPlayer:UniversalMediaPlayer", + "//submodules/AppBundle:AppBundle", + "//submodules/OpusBinding:OpusBinding", ], visibility = [ "//visibility:public", diff --git a/submodules/TelegramVoip/Sources/GroupCallContext.swift b/submodules/TelegramVoip/Sources/GroupCallContext.swift index 5f0d4ddda2..b78d00052e 100644 --- a/submodules/TelegramVoip/Sources/GroupCallContext.swift +++ b/submodules/TelegramVoip/Sources/GroupCallContext.swift @@ -1,6 +1,9 @@ import Foundation import SwiftSignalKit import TgVoipWebrtc +import UniversalMediaPlayer +import AppBundle +import OpusBinding private final class ContextQueueImpl: NSObject, OngoingCallThreadLocalContextQueueWebrtc { private let queue: Queue @@ -26,6 +29,79 @@ private final class ContextQueueImpl: NSObject, OngoingCallThreadLocalContextQue } } +private final class DemoBroadcastPacketSource { + private let queue: Queue + + private let packetsPipe = ValuePipe<[OngoingGroupCallBroadcastPacket]>() + var packets: Signal<[OngoingGroupCallBroadcastPacket], NoError> { + return self.packetsPipe.signal() + } + + private var timer: SwiftSignalKit.Timer? + + private var enqueuedPackets: [OngoingGroupCallBroadcastPacket] = [] + private var delayTimer: SwiftSignalKit.Timer? + + private var nextIndex: Int = 0 + + init(queue: Queue) { + self.queue = queue + + self.emitPacketAndStartTimer() + } + + deinit { + self.timer?.invalidate() + self.delayTimer?.invalidate() + } + + private func emitPacketAndStartTimer() { + let demoPacketCount = 200 + let index = self.nextIndex % demoPacketCount + self.nextIndex += 1 + + var packets: [OngoingGroupCallBroadcastPacket] = [] + + let fileName = String(format: "%04d", index) + if let path = getAppBundle().path(forResource: fileName, ofType: "ogg") { + let source = SoftwareAudioSource(path: path) + while true { + if let frame = source.readFrame() { + packets.append(OngoingGroupCallBroadcastPacket(numSamples: Int32(frame.count / 2), data: frame)) + } else { + break + } + } + } + + if !packets.isEmpty { + self.enqueuedPackets.append(contentsOf: packets) + self.startDelayTimer() + } + + let timer = SwiftSignalKit.Timer(timeout: 1.0, repeat: false, completion: { [weak self] in + self?.emitPacketAndStartTimer() + }, queue: self.queue) + self.timer = timer + timer.start() + } + + private func startDelayTimer() { + let delayTimer = SwiftSignalKit.Timer(timeout: Double.random(in: 0.1 ... 0.3), repeat: false, completion: { [weak self] in + guard let strongSelf = self else { + return + } + let packets = strongSelf.enqueuedPackets + strongSelf.enqueuedPackets.removeAll() + if !packets.isEmpty { + strongSelf.packetsPipe.putNext(packets) + } + }, queue: self.queue) + self.delayTimer = delayTimer + delayTimer.start() + } +} + public final class OngoingGroupCallContext { public enum NetworkState { case connecting @@ -50,12 +126,14 @@ public final class OngoingGroupCallContext { let videoSources = ValuePromise>(Set(), ignoreRepeated: true) + private var broadcastPacketSource: DemoBroadcastPacketSource? + private var broadcastPacketsDisposable: Disposable? + init(queue: Queue, inputDeviceId: String, outputDeviceId: String, video: OngoingCallVideoCapturer?, participantDescriptionsRequired: @escaping (Set) -> Void) { self.queue = queue var networkStateUpdatedImpl: ((GroupCallNetworkState) -> Void)? var audioLevelsUpdatedImpl: (([NSNumber]) -> Void)? - var participantDescriptionsRequiredImpl: (([NSNumber]) -> Void)? let videoSources = self.videoSources self.context = GroupCallThreadLocalContext( @@ -125,6 +203,53 @@ public final class OngoingGroupCallContext { strongSelf.joinPayload.set(.single((payload, ssrc))) } }) + + let broadcastPacketSource = DemoBroadcastPacketSource(queue: queue) + self.broadcastPacketSource = broadcastPacketSource + self.broadcastPacketsDisposable = (broadcastPacketSource.packets + |> deliverOn(queue)).start(next: { [weak self] packets in + guard let strongSelf = self else { + return + } + strongSelf.context.add(packets) + }) + + /*var packets: [OngoingGroupCallBroadcastPacket] = [] + for i in 0 ..< 200 { + let fileName = String(format: "%04d", i) + if let path = getAppBundle().path(forResource: fileName, ofType: "ogg") { + if let data = try? Data(contentsOf: URL(fileURLWithPath: path)) { + if let frames = OggOpusReader.extractFrames(data) { + for frame in frames { + packets.append(OngoingGroupCallBroadcastPacket(numSamples: frame.numSamples, data: frame.data)) + } + } + } + continue + + let source = SoftwareAudioSource(path: path) + while true { + if let (frame, numSamples) = source.readEncodedFrame() { + if numSamples != 960 { + continue + } + packets.append(OngoingGroupCallBroadcastPacket(numSamples: Int32(numSamples), data: frame)) + } else { + break + } + /*if let frame = source.readFrame() { + packets.append(frame) + } else { + break + }*/ + } + } + } + context.add(packets);*/ + } + + deinit { + self.broadcastPacketsDisposable?.dispose() } func setJoinResponse(payload: String, participants: [(UInt32, String?)]) { diff --git a/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h b/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h index 4db0db1d26..1b9ec8dd23 100644 --- a/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h +++ b/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h @@ -165,6 +165,15 @@ typedef NS_ENUM(int32_t, GroupCallNetworkState) { @end +@interface OngoingGroupCallBroadcastPacket : NSObject + +@property (nonatomic, readonly) int numSamples; +@property (nonatomic, strong, readonly) NSData * _Nonnull data; + +- (instancetype _Nonnull)initWithNumSamples:(int)numSamples data:(NSData * _Nonnull)data; + +@end + @interface GroupCallThreadLocalContext : NSObject - (instancetype _Nonnull)initWithQueue:(id _Nonnull)queue networkStateUpdated:(void (^ _Nonnull)(GroupCallNetworkState))networkStateUpdated audioLevelsUpdated:(void (^ _Nonnull)(NSArray * _Nonnull))audioLevelsUpdated inputDeviceId:(NSString * _Nonnull)inputDeviceId outputDeviceId:(NSString * _Nonnull)outputDeviceId videoCapturer:(OngoingCallThreadLocalContextVideoCapturer * _Nullable)videoCapturer incomingVideoSourcesUpdated:(void (^ _Nonnull)(NSArray * _Nonnull))incomingVideoSourcesUpdated participantDescriptionsRequired:(void (^ _Nonnull)(NSArray * _Nonnull))participantDescriptionsRequired; @@ -186,6 +195,8 @@ typedef NS_ENUM(int32_t, GroupCallNetworkState) { - (void)switchAudioInput:(NSString * _Nonnull)deviceId; - (void)makeIncomingVideoViewWithSsrc:(uint32_t)ssrc completion:(void (^_Nonnull)(UIView * _Nullable))completion; +- (void)addBroadcastPackets:(NSArray * _Nonnull)packets; + @end #endif diff --git a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm index 564fef27db..05d498f598 100644 --- a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm +++ b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm @@ -1398,6 +1398,22 @@ static void processJoinPayload(tgcalls::GroupJoinPayload &payload, void (^ _Nonn } } +- (void)addBroadcastPackets:(NSArray * _Nonnull)packets { + if (!_instance) { + return; + } + + std::vector parsedPackets; + for (OngoingGroupCallBroadcastPacket *packet in packets) { + tgcalls::BroadcastPacket parsedPacket; + parsedPacket.numSamples = packet.numSamples; + parsedPacket.data.resize(packet.data.length); + [packet.data getBytes:parsedPacket.data.data() length:packet.data.length]; + parsedPackets.push_back(std::move(parsedPacket)); + } + ((tgcalls::GroupInstanceCustomImpl *)(_instance.get()))->addBroadcastPackets(std::move(parsedPackets)); +} + @end @implementation OngoingGroupCallParticipantDescription @@ -1412,3 +1428,16 @@ static void processJoinPayload(tgcalls::GroupJoinPayload &payload, void (^ _Nonn } @end + +@implementation OngoingGroupCallBroadcastPacket + +- (instancetype _Nonnull)initWithNumSamples:(int)numSamples data:(NSData * _Nonnull)data { + self = [super init]; + if (self != nil) { + _numSamples = numSamples; + _data = data; + } + return self; +} + +@end diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index d2b15b9edf..35a4725bd3 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit d2b15b9edfe2eeaaa9862adb0ae38f8e6308b5fb +Subproject commit 35a4725bd37e4e0a07eb2d3ba626b80f9dc73fce diff --git a/third-party/webrtc/webrtc b/third-party/webrtc/webrtc index e42b463011..1829cfe837 160000 --- a/third-party/webrtc/webrtc +++ b/third-party/webrtc/webrtc @@ -1 +1 @@ -Subproject commit e42b4630117498504692fbac80ec6dbb970b2314 +Subproject commit 1829cfe8371d479f254d9783ebe66fc562d30dba