mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 09:39:15 +00:00
image-source: Add JXR HDR support to slide show
Only supported on Windows.
This commit is contained in:
parent
e8dc70d0ee
commit
e583e86b35
|
@ -241,7 +241,11 @@ static bool valid_extension(const char *ext)
|
|||
return false;
|
||||
return astrcmpi(ext, ".bmp") == 0 || astrcmpi(ext, ".tga") == 0 ||
|
||||
astrcmpi(ext, ".png") == 0 || astrcmpi(ext, ".jpeg") == 0 ||
|
||||
astrcmpi(ext, ".jpg") == 0 || astrcmpi(ext, ".gif") == 0;
|
||||
astrcmpi(ext, ".jpg") == 0 ||
|
||||
#ifdef _WIN32
|
||||
astrcmpi(ext, ".jxr") == 0 ||
|
||||
#endif
|
||||
astrcmpi(ext, ".gif") == 0;
|
||||
}
|
||||
|
||||
static inline bool item_valid(struct slideshow *ss)
|
||||
|
@ -845,8 +849,11 @@ static void ss_defaults(obs_data_t *settings)
|
|||
obs_data_set_default_bool(settings, S_LOOP, true);
|
||||
}
|
||||
|
||||
static const char *file_filter =
|
||||
"Image files (*.bmp *.tga *.png *.jpeg *.jpg *.gif *.webp)";
|
||||
static const char *file_filter = "Image files (*.bmp *.tga *.png *.jpeg *.jpg"
|
||||
#ifdef _WIN32
|
||||
" *.jxr"
|
||||
#endif
|
||||
" *.gif *.webp)";
|
||||
|
||||
static const char *aspects[] = {"16:9", "16:10", "4:3", "1:1"};
|
||||
|
||||
|
@ -1026,6 +1033,23 @@ static obs_missing_files_t *ss_missingfiles(void *data)
|
|||
return missing_files;
|
||||
}
|
||||
|
||||
static enum gs_color_space
|
||||
ss_video_get_color_space(void *data, size_t count,
|
||||
const enum gs_color_space *preferred_spaces)
|
||||
{
|
||||
enum gs_color_space space = GS_CS_SRGB;
|
||||
|
||||
struct slideshow *ss = data;
|
||||
obs_source_t *transition = get_transition(ss);
|
||||
if (transition) {
|
||||
space = obs_source_get_color_space(transition, count,
|
||||
preferred_spaces);
|
||||
obs_source_release(transition);
|
||||
}
|
||||
|
||||
return space;
|
||||
}
|
||||
|
||||
struct obs_source_info slideshow_info = {
|
||||
.id = "slideshow",
|
||||
.type = OBS_SOURCE_TYPE_INPUT,
|
||||
|
@ -1053,4 +1077,5 @@ struct obs_source_info slideshow_info = {
|
|||
.media_next = ss_next_slide,
|
||||
.media_previous = ss_previous_slide,
|
||||
.media_get_state = ss_get_state,
|
||||
.video_get_color_space = ss_video_get_color_space,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue