Skip to content

Commit

Permalink
Merge pull request #677 from kingslay/develop
Browse files Browse the repository at this point in the history
merge to main
  • Loading branch information
kingslay authored Nov 30, 2023
2 parents 7ffe150 + f895ff0 commit 971ac8c
Show file tree
Hide file tree
Showing 68 changed files with 880 additions and 631 deletions.
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: bug
assignees: ''

---
Expand All @@ -23,11 +23,13 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.


**Platform (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
Add any other context about the problem here. or Using FFmpeg to extract problematic video segments and upload them to GitHub.(ffmpeg -i http://xxx.com/123.mkv -map 0 -c copy -ss 00:00:50 -to 00:04:10 1.mkv)
<!--
If you want your raised issues to be addressed more promptly, you might consider making a donation.
-->
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: enhancement
assignees: ''

---
Expand All @@ -18,3 +18,6 @@ A clear and concise description of any alternative solutions or features you've

**Additional context**
Add any other context or screenshots about the feature request here.
<!--
If you want your raised issues to be addressed more promptly, you might consider making a donation.
-->
2 changes: 1 addition & 1 deletion Demo/Demo.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Demo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ workspace 'Demo.xcworkspace'
install! 'cocoapods', :generate_multiple_pod_projects => true
def common
pod 'KSPlayer', :path => '../', :testspecs => ['Tests']
pod 'Libass', :path => '../FFmpegKit'
pod 'OpenSSL', :path => '../FFmpegKit'
pod 'FFmpegKit', :path => '../FFmpegKit'
# pod 'Libass',:git => 'https://github.com/kingslay/FFmpegKit.git', :branch => 'main'
# pod 'FFmpegKit',:git => 'https://github.com/kingslay/FFmpegKit.git', :branch => 'main'
# pod 'OpenSSL',:git => 'https://github.com/kingslay/FFmpegKit.git', :branch => 'main'
pod 'SwiftLint'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@
<array>
<string>audio</string>
<string>fetch</string>
<string>remote-notification</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
AC77DFB026402327001351AE /* TracyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracyApp.swift; sourceTree = "<group>"; };
AC77DFB126402327001351AE /* URLImportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLImportView.swift; sourceTree = "<group>"; };
AC77DFB226402329001351AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
AC77DFB726402329001351AE /* TracyPlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TracyPlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
AC77DFB726402329001351AE /* Player.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Player.app; sourceTree = BUILT_PRODUCTS_DIR; };
ACADA07528EDC067001B76D1 /* TracyPlayer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TracyPlayer.entitlements; sourceTree = "<group>"; };
ACB965462A42EDCD00378A4C /* SettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingView.swift; sourceTree = "<group>"; };
ACD2F747275F6E860006D16F /* KSPlayer */ = {isa = PBXFileReference; lastKnownFileType = folder; name = KSPlayer; path = ../..; sourceTree = "<group>"; };
ACD786482A6A8648004A0220 /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = "<group>"; };
ACE3619328EB689F00F234EB /* TracyPlayer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "TracyPlayer-Info.plist"; sourceTree = "<group>"; };
ACE3619328EB689F00F234EB /* Player-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Player-Info.plist"; sourceTree = "<group>"; };
ACEA9FEA298BFC8800FBA74B /* MovieModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieModel.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -59,7 +59,7 @@
isa = PBXGroup;
children = (
ACADA07528EDC067001B76D1 /* TracyPlayer.entitlements */,
ACE3619328EB689F00F234EB /* TracyPlayer-Info.plist */,
ACE3619328EB689F00F234EB /* Player-Info.plist */,
ACD2F743275F6D7A0006D16F /* Packages */,
AC77DFAF26402327001351AE /* Shared */,
AC77DFB826402329001351AE /* Products */,
Expand All @@ -83,7 +83,6 @@
ACD786482A6A8648004A0220 /* Defaults.swift */,
AC43F6652A519D400026ECF2 /* Persistence.swift */,
AC77DFB226402329001351AE /* Assets.xcassets */,
ACD2F77F275F9BEE0006D16F /* Resources */,
AC43F6422A51916F0026ECF2 /* Model.xcdatamodeld */,
);
path = Shared;
Expand All @@ -92,7 +91,7 @@
AC77DFB826402329001351AE /* Products */ = {
isa = PBXGroup;
children = (
AC77DFB726402329001351AE /* TracyPlayer.app */,
AC77DFB726402329001351AE /* Player.app */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -112,20 +111,12 @@
name = Frameworks;
sourceTree = "<group>";
};
ACD2F77F275F9BEE0006D16F /* Resources */ = {
isa = PBXGroup;
children = (
);
name = Resources;
path = ../../../Tests/KSPlayerTests/Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
AC77DFB626402329001351AE /* TracyPlayer */ = {
AC77DFB626402329001351AE /* Player */ = {
isa = PBXNativeTarget;
buildConfigurationList = AC77DFCB26402329001351AE /* Build configuration list for PBXNativeTarget "TracyPlayer" */;
buildConfigurationList = AC77DFCB26402329001351AE /* Build configuration list for PBXNativeTarget "Player" */;
buildPhases = (
AC77DFB326402329001351AE /* Sources */,
AC77DFB426402329001351AE /* Frameworks */,
Expand All @@ -135,12 +126,12 @@
);
dependencies = (
);
name = TracyPlayer;
name = Player;
packageProductDependencies = (
ACD2F771275F735C0006D16F /* KSPlayer */,
);
productName = "demo-SPM (iOS)";
productReference = AC77DFB726402329001351AE /* TracyPlayer.app */;
productReference = AC77DFB726402329001351AE /* Player.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand All @@ -158,7 +149,7 @@
};
};
};
buildConfigurationList = AC77DFAE26402327001351AE /* Build configuration list for PBXProject "TracyPlayer" */;
buildConfigurationList = AC77DFAE26402327001351AE /* Build configuration list for PBXProject "Player" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand All @@ -171,7 +162,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
AC77DFB626402329001351AE /* TracyPlayer */,
AC77DFB626402329001351AE /* Player */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -356,7 +347,7 @@
ENABLE_HARDENED_RUNTIME = YES;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "TracyPlayer-Info.plist";
INFOPLIST_FILE = "Player-Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_UILaunchStoryboardName = " ";
Expand All @@ -369,7 +360,8 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.2;
PRODUCT_BUNDLE_IDENTIFIER = com.kintan.tracy;
PRODUCT_BUNDLE_IDENTIFIER = com.kintan.player;
PRODUCT_NAME = Player;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
Expand Down Expand Up @@ -398,7 +390,7 @@
ENABLE_HARDENED_RUNTIME = YES;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "TracyPlayer-Info.plist";
INFOPLIST_FILE = "Player-Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_UILaunchStoryboardName = " ";
Expand All @@ -411,7 +403,8 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.2;
PRODUCT_BUNDLE_IDENTIFIER = com.kintan.tracy;
PRODUCT_BUNDLE_IDENTIFIER = com.kintan.player;
PRODUCT_NAME = Player;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
Expand All @@ -428,7 +421,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
AC77DFAE26402327001351AE /* Build configuration list for PBXProject "TracyPlayer" */ = {
AC77DFAE26402327001351AE /* Build configuration list for PBXProject "Player" */ = {
isa = XCConfigurationList;
buildConfigurations = (
AC77DFC926402329001351AE /* Debug */,
Expand All @@ -437,7 +430,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
AC77DFCB26402329001351AE /* Build configuration list for PBXNativeTarget "TracyPlayer" */ = {
AC77DFCB26402329001351AE /* Build configuration list for PBXNativeTarget "Player" */ = {
isa = XCConfigurationList;
buildConfigurations = (
AC77DFCC26402329001351AE /* Debug */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC77DFB626402329001351AE"
BuildableName = "TracyPlayer.app"
BlueprintName = "TracyPlayer"
ReferencedContainer = "container:TracyPlayer.xcodeproj">
BuildableName = "Player.app"
BlueprintName = "Player"
ReferencedContainer = "container:Player.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -26,16 +26,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/../../FFmpegKit/.Script/LLDBInitFile"
enableASanStackUseAfterReturn = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -47,17 +44,11 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC77DFB626402329001351AE"
BuildableName = "TracyPlayer.app"
BlueprintName = "TracyPlayer"
ReferencedContainer = "container:TracyPlayer.xcodeproj">
BuildableName = "Player.app"
BlueprintName = "Player"
ReferencedContainer = "container:Player.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-com.apple.CoreData.ConcurrencyDebug 1"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -70,9 +61,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC77DFB626402329001351AE"
BuildableName = "TracyPlayer.app"
BlueprintName = "TracyPlayer"
ReferencedContainer = "container:TracyPlayer.xcodeproj">
BuildableName = "Player.app"
BlueprintName = "Player"
ReferencedContainer = "container:Player.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
2 changes: 1 addition & 1 deletion Demo/SwiftUI/Shared/FilesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ struct M3UView: View {
struct AddM3UView: View {
#if DEBUG && targetEnvironment(simulator)
@State
private var url = "https://raw.githubusercontent.com/kingslay/KSPlayer/develop/Tests/KSPlayerTests/test.m3u"
private var url = "https://raw.githubusercontent.com/kingslay/TestVideo/main/TestVideo.m3u"
#else
@State
private var url = ""
Expand Down
15 changes: 3 additions & 12 deletions Demo/SwiftUI/Shared/MovieModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class MEOptions: KSOptions {
override func updateVideo(refreshRate: Float, isDovi: Bool, formatDescription: CMFormatDescription?) {
#if os(tvOS) || os(xrOS)
guard let displayManager = UIApplication.shared.windows.first?.avDisplayManager,
displayManager.isDisplayCriteriaMatchingEnabled,
!displayManager.isDisplayModeSwitchInProgress
displayManager.isDisplayCriteriaMatchingEnabled
else {
return
}
Expand Down Expand Up @@ -253,16 +252,8 @@ extension MovieModel {
return playmodel
}
let model = PlayModel()
guard let context = managedObjectContext, let privateStore = PersistenceController.shared.privateStore else {
return model
}
let newMovieModel = MovieModel(context: context)
newMovieModel.setValuesForKeys(dictionaryWithValues(forKeys: entity.attributesByName.keys.map { $0 }))
newMovieModel.playmodel = model
context.assign(newMovieModel, to: privateStore)
// try? context.save()
newMovieModel.save()
context.delete(self)
playmodel = model
model.save()
return model
}
}
Expand Down
Loading

0 comments on commit 971ac8c

Please sign in to comment.