Skip to content

Developer Guide

CodeYan01 edited this page Jul 11, 2023 · 2 revisions

Building from source

git checkout this repo, or download it as zip and extract. Then you can run the Build-Windows.ps1, build-macos.zsh, build-linux.zsh, or build-linux.sh scripts

Interacting with the source

To find out the keys used in the source settings, use obs_data_get_json to view it, or check the scene collection json. You could also check src/media-playlist-source.c

To select a file programmatically:

proc_handler_t *ph = obs_source_get_proc_handler(source);
struct calldata cd = {0};
calldata_set_int(&cd, "media_index", 3); // 4th file
calldata_set_int(&cd, "folder_item_index", 3) // 4th folder item of the 4th file
proc_handler_call(ph, "select_index", &cd);
calldata_free(&cd);

media_index - the 0-based index of the file in the playlist

folder_item_index - the 0-based index of the folder item in the folder at media_index

If the file at media_index is not a folder, the second parameter is ignored. If media_index is higher than the playlist item count, it will be set to 0. If folder_item_index is higher than the folder item count or media_index, it will be set to 0.

Clone this wiki locally