Skip to content

Commit

Permalink
properly sets serverCodecModeSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Jul 26, 2023
1 parent c7119f9 commit 3a009f9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/app/stream/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ session_t *session_create(app_t *app, const CONFIGURATION *config, const SERVER_
session->display_height = app->ui.height;
session->video_cap = app->ss4s.video_cap;
session->server = serverdata_clone(server);
// The flags seem to be the same to supportedVideoFormats, use it for now...
session->server->serverInfo.serverCodecModeSupport = 0;
if (session->config.stream.supportedVideoFormats & VIDEO_FORMAT_H264) {
session->server->serverInfo.serverCodecModeSupport |= SCM_H264;
}
if (session->config.stream.supportedVideoFormats & VIDEO_FORMAT_H265) {
session->server->serverInfo.serverCodecModeSupport |= SCM_HEVC;
if (session->config.stream.supportedVideoFormats & VIDEO_FORMAT_H265_MAIN10) {
session->server->serverInfo.serverCodecModeSupport |= SCM_HEVC_MAIN10;
}
}
if (session->config.stream.supportedVideoFormats & VIDEO_FORMAT_AV1_MAIN8) {
session->server->serverInfo.serverCodecModeSupport |= SCM_AV1_MAIN8;
}
if (session->config.stream.supportedVideoFormats & VIDEO_FORMAT_AV1_MAIN10) {
session->server->serverInfo.serverCodecModeSupport |= SCM_AV1_MAIN10;
}
session->app_id = app_id;
session->mutex = SDL_CreateMutex();
session->state_lock = SDL_CreateMutex();
Expand Down

0 comments on commit 3a009f9

Please sign in to comment.