static void *qtwebkit_create(obs_data_t *settings, obs_source_t *source) { UNUSED_PARAMETER(settings); QtWebkitSource *ws = new QtWebkitSource(source); ws->UpdateSettings(settings); ws->reload_key = obs_hotkey_register_source(source, "qtwebkit.reload", obs_module_text("Reload"), reload_hotkey_pressed, ws); return ws; }
void *obstudio_infowriter_create(obs_data_t *settings, obs_source_t *source) { InfoWriter *Writer = new InfoWriter(); UNUSED_PARAMETER(settings); obs_hotkey_register_source(source, "InfoWriter", "Write timestamp to file", obstudio_infowriter_write_hotkey, Writer); obs_frontend_add_event_callback(obsstudio_infowriter_frontend_event_callback, Writer); return Writer; }
static void *ffmpeg_source_create(obs_data_t *settings, obs_source_t *source) { UNUSED_PARAMETER(settings); struct ffmpeg_source *s = bzalloc(sizeof(struct ffmpeg_source)); s->source = source; s->hotkey = obs_hotkey_register_source(source, "MediaSource.Restart", obs_module_text("RestartMedia"), restart_hotkey, s); proc_handler_t *ph = obs_source_get_proc_handler(source); proc_handler_add(ph, "void restart()", restart_proc, s); proc_handler_add(ph, "void get_duration(out int duration)", get_duration, s); proc_handler_add(ph, "void get_nb_frames(out int num_frames)", get_nb_frames, s); ffmpeg_source_update(s, settings); return s; }