-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated build scripts for Mac Catalyst & added satellite TV codecs
- Loading branch information
1 parent
bd44fd8
commit 9428cf3
Showing
26 changed files
with
1,042 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>SGPlayer</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>2.0.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>$(CURRENT_PROJECT_VERSION)</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright © 2017年 single. All rights reserved.</string> | ||
<key>NSPrincipalClass</key> | ||
<string></string> | ||
</dict> | ||
</plist> |
Large diffs are not rendered by default.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
SGPlayer.xcodeproj/xcshareddata/xcschemes/SGPlayer Catalyst.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1100" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "B0198738231AAB3900EC1C47" | ||
BuildableName = "SGPlayer.framework" | ||
BlueprintName = "SGPlayer Catalyst" | ||
ReferencedContainer = "container:SGPlayer.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "B0198738231AAB3900EC1C47" | ||
BuildableName = "SGPlayer.framework" | ||
BlueprintName = "SGPlayer Catalyst" | ||
ReferencedContainer = "container:SGPlayer.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
// | ||
// Catalyst.h | ||
// SGPlayer | ||
// | ||
// Created by Steven Troughton-Smith on 31/08/2019. | ||
// Copyright © 2019 single. All rights reserved. | ||
// | ||
|
||
#ifndef Catalyst_h | ||
#define Catalyst_h | ||
|
||
#define GLK_INLINE static __inline__ | ||
|
||
#if defined(__STRICT_ANSI__) | ||
struct _GLKMatrix4 | ||
{ | ||
float m[16]; | ||
} __attribute__((aligned(16))); | ||
typedef struct _GLKMatrix4 GLKMatrix4; | ||
#else | ||
union _GLKMatrix4 | ||
{ | ||
struct | ||
{ | ||
float m00, m01, m02, m03; | ||
float m10, m11, m12, m13; | ||
float m20, m21, m22, m23; | ||
float m30, m31, m32, m33; | ||
}; | ||
float m[16]; | ||
} __attribute__((aligned(16))); | ||
typedef union _GLKMatrix4 GLKMatrix4; | ||
#endif | ||
|
||
GLK_INLINE GLKMatrix4 GLKMatrix4Multiply(GLKMatrix4 matrixLeft, GLKMatrix4 matrixRight) | ||
{ | ||
#if defined(GLK_SSE3_INTRINSICS) | ||
|
||
const __m128 l0 = _mm_load_ps(&matrixLeft.m[0]); | ||
const __m128 l1 = _mm_load_ps(&matrixLeft.m[4]); | ||
const __m128 l2 = _mm_load_ps(&matrixLeft.m[8]); | ||
const __m128 l3 = _mm_load_ps(&matrixLeft.m[12]); | ||
|
||
const __m128 r0 = _mm_load_ps(&matrixRight.m[0]); | ||
const __m128 r1 = _mm_load_ps(&matrixRight.m[4]); | ||
const __m128 r2 = _mm_load_ps(&matrixRight.m[8]); | ||
const __m128 r3 = _mm_load_ps(&matrixRight.m[12]); | ||
|
||
const __m128 m0 = l0 * _mm_shuffle_ps(r0, r0, _MM_SHUFFLE(0, 0, 0, 0)) | ||
+ l1 * _mm_shuffle_ps(r0, r0, _MM_SHUFFLE(1, 1, 1, 1)) | ||
+ l2 * _mm_shuffle_ps(r0, r0, _MM_SHUFFLE(2, 2, 2, 2)) | ||
+ l3 * _mm_shuffle_ps(r0, r0, _MM_SHUFFLE(3, 3, 3, 3)); | ||
|
||
const __m128 m1 = l0 * _mm_shuffle_ps(r1, r1, _MM_SHUFFLE(0, 0, 0, 0)) | ||
+ l1 * _mm_shuffle_ps(r1, r1, _MM_SHUFFLE(1, 1, 1, 1)) | ||
+ l2 * _mm_shuffle_ps(r1, r1, _MM_SHUFFLE(2, 2, 2, 2)) | ||
+ l3 * _mm_shuffle_ps(r1, r1, _MM_SHUFFLE(3, 3, 3, 3)); | ||
|
||
const __m128 m2 = l0 * _mm_shuffle_ps(r2, r2, _MM_SHUFFLE(0, 0, 0, 0)) | ||
+ l1 * _mm_shuffle_ps(r2, r2, _MM_SHUFFLE(1, 1, 1, 1)) | ||
+ l2 * _mm_shuffle_ps(r2, r2, _MM_SHUFFLE(2, 2, 2, 2)) | ||
+ l3 * _mm_shuffle_ps(r2, r2, _MM_SHUFFLE(3, 3, 3, 3)); | ||
|
||
const __m128 m3 = l0 * _mm_shuffle_ps(r3, r3, _MM_SHUFFLE(0, 0, 0, 0)) | ||
+ l1 * _mm_shuffle_ps(r3, r3, _MM_SHUFFLE(1, 1, 1, 1)) | ||
+ l2 * _mm_shuffle_ps(r3, r3, _MM_SHUFFLE(2, 2, 2, 2)) | ||
+ l3 * _mm_shuffle_ps(r3, r3, _MM_SHUFFLE(3, 3, 3, 3)); | ||
|
||
GLKMatrix4 m; | ||
_mm_store_ps(&m.m[0], m0); | ||
_mm_store_ps(&m.m[4], m1); | ||
_mm_store_ps(&m.m[8], m2); | ||
_mm_store_ps(&m.m[12], m3); | ||
return m; | ||
|
||
#else | ||
GLKMatrix4 m; | ||
|
||
m.m[0] = matrixLeft.m[0] * matrixRight.m[0] + matrixLeft.m[4] * matrixRight.m[1] + matrixLeft.m[8] * matrixRight.m[2] + matrixLeft.m[12] * matrixRight.m[3]; | ||
m.m[4] = matrixLeft.m[0] * matrixRight.m[4] + matrixLeft.m[4] * matrixRight.m[5] + matrixLeft.m[8] * matrixRight.m[6] + matrixLeft.m[12] * matrixRight.m[7]; | ||
m.m[8] = matrixLeft.m[0] * matrixRight.m[8] + matrixLeft.m[4] * matrixRight.m[9] + matrixLeft.m[8] * matrixRight.m[10] + matrixLeft.m[12] * matrixRight.m[11]; | ||
m.m[12] = matrixLeft.m[0] * matrixRight.m[12] + matrixLeft.m[4] * matrixRight.m[13] + matrixLeft.m[8] * matrixRight.m[14] + matrixLeft.m[12] * matrixRight.m[15]; | ||
|
||
m.m[1] = matrixLeft.m[1] * matrixRight.m[0] + matrixLeft.m[5] * matrixRight.m[1] + matrixLeft.m[9] * matrixRight.m[2] + matrixLeft.m[13] * matrixRight.m[3]; | ||
m.m[5] = matrixLeft.m[1] * matrixRight.m[4] + matrixLeft.m[5] * matrixRight.m[5] + matrixLeft.m[9] * matrixRight.m[6] + matrixLeft.m[13] * matrixRight.m[7]; | ||
m.m[9] = matrixLeft.m[1] * matrixRight.m[8] + matrixLeft.m[5] * matrixRight.m[9] + matrixLeft.m[9] * matrixRight.m[10] + matrixLeft.m[13] * matrixRight.m[11]; | ||
m.m[13] = matrixLeft.m[1] * matrixRight.m[12] + matrixLeft.m[5] * matrixRight.m[13] + matrixLeft.m[9] * matrixRight.m[14] + matrixLeft.m[13] * matrixRight.m[15]; | ||
|
||
m.m[2] = matrixLeft.m[2] * matrixRight.m[0] + matrixLeft.m[6] * matrixRight.m[1] + matrixLeft.m[10] * matrixRight.m[2] + matrixLeft.m[14] * matrixRight.m[3]; | ||
m.m[6] = matrixLeft.m[2] * matrixRight.m[4] + matrixLeft.m[6] * matrixRight.m[5] + matrixLeft.m[10] * matrixRight.m[6] + matrixLeft.m[14] * matrixRight.m[7]; | ||
m.m[10] = matrixLeft.m[2] * matrixRight.m[8] + matrixLeft.m[6] * matrixRight.m[9] + matrixLeft.m[10] * matrixRight.m[10] + matrixLeft.m[14] * matrixRight.m[11]; | ||
m.m[14] = matrixLeft.m[2] * matrixRight.m[12] + matrixLeft.m[6] * matrixRight.m[13] + matrixLeft.m[10] * matrixRight.m[14] + matrixLeft.m[14] * matrixRight.m[15]; | ||
|
||
m.m[3] = matrixLeft.m[3] * matrixRight.m[0] + matrixLeft.m[7] * matrixRight.m[1] + matrixLeft.m[11] * matrixRight.m[2] + matrixLeft.m[15] * matrixRight.m[3]; | ||
m.m[7] = matrixLeft.m[3] * matrixRight.m[4] + matrixLeft.m[7] * matrixRight.m[5] + matrixLeft.m[11] * matrixRight.m[6] + matrixLeft.m[15] * matrixRight.m[7]; | ||
m.m[11] = matrixLeft.m[3] * matrixRight.m[8] + matrixLeft.m[7] * matrixRight.m[9] + matrixLeft.m[11] * matrixRight.m[10] + matrixLeft.m[15] * matrixRight.m[11]; | ||
m.m[15] = matrixLeft.m[3] * matrixRight.m[12] + matrixLeft.m[7] * matrixRight.m[13] + matrixLeft.m[11] * matrixRight.m[14] + matrixLeft.m[15] * matrixRight.m[15]; | ||
|
||
return m; | ||
#endif | ||
} | ||
|
||
|
||
extern const GLKMatrix4 GLKMatrix4Identity; | ||
|
||
GLK_INLINE GLKMatrix4 GLKMatrix4MakeZRotation(float radians) | ||
{ | ||
float cos = cosf(radians); | ||
float sin = sinf(radians); | ||
|
||
GLKMatrix4 m = { cos, sin, 0.0f, 0.0f, | ||
-sin, cos, 0.0f, 0.0f, | ||
0.0f, 0.0f, 1.0f, 0.0f, | ||
0.0f, 0.0f, 0.0f, 1.0f }; | ||
|
||
return m; | ||
} | ||
|
||
GLK_INLINE GLKMatrix4 GLKMatrix4RotateZ(GLKMatrix4 matrix, float radians); | ||
GLK_INLINE GLKMatrix4 GLKMatrix4RotateZ(GLKMatrix4 matrix, float radians) | ||
{ | ||
GLKMatrix4 rm = GLKMatrix4MakeZRotation(radians); | ||
return GLKMatrix4Multiply(matrix, rm); | ||
} | ||
|
||
|
||
GLK_INLINE GLKMatrix4 GLKMatrix4Transpose(GLKMatrix4 matrix) | ||
{ | ||
GLKMatrix4 m = { matrix.m[0], matrix.m[4], matrix.m[8], matrix.m[12], | ||
matrix.m[1], matrix.m[5], matrix.m[9], matrix.m[13], | ||
matrix.m[2], matrix.m[6], matrix.m[10], matrix.m[14], | ||
matrix.m[3], matrix.m[7], matrix.m[11], matrix.m[15] }; | ||
return m; | ||
} | ||
|
||
|
||
GLK_INLINE GLKMatrix4 GLKMatrix4MakeYRotation(float radians) | ||
{ | ||
float cos = cosf(radians); | ||
float sin = sinf(radians); | ||
|
||
GLKMatrix4 m = { cos, 0.0f, -sin, 0.0f, | ||
0.0f, 1.0f, 0.0f, 0.0f, | ||
sin, 0.0f, cos, 0.0f, | ||
0.0f, 0.0f, 0.0f, 1.0f }; | ||
|
||
return m; | ||
} | ||
|
||
GLK_INLINE GLKMatrix4 GLKMatrix4RotateY(GLKMatrix4 matrix, float radians) | ||
{ | ||
GLKMatrix4 rm = GLKMatrix4MakeYRotation(radians); | ||
return GLKMatrix4Multiply(matrix, rm); | ||
} | ||
|
||
GLK_INLINE float GLKMathDegreesToRadians(float degrees) { return degrees * (M_PI / 180); }; | ||
|
||
|
||
#endif /* Catalyst_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.