Compare commits
12 Commits
f83ac60ef6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 1745dc8646 | |||
| f705dc0ab7 | |||
|
|
a40b179886 | ||
|
|
7ec7566ad7 | ||
|
|
8d5341b255 | ||
|
|
a8a9059cf4 | ||
|
|
2d8544cf67 | ||
|
|
09e848c396 | ||
|
|
08757dcd6c | ||
|
|
6d0eaa8ede | ||
|
|
bf47fca9e4 | ||
|
|
176678ad2d |
35
README.md
35
README.md
@@ -60,7 +60,7 @@ In short, ICC color correction should be totally useless while streaming HDR. It
|
||||
|
||||
It's very complicated to explain why HDR is a total mess, and why enabling HDR makes the image appear dark/yellow. If it's your first time got HDR streaming working, and thinks HDR looks awful, you're right, but that's not Apollo's fault, it's your device that tone mapped SDR content to the maximum of the capability of its screen, there's no headroom for anything beyond that actual peak brightness for HDR. For details, please take a look [here](https://github.com/ClassicOldSong/Apollo/issues/164).
|
||||
|
||||
For client devies, usually Apple products that have HDR capability can be trusted to have good results, other than that, your luck depends.
|
||||
For client devices, usually Apple products that have HDR capability can be trusted to have good results, other than that, your luck depends.
|
||||
|
||||
<details>
|
||||
<summary>DEPRECATION ALERT</summary>
|
||||
@@ -155,8 +155,41 @@ No real time chat support will ever be provided for Apollo and Artemis. Includin
|
||||
|
||||
## Downloads
|
||||
|
||||
### Direct Download
|
||||
|
||||
**Recommended**
|
||||
|
||||
[Releases](https://github.com/ClassicOldSong/Apollo/releases)
|
||||
|
||||
### WinGet
|
||||
|
||||
**Note:** Community maintained
|
||||
|
||||
In an elevated PowerShell window, run
|
||||
|
||||
```pwsh
|
||||
winget install ClassicOldSong.Apollo
|
||||
|
||||
```
|
||||
|
||||
You'll need WinGet installed first.
|
||||
|
||||
### Chocolatey
|
||||
|
||||
**Note:** Community maintained
|
||||
|
||||
You can also install the apollo streaming server with chocolatey.
|
||||
|
||||
Install Chocolatey if you don't have it, then run the following command in an elevated PowerShell/CMD window:
|
||||
|
||||
```pwsh
|
||||
choco upgrade apollo -y
|
||||
```
|
||||
|
||||
Same command can be used to upgrade, add to a scheduled task to automate updates.
|
||||
|
||||
See more details on the chocolatey package [here](https://community.chocolatey.org/packages/apollo)
|
||||
|
||||
## Disclaimer
|
||||
|
||||
I got kicked from Moonlight and Sunshine's Discord server and banned from Sunshine's GitHub repo literally for helping people out.
|
||||
|
||||
@@ -9,9 +9,8 @@ set(BOOST_COMPONENTS
|
||||
locale
|
||||
log
|
||||
program_options
|
||||
system
|
||||
)
|
||||
# system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
|
||||
# boost_system is header-only since Boost 1.69 and has no compiled library since 1.89+
|
||||
|
||||
# algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience
|
||||
if(WIN32)
|
||||
@@ -101,3 +100,12 @@ endif()
|
||||
|
||||
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
|
||||
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
|
||||
|
||||
# boost_system is header-only since Boost 1.69 and has no compiled library in 1.89+.
|
||||
# Create a stub INTERFACE target for backward compatibility (e.g., Simple-Web-Server).
|
||||
if(NOT TARGET Boost::system)
|
||||
add_library(Boost::system IMPORTED INTERFACE GLOBAL)
|
||||
if(TARGET Boost::headers)
|
||||
target_link_libraries(Boost::system INTERFACE Boost::headers)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -22,6 +22,12 @@ macro(find_package) # cmake-lint: disable=C0103
|
||||
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED)
|
||||
)
|
||||
# Do nothing, as the package has already been fetched
|
||||
elseif("${ARGV0_LOWER}" STREQUAL "boost_system" AND Boost_FOUND)
|
||||
# boost_system is header-only since Boost 1.69 with no compiled library in 1.89+.
|
||||
# BoostConfig.cmake calls find_package(boost_system) internally; intercept it here
|
||||
# and report success so BoostConfig.cmake accepts Boost::system as a valid target.
|
||||
set(boost_system_FOUND TRUE) # cmake-lint: disable=C0103
|
||||
set(boost_system_VERSION "${Boost_VERSION}") # cmake-lint: disable=C0103
|
||||
else()
|
||||
# Call the original find_package function
|
||||
_find_package(${ARGV})
|
||||
|
||||
58
generate_pkgbuild.sh
Executable file
58
generate_pkgbuild.sh
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CLONE_URL="https://izackpgit.duckdns.org/izackp/Apollo.git"
|
||||
REPO_DIR="$(dirname "$0")"
|
||||
BUILD_DIR="$REPO_DIR/build"
|
||||
PKG_DIR="$REPO_DIR/pkg"
|
||||
|
||||
COMMIT=$(git rev-parse HEAD)
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
RAW_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
||||
BUILD_VERSION="${RAW_TAG#v}"
|
||||
|
||||
COMMIT_SHORT=$(git rev-parse --short HEAD)
|
||||
COMMIT_COUNT=$(git rev-list "${RAW_TAG}..HEAD" --count)
|
||||
|
||||
if [[ "$COMMIT_COUNT" -gt 0 ]]; then
|
||||
sub_version=".r${COMMIT_COUNT}.g${COMMIT_SHORT}"
|
||||
else
|
||||
sub_version=""
|
||||
fi
|
||||
|
||||
echo "BRANCH: $BRANCH"
|
||||
echo "BUILD_VERSION: $BUILD_VERSION"
|
||||
echo "SUB_VERSION: $sub_version"
|
||||
echo "COMMIT: $COMMIT"
|
||||
echo "CLONE_URL: $CLONE_URL"
|
||||
echo ""
|
||||
|
||||
# Generate PKGBUILD
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
BRANCH="$BRANCH" \
|
||||
BUILD_VERSION="$BUILD_VERSION" \
|
||||
CLONE_URL="$CLONE_URL" \
|
||||
COMMIT="$COMMIT" \
|
||||
cmake \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON \
|
||||
-DSUNSHINE_CONFIGURE_PKGBUILD=ON \
|
||||
-DSUNSHINE_SUB_VERSION="$sub_version" \
|
||||
-S "$REPO_DIR" \
|
||||
-B "$BUILD_DIR"
|
||||
|
||||
# Set up pkg directory
|
||||
mkdir -p "$PKG_DIR"
|
||||
cp "$BUILD_DIR/PKGBUILD" "$PKG_DIR/"
|
||||
cp "$BUILD_DIR/sunshine.install" "$PKG_DIR/"
|
||||
|
||||
# Generate .SRCINFO
|
||||
cd "$PKG_DIR"
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
# Build the package
|
||||
makepkg -s --noconfirm
|
||||
|
||||
echo ""
|
||||
echo "Package built in $PKG_DIR"
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
// standard includes
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <utility>
|
||||
|
||||
// lib includes
|
||||
@@ -68,11 +69,12 @@ namespace http {
|
||||
}
|
||||
|
||||
int save_user_creds(const std::string &file, const std::string &username, const std::string &password, bool run_our_mouth) {
|
||||
pt::ptree outputTree;
|
||||
nlohmann::json outputTree;
|
||||
|
||||
if (fs::exists(file)) {
|
||||
try {
|
||||
pt::read_json(file, outputTree);
|
||||
std::ifstream in(file);
|
||||
in >> outputTree;
|
||||
} catch (std::exception &e) {
|
||||
BOOST_LOG(error) << "Couldn't read user credentials: "sv << e.what();
|
||||
return -1;
|
||||
@@ -80,11 +82,12 @@ namespace http {
|
||||
}
|
||||
|
||||
auto salt = crypto::rand_alphabet(16);
|
||||
outputTree.put("username", username);
|
||||
outputTree.put("salt", salt);
|
||||
outputTree.put("password", util::hex(crypto::hash(password + salt)).to_string());
|
||||
outputTree["username"] = username;
|
||||
outputTree["salt"] = salt;
|
||||
outputTree["password"] = util::hex(crypto::hash(password + salt)).to_string();
|
||||
try {
|
||||
pt::write_json(file, outputTree);
|
||||
std::ofstream out(file);
|
||||
out << outputTree.dump(4); // Pretty-print with an indent of 4 spaces.
|
||||
} catch (std::exception &e) {
|
||||
BOOST_LOG(error) << "error writing to the credentials file, perhaps try this again as an administrator? Details: "sv << e.what();
|
||||
return -1;
|
||||
|
||||
@@ -2013,7 +2013,12 @@ namespace video {
|
||||
if (!requested_idr_frame || images->peek()) {
|
||||
if (auto img = images->pop(max_frametime)) {
|
||||
frame_timestamp = img->frame_timestamp;
|
||||
auto time_diff = *frame_timestamp - encode_frame_timestamp;
|
||||
if (!frame_timestamp) {
|
||||
frame_timestamp = std::chrono::steady_clock::now();
|
||||
}
|
||||
|
||||
auto current_timestamp = *frame_timestamp;
|
||||
auto time_diff = current_timestamp - encode_frame_timestamp;
|
||||
|
||||
// If new frame comes in way too fast, just drop
|
||||
if (time_diff < -frame_variation_threshold) {
|
||||
@@ -2028,7 +2033,7 @@ namespace video {
|
||||
if (time_diff < frame_variation_threshold) {
|
||||
*frame_timestamp = encode_frame_timestamp;
|
||||
} else {
|
||||
encode_frame_timestamp = *frame_timestamp;
|
||||
encode_frame_timestamp = current_timestamp;
|
||||
}
|
||||
|
||||
encode_frame_timestamp += encode_frame_threshold;
|
||||
|
||||
Reference in New Issue
Block a user