diff --git a/Model/Player/Backends/MPVBackend.swift b/Model/Player/Backends/MPVBackend.swift index 991e01df..daf2c51f 100644 --- a/Model/Player/Backends/MPVBackend.swift +++ b/Model/Player/Backends/MPVBackend.swift @@ -2,9 +2,9 @@ import AVFAudio import CoreMedia import Defaults import Foundation +import Libmpv import Logging import MediaPlayer -import MPVKit import Repeat import SwiftUI diff --git a/Model/Player/Backends/MPVClient.swift b/Model/Player/Backends/MPVClient.swift index f33f6e61..67bc76c3 100644 --- a/Model/Player/Backends/MPVClient.swift +++ b/Model/Player/Backends/MPVClient.swift @@ -1,8 +1,8 @@ import CoreMedia import Defaults import Foundation +import Libmpv import Logging -import MPVKit #if !os(macOS) import Siesta import UIKit diff --git a/Shared/Player/MPV/MPVOGLView.swift b/Shared/Player/MPV/MPVOGLView.swift index 3311aa30..6b818758 100644 --- a/Shared/Player/MPV/MPVOGLView.swift +++ b/Shared/Player/MPV/MPVOGLView.swift @@ -1,6 +1,6 @@ import GLKit +import Libmpv import Logging -import MPVKit import OpenGLES final class MPVOGLView: GLKView { diff --git a/Yattee.xcodeproj/project.pbxproj b/Yattee.xcodeproj/project.pbxproj index c31fec28..3c2d6a75 100644 --- a/Yattee.xcodeproj/project.pbxproj +++ b/Yattee.xcodeproj/project.pbxproj @@ -619,9 +619,6 @@ 3797104928D3D10600D5F53C /* SDWebImageSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3797104828D3D10600D5F53C /* SDWebImageSwiftUI */; }; 3797104B28D3D18800D5F53C /* SDWebImageSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3797104A28D3D18800D5F53C /* SDWebImageSwiftUI */; }; 3797104D28D3D19100D5F53C /* SDWebImageSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3797104C28D3D19100D5F53C /* SDWebImageSwiftUI */; }; - 3797665B2C79FA6900C10DBD /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = 3797665A2C79FA6900C10DBD /* MPVKit */; }; - 3797665D2C79FA7500C10DBD /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = 3797665C2C79FA7500C10DBD /* MPVKit */; }; - 3797665F2C79FA7D00C10DBD /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = 3797665E2C79FA7D00C10DBD /* MPVKit */; }; 3797757D268922D100DD52A8 /* Siesta in Frameworks */ = {isa = PBXBuildFile; productRef = 3797757C268922D100DD52A8 /* Siesta */; }; 37977583268922F600DD52A8 /* InvidiousAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37977582268922F600DD52A8 /* InvidiousAPI.swift */; }; 37977584268922F600DD52A8 /* InvidiousAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37977582268922F600DD52A8 /* InvidiousAPI.swift */; }; @@ -1080,6 +1077,9 @@ E258F38A2BF61BD2005B8C28 /* URLTester.swift in Sources */ = {isa = PBXBuildFile; fileRef = E258F3892BF61BD2005B8C28 /* URLTester.swift */; }; E258F38B2BF61BD2005B8C28 /* URLTester.swift in Sources */ = {isa = PBXBuildFile; fileRef = E258F3892BF61BD2005B8C28 /* URLTester.swift */; }; E258F38C2BF61BD2005B8C28 /* URLTester.swift in Sources */ = {isa = PBXBuildFile; fileRef = E258F3892BF61BD2005B8C28 /* URLTester.swift */; }; + E265D0C22C7D217000D2BB8E /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = E265D0C12C7D217000D2BB8E /* MPVKit */; }; + E265D0C42C7D218A00D2BB8E /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = E265D0C32C7D218A00D2BB8E /* MPVKit */; }; + E265D0C62C7D21A300D2BB8E /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = E265D0C52C7D21A300D2BB8E /* MPVKit */; }; E27568B92BFAAC2000BDF0AF /* LanguageCodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27568B82BFAAC2000BDF0AF /* LanguageCodes.swift */; }; E27568BA2BFAAC2000BDF0AF /* LanguageCodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27568B82BFAAC2000BDF0AF /* LanguageCodes.swift */; }; E27568BB2BFAAC2000BDF0AF /* LanguageCodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27568B82BFAAC2000BDF0AF /* LanguageCodes.swift */; }; @@ -1599,7 +1599,7 @@ 3797104928D3D10600D5F53C /* SDWebImageSwiftUI in Frameworks */, 37BD07B92698AB2E003EBB87 /* Siesta in Frameworks */, 37FB284D2722099E00A57617 /* SDWebImageWebPCoder in Frameworks */, - 3797665B2C79FA6900C10DBD /* MPVKit in Frameworks */, + E265D0C22C7D217000D2BB8E /* MPVKit in Frameworks */, 37CF8B8428535E4F00B71E37 /* SDWebImage in Frameworks */, 37C7367A2AC33010007630E1 /* SwiftUIIntrospect in Frameworks */, ); @@ -1624,7 +1624,7 @@ 375B8AB728B583BD00397B31 /* KeychainAccess in Frameworks */, 3703205E27D2BB12007A0CB8 /* SDWebImageWebPCoder in Frameworks */, 37CF8B8628535E5A00B71E37 /* SDWebImage in Frameworks */, - 3797665D2C79FA7500C10DBD /* MPVKit in Frameworks */, + E265D0C42C7D218A00D2BB8E /* MPVKit in Frameworks */, 3703205C27D2BAF3007A0CB8 /* SwiftyJSON in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1670,7 +1670,7 @@ 372915E42687E33E00F5A35B /* Defaults in Frameworks */, 3772003B27E8EEC800CB2475 /* libbz2.tbd in Frameworks */, 37BADCA9269A570B009BE4FB /* Alamofire in Frameworks */, - 3797665F2C79FA7D00C10DBD /* MPVKit in Frameworks */, + E265D0C62C7D21A300D2BB8E /* MPVKit in Frameworks */, 37D4B19D2671817900C925CA /* SwiftyJSON in Frameworks */, 3797757D268922D100DD52A8 /* Siesta in Frameworks */, ); @@ -2585,7 +2585,7 @@ 371AC0AB294D1A490085989E /* CachedAsyncImage */, 379325D429A265A300181CF1 /* Logging */, 37C736792AC33010007630E1 /* SwiftUIIntrospect */, - 3797665A2C79FA6900C10DBD /* MPVKit */, + E265D0C12C7D217000D2BB8E /* MPVKit */, ); productName = "Yattee (iOS)"; productReference = 37D4B0C92671614900C925CA /* Yattee.app */; @@ -2624,7 +2624,7 @@ 371AC0B1294D1C230085989E /* CachedAsyncImage */, 379325D629A265AE00181CF1 /* Logging */, 37C736772AC32B28007630E1 /* SwiftUIIntrospect */, - 3797665C2C79FA7500C10DBD /* MPVKit */, + E265D0C32C7D218A00D2BB8E /* MPVKit */, ); productName = "Yattee (macOS)"; productReference = 37D4B0CF2671614900C925CA /* Yattee.app */; @@ -2702,7 +2702,7 @@ 377F9F75294403880043F856 /* Cache */, 371AC0B3294D1C290085989E /* CachedAsyncImage */, 379325D829A265B500181CF1 /* Logging */, - 3797665E2C79FA7D00C10DBD /* MPVKit */, + E265D0C52C7D21A300D2BB8E /* MPVKit */, ); productName = Yattee; productReference = 37D4B158267164AE00C925CA /* Yattee.app */; @@ -2822,7 +2822,7 @@ 374D11E52943C56300CB4350 /* XCRemoteSwiftPackageReference "Cache" */, 371AC0AA294D1A490085989E /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */, 379325D329A265A300181CF1 /* XCRemoteSwiftPackageReference "swift-log" */, - 379766592C79FA6900C10DBD /* XCRemoteSwiftPackageReference "MPVKit" */, + E265D0C02C7D217000D2BB8E /* XCRemoteSwiftPackageReference "MPVKit" */, ); productRefGroup = 37D4B0CA2671614900C925CA /* Products */; projectDirPath = ""; @@ -4960,14 +4960,6 @@ minimumVersion = 2.1.0; }; }; - 379766592C79FA6900C10DBD /* XCRemoteSwiftPackageReference "MPVKit" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/cxfksword/MPVKit"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.38.0; - }; - }; 3797757B268922D100DD52A8 /* XCRemoteSwiftPackageReference "siesta" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/bustoutsolutions/siesta"; @@ -5040,6 +5032,14 @@ minimumVersion = 0.3.0; }; }; + E265D0C02C7D217000D2BB8E /* XCRemoteSwiftPackageReference "MPVKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/mpvkit/MPVKit.git"; + requirement = { + kind = exactVersion; + version = "0.38.0-fix"; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -5228,21 +5228,6 @@ package = 3797104728D3D10600D5F53C /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */; productName = SDWebImageSwiftUI; }; - 3797665A2C79FA6900C10DBD /* MPVKit */ = { - isa = XCSwiftPackageProductDependency; - package = 379766592C79FA6900C10DBD /* XCRemoteSwiftPackageReference "MPVKit" */; - productName = MPVKit; - }; - 3797665C2C79FA7500C10DBD /* MPVKit */ = { - isa = XCSwiftPackageProductDependency; - package = 379766592C79FA6900C10DBD /* XCRemoteSwiftPackageReference "MPVKit" */; - productName = MPVKit; - }; - 3797665E2C79FA7D00C10DBD /* MPVKit */ = { - isa = XCSwiftPackageProductDependency; - package = 379766592C79FA6900C10DBD /* XCRemoteSwiftPackageReference "MPVKit" */; - productName = MPVKit; - }; 3797757C268922D100DD52A8 /* Siesta */ = { isa = XCSwiftPackageProductDependency; package = 3797757B268922D100DD52A8 /* XCRemoteSwiftPackageReference "siesta" */; @@ -5328,6 +5313,21 @@ package = 37FB285227220D8400A57617 /* XCRemoteSwiftPackageReference "SDWebImagePINPlugin" */; productName = SDWebImagePINPlugin; }; + E265D0C12C7D217000D2BB8E /* MPVKit */ = { + isa = XCSwiftPackageProductDependency; + package = E265D0C02C7D217000D2BB8E /* XCRemoteSwiftPackageReference "MPVKit" */; + productName = MPVKit; + }; + E265D0C32C7D218A00D2BB8E /* MPVKit */ = { + isa = XCSwiftPackageProductDependency; + package = E265D0C02C7D217000D2BB8E /* XCRemoteSwiftPackageReference "MPVKit" */; + productName = MPVKit; + }; + E265D0C52C7D21A300D2BB8E /* MPVKit */ = { + isa = XCSwiftPackageProductDependency; + package = E265D0C02C7D217000D2BB8E /* XCRemoteSwiftPackageReference "MPVKit" */; + productName = MPVKit; + }; /* End XCSwiftPackageProductDependency section */ /* Begin XCVersionGroup section */ diff --git a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a0157a09..0cca7eec 100644 --- a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "1f99971d9d21cffe56d0033bc5c38e9fcd5ff46ca5f7d19c76f5ba0a268ce4b6", + "originHash" : "193e96313b1796c618e74a8b1c36659d0f16f66278ff8045f9e02c42590ae5aa", "pins" : [ { "identity" : "activelabel.swift", @@ -58,10 +58,10 @@ { "identity" : "mpvkit", "kind" : "remoteSourceControl", - "location" : "https://github.com/cxfksword/MPVKit", + "location" : "https://github.com/mpvkit/MPVKit.git", "state" : { - "revision" : "f646e4b625e9c8a2ff22a7e0bb5557306300be5d", - "version" : "0.38.0" + "revision" : "ee72059235566df8b455bff15e3f83a1c9053e78", + "version" : "0.38.0-fix" } }, { diff --git a/macOS/VideoLayer.swift b/macOS/VideoLayer.swift index c37b0d06..12b00b7b 100644 --- a/macOS/VideoLayer.swift +++ b/macOS/VideoLayer.swift @@ -1,7 +1,7 @@ import Cocoa -import MPVKit import OpenGL.GL import OpenGL.GL3 +import Libmpv final class VideoLayer: CAOpenGLLayer { var client: MPVClient!