diff --git a/Moonlight.xcodeproj/project.pbxproj b/Moonlight.xcodeproj/project.pbxproj index 0d7c0cf..4b9e478 100644 --- a/Moonlight.xcodeproj/project.pbxproj +++ b/Moonlight.xcodeproj/project.pbxproj @@ -8,6 +8,8 @@ /* Begin PBXBuildFile section */ 9832D1361BBCD5C50036EF48 /* TemporaryApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9832D1351BBCD5C50036EF48 /* TemporaryApp.m */; }; + 9865DC30213260B40005B9B9 /* libmoonlight-common-tv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB1A68152132509400507771 /* libmoonlight-common-tv.a */; }; + 9865DC31213260F10005B9B9 /* mkcert.c in Sources */ = {isa = PBXBuildFile; fileRef = FB89460719F646E200339C8A /* mkcert.c */; }; 9890CF6B203B7EE1006C4B06 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9890CF6A203B7EE1006C4B06 /* libxml2.tbd */; }; 98CFB82F1CAD481B0048EF74 /* libmoonlight-common.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 98AB2E841CAD46840089BB98 /* libmoonlight-common.a */; }; 98D5856D1C0EA79600F6CC00 /* TemporaryHost.m in Sources */ = {isa = PBXBuildFile; fileRef = 98D5856C1C0EA79600F6CC00 /* TemporaryHost.m */; }; @@ -383,6 +385,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 9865DC30213260B40005B9B9 /* libmoonlight-common-tv.a in Frameworks */, FB1A67EA21324DF300507771 /* libxml2.tbd in Frameworks */, FB1A67E821324DE300507771 /* libopus.a in Frameworks */, FB1A67E621324DD600507771 /* libcrypto.a in Frameworks */, @@ -1034,6 +1037,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9865DC31213260F10005B9B9 /* mkcert.c in Sources */, FB1A67E32132498A00507771 /* Limelight.xcdatamodeld in Sources */, FB1A67DE2132460A00507771 /* Utils.m in Sources */, FB1A67E02132460A00507771 /* Logger.m in Sources */, @@ -1240,8 +1244,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/libs/openssl/lib", - "$(PROJECT_DIR)/libs/opus/lib", + "$(PROJECT_DIR)/libs/openssl/lib/tvOS", + "$(PROJECT_DIR)/libs/opus/lib/tvOS", ); MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight-TV"; @@ -1285,8 +1289,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/libs/openssl/lib", - "$(PROJECT_DIR)/libs/opus/lib", + "$(PROJECT_DIR)/libs/openssl/lib/tvOS", + "$(PROJECT_DIR)/libs/opus/lib/tvOS", ); MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight-TV"; @@ -1414,7 +1418,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_BITCODE = NO; + ENABLE_BITCODE = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Limelight/Limelight-Prefix.pch"; HEADER_SEARCH_PATHS = ( @@ -1428,14 +1432,15 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/libs/opus/lib", - "$(PROJECT_DIR)/libs/openssl/lib", + "$(PROJECT_DIR)/libs/opus/lib/iOS", + "$(PROJECT_DIR)/libs/openssl/lib/iOS", ); PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "Limelight/Input/Moonlight-Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = "Moonlight-Swift.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; @@ -1450,7 +1455,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_BITCODE = NO; + ENABLE_BITCODE = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Limelight/Limelight-Prefix.pch"; HEADER_SEARCH_PATHS = ( @@ -1464,14 +1469,15 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/libs/opus/lib", - "$(PROJECT_DIR)/libs/openssl/lib", + "$(PROJECT_DIR)/libs/opus/lib/iOS", + "$(PROJECT_DIR)/libs/openssl/lib/iOS", ); PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "Limelight/Input/Moonlight-Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = "Moonlight-Swift.h"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; diff --git a/libs/opus/include/opus/opus.h b/libs/opus/include/opus/opus.h index b0bdf6f..5be73dd 100644 --- a/libs/opus/include/opus/opus.h +++ b/libs/opus/include/opus/opus.h @@ -142,7 +142,7 @@ extern "C" { * * opus_encode() and opus_encode_float() return the number of bytes actually written to the packet. * The return value can be negative, which indicates that an error has occurred. If the return value - * is 1 byte, then the packet does not need to be transmitted (DTX). + * is 2 bytes or less, then the packet does not need to be transmitted (DTX). * * Once the encoder state if no longer needed, it can be destroyed with * diff --git a/libs/opus/include/opus/opus_defines.h b/libs/opus/include/opus/opus_defines.h index 41e81f0..315412d 100644 --- a/libs/opus/include/opus/opus_defines.h +++ b/libs/opus/include/opus/opus_defines.h @@ -65,7 +65,7 @@ extern "C" { #ifndef OPUS_EXPORT # if defined(WIN32) -# ifdef OPUS_BUILD +# if defined(OPUS_BUILD) && defined(DLL_EXPORT) # define OPUS_EXPORT __declspec(dllexport) # else # define OPUS_EXPORT @@ -274,7 +274,6 @@ extern "C" { /** Enables or disables variable bitrate (VBR) in the encoder. * The configured bitrate may not be met exactly because frames must * be an integer number of bytes in length. - * @warning Only the MDCT mode of Opus can provide hard CBR behavior. * @see OPUS_GET_VBR * @see OPUS_SET_VBR_CONSTRAINT * @param[in] x opus_int32: Allowed values: @@ -490,9 +489,9 @@ extern "C" { #define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x) /** Configures the encoder's expected packet loss percentage. - * Higher values with trigger progressively more loss resistant behavior in the encoder - * at the expense of quality at a given bitrate in the lossless case, but greater quality - * under loss. + * Higher values trigger progressively more loss resistant behavior in the encoder + * at the expense of quality at a given bitrate in the absence of packet loss, but + * greater quality under loss. * @see OPUS_GET_PACKET_LOSS_PERC * @param[in] x opus_int32: Loss percentage in the range 0-100, inclusive (default: 0). * @hideinitializer */ @@ -524,7 +523,19 @@ extern "C" { * @hideinitializer */ #define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x) /** Configures the depth of signal being encoded. + * * This is a hint which helps the encoder identify silence and near-silence. + * It represents the number of significant bits of linear intensity below + * which the signal contains ignorable quantization or other noise. + * + * For example, OPUS_SET_LSB_DEPTH(14) would be an appropriate setting + * for G.711 u-law input. OPUS_SET_LSB_DEPTH(16) would be appropriate + * for 16-bit linear pcm input with opus_encode_float(). + * + * When using opus_encode() instead of opus_encode_float(), or when libopus + * is compiled for fixed-point, the encoder uses the minimum of the value + * set here and the value 16. + * * @see OPUS_GET_LSB_DEPTH * @param[in] x opus_int32: Input precision in bits, between 8 and 24 * (default: 24). @@ -545,12 +556,12 @@ extern "C" { * packet. The part of the audio that was not encoded needs to be resent to the * encoder for the next call. Do not use this option unless you really * know what you are doing. - * @see OPUS_GET_EXPERT_VARIABLE_DURATION + * @see OPUS_GET_EXPERT_FRAME_DURATION * @param[in] x opus_int32: Allowed values: *
streams to 1 when initializing the encoder or
@@ -140,7 +140,7 @@ extern "C" {
*
* The output channels specified by the encoder
* should use the
- * Vorbis
+ * Vorbis
* channel ordering. A decoder may wish to apply an additional permutation
* to the mapping the encoder used to achieve a different output channel
* order (e.g. for outputing in WAV order).
diff --git a/libs/opus/lib/iOS/libopus.a b/libs/opus/lib/iOS/libopus.a
new file mode 100644
index 0000000..84c164a
Binary files /dev/null and b/libs/opus/lib/iOS/libopus.a differ
diff --git a/libs/opus/lib/libopus.a b/libs/opus/lib/libopus.a
deleted file mode 100644
index 623b4f9..0000000
Binary files a/libs/opus/lib/libopus.a and /dev/null differ
diff --git a/libs/opus/lib/libopus_mac.a b/libs/opus/lib/macOS/libopus.a
similarity index 100%
rename from libs/opus/lib/libopus_mac.a
rename to libs/opus/lib/macOS/libopus.a
diff --git a/libs/opus/lib/tvOS/libopus.a b/libs/opus/lib/tvOS/libopus.a
new file mode 100644
index 0000000..5b2192e
Binary files /dev/null and b/libs/opus/lib/tvOS/libopus.a differ
diff --git a/moonlight-common/moonlight-common-tv/moonlight_common_tv.h b/moonlight-common/moonlight-common-tv/moonlight_common_tv.h
deleted file mode 100644
index e960e28..0000000
--- a/moonlight-common/moonlight-common-tv/moonlight_common_tv.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// moonlight_common_tv.h
-// moonlight-common-tv
-//
-// Created by Diego Waxemberg on 8/25/18.
-// Copyright © 2018 Moonlight Stream. All rights reserved.
-//
-
-#import