mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 07:57:01 +00:00
maoc specific changes for refactoring
This commit is contained in:
parent
f27952b7c2
commit
30764936a8
47
submodules/MediaPlayer/Package.swift
Normal file
47
submodules/MediaPlayer/Package.swift
Normal file
@ -0,0 +1,47 @@
|
||||
// swift-tools-version:5.5
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "MediaPlayer",
|
||||
platforms: [.macOS(.v10_13)],
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
.library(
|
||||
name: "MediaPlayer",
|
||||
targets: ["MediaPlayer"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(name: "TelegramCore", path: "../TelegramCore"),
|
||||
.package(name: "Postbox", path: "../Postbox"),
|
||||
.package(name: "FFMpegBinding", path: "../FFMpegBinding"),
|
||||
.package(name: "YuvConversion", path: "../YuvConversion"),
|
||||
.package(name: "RingBuffer", path: "../RingBuffer"),
|
||||
.package(name: "TGUIKit", path: "../../../../packages/TGUIKit"),
|
||||
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
name: "MediaPlayer",
|
||||
dependencies: [.product(name: "TelegramCore", package: "TelegramCore", condition: nil),
|
||||
.product(name: "Postbox", package: "Postbox", condition: nil),
|
||||
.product(name: "FFMpegBinding", package: "FFMpegBinding", condition: nil),
|
||||
.product(name: "YuvConversion", package: "YuvConversion", condition: nil),
|
||||
.product(name: "RingBuffer", package: "RingBuffer", condition: nil),
|
||||
.product(name: "TGUIKit", package: "TGUIKit", condition: nil),
|
||||
],
|
||||
path: "Sources",
|
||||
exclude: ["MediaPlayer.swift",
|
||||
"MediaPlayerScrubbingNode.swift",
|
||||
"MediaPlayerTimeTextNode.swift",
|
||||
"MediaPlayerNode.swift",
|
||||
"MediaPlayerAudioRenderer.swift",
|
||||
"MediaPlayerFramePreview.swift",
|
||||
"VideoPlayerProxy.swift"]),
|
||||
]
|
||||
)
|
@ -5,7 +5,7 @@ public final class MediaPlaybackBuffers {
|
||||
public let audioBuffer: MediaTrackFrameBuffer?
|
||||
public let videoBuffer: MediaTrackFrameBuffer?
|
||||
|
||||
init(audioBuffer: MediaTrackFrameBuffer?, videoBuffer: MediaTrackFrameBuffer?) {
|
||||
public init(audioBuffer: MediaTrackFrameBuffer?, videoBuffer: MediaTrackFrameBuffer?) {
|
||||
self.audioBuffer = audioBuffer
|
||||
self.videoBuffer = videoBuffer
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ public final class MediaTrackFrameBuffer {
|
||||
private let decoder: MediaTrackFrameDecoder
|
||||
private let type: MediaTrackFrameType
|
||||
public let duration: CMTime
|
||||
let rotationAngle: Double
|
||||
let aspect: Double
|
||||
public let rotationAngle: Double
|
||||
public let aspect: Double
|
||||
|
||||
var statusUpdated: () -> Void = { }
|
||||
public var statusUpdated: () -> Void = { }
|
||||
|
||||
private var frameSourceSinkIndex: Int?
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
import Foundation
|
||||
#if !os(macOS)
|
||||
import UIKit
|
||||
#else
|
||||
import AppKit
|
||||
#endif
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
|
Loading…
x
Reference in New Issue
Block a user