Skip to content

Commit

Permalink
[wip] av1 codec
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Oct 4, 2023
1 parent a9414dd commit d225b43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/app_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ typedef struct app_settings_t {
bool syskey_capture;
bool hdr;
bool hevc;
bool av1;

char *conf_dir;
char *ini_path;
Expand Down
6 changes: 6 additions & 0 deletions src/app/stream/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ void session_config_init(app_t *app, session_config_t *config, const SERVER_DATA
config->stream.supportedVideoFormats |= VIDEO_FORMAT_H265_MAIN10;
}
}
if (app_config->av1 && video_cap.codecs & SS4S_VIDEO_AV1) {
config->stream.supportedVideoFormats |= VIDEO_FORMAT_AV1_MAIN8;
if (app_config->hdr && video_cap.hdr) {
config->stream.supportedVideoFormats |= VIDEO_FORMAT_AV1_MAIN10;
}
}
config->stream.colorSpace = COLORSPACE_REC_709/* TODO: get from video capabilities */;
config->stream.colorRange = video_cap.fullColorRange ? COLOR_RANGE_FULL : COLOR_RANGE_LIMITED;
#if FEATURE_SURROUND_SOUND
Expand Down
4 changes: 4 additions & 0 deletions src/app/stream/video/session_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ int vdec_delegate_setup(int videoFormat, int width, int height, int redrawRate,
case VIDEO_FORMAT_H265_MAIN10:
info.codec = SS4S_VIDEO_H265;
break;
case VIDEO_FORMAT_AV1_MAIN8:
case VIDEO_FORMAT_AV1_MAIN10:
info.codec = SS4S_VIDEO_AV1;
break;
default: {
commons_log_error("Session", "Unsupported codec %s", vdec_stream_info.format);
return CALLBACKS_SESSION_ERROR_VDEC_UNSUPPORTED;
Expand Down
2 changes: 1 addition & 1 deletion third_party/ss4s

0 comments on commit d225b43

Please sign in to comment.