Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Surround Sound Params #411

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/libgamestream/libgamestream/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void gs_set_timeout(GS_CLIENT hnd, int timeout_secs);
int gs_get_status(GS_CLIENT hnd, PSERVER_DATA server, const char *address, uint16_t port, bool unsupported);

int gs_start_app(GS_CLIENT hnd, PSERVER_DATA server, PSTREAM_CONFIGURATION config, int appId, bool is_gfe, bool sops,
bool localaudio, int gamepad_mask);
bool localaudio, int gamepad_mask, const char *surround_params);

int gs_applist(GS_CLIENT hnd, const SERVER_DATA *server, PAPP_LIST *app_list);

Expand Down
5 changes: 4 additions & 1 deletion core/libgamestream/src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ int gs_applist(GS_CLIENT hnd, const SERVER_DATA *server, PAPP_LIST *list) {
}

int gs_start_app(GS_CLIENT hnd, PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, bool is_gfe, bool sops,
bool localaudio, int gamepad_mask) {
bool localaudio, int gamepad_mask, const char* surround_params) {
int ret = GS_OK;
char *result = NULL;
HTTP_DATA *data = NULL;
Expand Down Expand Up @@ -553,6 +553,9 @@ int gs_start_app(GS_CLIENT hnd, PSERVER_DATA server, STREAM_CONFIGURATION *confi
append_param(url, sizeof(url), "rikey", "%s", rikey_hex);
append_param(url, sizeof(url), "rikeyid", "%d", rikeyid);
append_param(url, sizeof(url), "surroundAudioInfo", "%d", surround_info);
if (surround_params) {
append_param(url, sizeof(url), "surroundParams", surround_params);
}
if (!resume || !is_gfe) {
if (config->supportedVideoFormats & VIDEO_FORMAT_MASK_10BIT) {
append_param(url, sizeof(url), "hdrMode", "1");
Expand Down
9 changes: 8 additions & 1 deletion src/app/stream/session_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ int session_worker(session_t *session) {
commons_log_info("Session", "Launch app %d...", appId);
GS_CLIENT client = app_gs_client_new(app);
gs_set_timeout(client, 30);
const char *surround_params = NULL;
#if TARGET_WEBOS
if (session->config.stream.audioConfiguration == AUDIO_CONFIGURATION_51_SURROUND) {
// 6 channels, 4 streams, 2 coupled streams, FL, FR, SL, SR, FC, LFE
surround_params = "642014523";
}
#endif
int ret = gs_start_app(client, server, &session->config.stream, appId, server->isGfe, session->config.sops,
session->config.local_audio, app_input_gamepads_mask(&app->input));
session->config.local_audio, app_input_gamepads_mask(&app->input), surround_params);
if (ret != GS_OK) {
session_set_state(session, STREAMING_ERROR);
const char *gs_error = NULL;
Expand Down
2 changes: 1 addition & 1 deletion third_party/ss4s