libobs: Add obs_source_duplicate function

Allows full duplication of sources (with exception of sources that are
marked with the OBS_SOURCE_DO_NOT_DUPLICATE output capability flag)
This commit is contained in:
jp9000
2016-01-12 16:30:15 -08:00
parent cd97ce2a17
commit 9661ba8142
2 changed files with 67 additions and 0 deletions

View File

@@ -650,6 +650,11 @@ EXPORT obs_source_t *obs_source_create(const char *id, const char *name,
EXPORT obs_source_t *obs_source_create_private(const char *id,
const char *name, obs_data_t *settings);
/* if source has OBS_SOURCE_DO_NOT_DUPLICATE output flag set, only returns a
* reference */
EXPORT obs_source_t *obs_source_duplicate(obs_source_t *source,
const char *desired_name, bool create_private);
/**
* Adds/releases a reference to a source. When the last reference is
* released, the source is destroyed.