Split output/input audio capture sources

- Split input and output audio captures so that they're different
   sources.  This allows easier handling and enumeration of audio
   devices without having to do some sort of string processing.

   This way the user interface code can handle this a bit more easily,
   and so that it doesn't confuse users either.  This should be done for
   all audio capture sources for all operating systems.  You don't have
   to duplicate any code, you just need to create input/output wrapper
   functions to designate the audio as input or output before creation.

 - Make it detect soundflower and wavtap devices as mac "output" devices
   (even though they're actually input) for the mac output capture, and
   make it so that users can select a default output capture and
   automatically use soundflower or wavtap.

   I'm not entirely happy about having to do this, but because mac is
   designed this way, this is really the only way to handle it that
   makes it easier for users and UI code to deal with.

   Note that soundflower and wavtap are still also designated as input
   devices, so will still show up in input device enumeration.

 - Remove pragma messages because they were kind polluting the other
   compiler messages and just getting in the way.  In the future we can
   just do a grep for TODO to find them.

 - Redo list property again, this time using a safer internal array,
   rather than requiring sketchy array inputs.  Having functions handle
   everything behind the scenes is much safer.

 - Remove the reference counter debug log code, as it was included
   unintentionally in a commit.
This commit is contained in:
jp9000
2014-03-03 02:56:54 -07:00
parent b4ef6cee91
commit 9c6da6f52d
15 changed files with 374 additions and 124 deletions

View File

@@ -71,16 +71,14 @@ EXPORT void obs_properties_add_text(obs_properties_t props, const char *name,
const char *description);
EXPORT void obs_properties_add_path(obs_properties_t props, const char *name,
const char *description);
EXPORT void obs_properties_add_list(obs_properties_t props,
EXPORT obs_property_t obs_properties_add_list(obs_properties_t props,
const char *name, const char *description,
const char **value_names, const char **values,
enum obs_combo_type type,
enum obs_combo_format format);
enum obs_combo_type type, enum obs_combo_format format);
EXPORT void obs_properties_add_color(obs_properties_t props, const char *name,
const char *description);
EXPORT bool obs_properties_next(obs_properties_t *props);
EXPORT obs_property_t obs_properties_first_property(obs_properties_t props);
EXPORT void obs_property_list_add_item(obs_property_t p,
const char *name, const char *value);
/* ------------------------------------------------------------------------- */
@@ -96,11 +94,13 @@ EXPORT int obs_property_int_step(obs_property_t p);
EXPORT double obs_property_float_min(obs_property_t p);
EXPORT double obs_property_float_max(obs_property_t p);
EXPORT double obs_property_float_step(obs_property_t p);
EXPORT const char ** obs_property_list_names(obs_property_t p);
EXPORT const char ** obs_property_list_values(obs_property_t p);
EXPORT enum obs_combo_type obs_property_list_type(obs_property_t p);
EXPORT enum obs_combo_format obs_property_list_format(obs_property_t p);
EXPORT size_t obs_property_list_item_count(obs_property_t p);
EXPORT const char *obs_property_list_item_name(obs_property_t p, size_t idx);
EXPORT const char *obs_property_list_item_value(obs_property_t p, size_t idx);
#ifdef __cplusplus
}
#endif