@@ -95,6 +95,9 @@ | |||||
#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode|JackBBTFrameOffset|JackAudioVideoRatio|JackVideoFrameOffset) | #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode|JackBBTFrameOffset|JackAudioVideoRatio|JackVideoFrameOffset) | ||||
#define EXTENDED_TIME_INFO | #define EXTENDED_TIME_INFO | ||||
#define JACK_UUID_SIZE 36 | |||||
#define JACK_UUID_STRING_SIZE (JACK_UUID_SIZE+1) /* includes trailing null */ | |||||
extern "C" { | extern "C" { | ||||
enum JackOptions { | enum JackOptions { | ||||
@@ -299,6 +302,7 @@ JACKBRIDGE_API char* jackbridge_get_uuid_for_client_name(jack_client_t* client, | |||||
JACKBRIDGE_API char* jackbridge_get_client_name_by_uuid(jack_client_t* client, const char* uuid); | JACKBRIDGE_API char* jackbridge_get_client_name_by_uuid(jack_client_t* client, const char* uuid); | ||||
JACKBRIDGE_API bool jackbridge_uuid_parse(const char* buf, jack_uuid_t* uuid); | JACKBRIDGE_API bool jackbridge_uuid_parse(const char* buf, jack_uuid_t* uuid); | ||||
JACKBRIDGE_API void jackbridge_uuid_unparse(jack_uuid_t uuid, char buf[JACK_UUID_STRING_SIZE]); | |||||
JACKBRIDGE_API bool jackbridge_activate(jack_client_t* client); | JACKBRIDGE_API bool jackbridge_activate(jack_client_t* client); | ||||
JACKBRIDGE_API bool jackbridge_deactivate(jack_client_t* client); | JACKBRIDGE_API bool jackbridge_deactivate(jack_client_t* client); | ||||
@@ -68,7 +68,8 @@ typedef char* (JACKSYM_API *jacksym_client_get_uuid)(jack_client_t*); | |||||
typedef char* (JACKSYM_API *jacksym_get_uuid_for_client_name)(jack_client_t*, const char*); | typedef char* (JACKSYM_API *jacksym_get_uuid_for_client_name)(jack_client_t*, const char*); | ||||
typedef char* (JACKSYM_API *jacksym_get_client_name_by_uuid)(jack_client_t*, const char*); | typedef char* (JACKSYM_API *jacksym_get_client_name_by_uuid)(jack_client_t*, const char*); | ||||
typedef int (JACKBRIDGE_API *jacksym_uuid_parse)(const char*, jack_uuid_t*); | |||||
typedef int (JACKBRIDGE_API *jacksym_uuid_parse)(const char*, jack_uuid_t*); | |||||
typedef void (JACKBRIDGE_API *jacksym_uuid_unparse)(jack_uuid_t, char buf[JACK_UUID_STRING_SIZE]); | |||||
typedef int (JACKSYM_API *jacksym_activate)(jack_client_t*); | typedef int (JACKSYM_API *jacksym_activate)(jack_client_t*); | ||||
typedef int (JACKSYM_API *jacksym_deactivate)(jack_client_t*); | typedef int (JACKSYM_API *jacksym_deactivate)(jack_client_t*); | ||||
@@ -195,6 +196,7 @@ struct JackBridge { | |||||
jacksym_get_client_name_by_uuid get_client_name_by_uuid_ptr; | jacksym_get_client_name_by_uuid get_client_name_by_uuid_ptr; | ||||
jacksym_uuid_parse uuid_parse_ptr; | jacksym_uuid_parse uuid_parse_ptr; | ||||
jacksym_uuid_unparse uuid_unparse_ptr; | |||||
jacksym_activate activate_ptr; | jacksym_activate activate_ptr; | ||||
jacksym_deactivate deactivate_ptr; | jacksym_deactivate deactivate_ptr; | ||||
@@ -311,6 +313,7 @@ struct JackBridge { | |||||
get_uuid_for_client_name_ptr(nullptr), | get_uuid_for_client_name_ptr(nullptr), | ||||
get_client_name_by_uuid_ptr(nullptr), | get_client_name_by_uuid_ptr(nullptr), | ||||
uuid_parse_ptr(nullptr), | uuid_parse_ptr(nullptr), | ||||
uuid_unparse_ptr(nullptr), | |||||
activate_ptr(nullptr), | activate_ptr(nullptr), | ||||
deactivate_ptr(nullptr), | deactivate_ptr(nullptr), | ||||
is_realtime_ptr(nullptr), | is_realtime_ptr(nullptr), | ||||
@@ -435,6 +438,7 @@ struct JackBridge { | |||||
LIB_SYMBOL(get_client_name_by_uuid) | LIB_SYMBOL(get_client_name_by_uuid) | ||||
LIB_SYMBOL(uuid_parse) | LIB_SYMBOL(uuid_parse) | ||||
LIB_SYMBOL(uuid_unparse) | |||||
LIB_SYMBOL(activate) | LIB_SYMBOL(activate) | ||||
LIB_SYMBOL(deactivate) | LIB_SYMBOL(deactivate) | ||||
@@ -934,6 +938,17 @@ bool jackbridge_uuid_parse(const char* buf, jack_uuid_t* uuid) | |||||
return false; | return false; | ||||
} | } | ||||
void jackbridge_uuid_unparse(jack_uuid_t uuid, char buf[JACK_UUID_STRING_SIZE]) | |||||
{ | |||||
#if defined(JACKBRIDGE_DUMMY) | |||||
#elif defined(JACKBRIDGE_DIRECT) | |||||
jack_uuid_unparse(uuid, buf); | |||||
#else | |||||
if (const jacksym_uuid_unparse func = getBridgeInstance().uuid_unparse_ptr) | |||||
return func(uuid, buf); | |||||
#endif | |||||
} | |||||
// ----------------------------------------------------------------------------- | // ----------------------------------------------------------------------------- | ||||
bool jackbridge_activate(jack_client_t* client) | bool jackbridge_activate(jack_client_t* client) | ||||
@@ -48,6 +48,7 @@ const JackBridgeExportedFunctions* JACKBRIDGE_API jackbridge_get_exported_functi | |||||
funcs.get_uuid_for_client_name_ptr = jackbridge_get_uuid_for_client_name; | funcs.get_uuid_for_client_name_ptr = jackbridge_get_uuid_for_client_name; | ||||
funcs.get_client_name_by_uuid_ptr = jackbridge_get_client_name_by_uuid; | funcs.get_client_name_by_uuid_ptr = jackbridge_get_client_name_by_uuid; | ||||
funcs.uuid_parse_ptr = jackbridge_uuid_parse; | funcs.uuid_parse_ptr = jackbridge_uuid_parse; | ||||
funcs.uuid_unparse_ptr = jackbridge_uuid_unparse; | |||||
funcs.activate_ptr = jackbridge_activate; | funcs.activate_ptr = jackbridge_activate; | ||||
funcs.deactivate_ptr = jackbridge_deactivate; | funcs.deactivate_ptr = jackbridge_deactivate; | ||||
funcs.is_realtime_ptr = jackbridge_is_realtime; | funcs.is_realtime_ptr = jackbridge_is_realtime; | ||||
@@ -31,6 +31,7 @@ typedef char* (JACKBRIDGE_API *jackbridgesym_client_get_uuid)(jack_client_t*); | |||||
typedef char* (JACKBRIDGE_API *jackbridgesym_get_uuid_for_client_name)(jack_client_t*, const char*); | typedef char* (JACKBRIDGE_API *jackbridgesym_get_uuid_for_client_name)(jack_client_t*, const char*); | ||||
typedef char* (JACKBRIDGE_API *jackbridgesym_get_client_name_by_uuid)(jack_client_t*, const char*); | typedef char* (JACKBRIDGE_API *jackbridgesym_get_client_name_by_uuid)(jack_client_t*, const char*); | ||||
typedef bool (JACKBRIDGE_API *jackbridgesym_uuid_parse)(const char*, jack_uuid_t*); | typedef bool (JACKBRIDGE_API *jackbridgesym_uuid_parse)(const char*, jack_uuid_t*); | ||||
typedef void (JACKBRIDGE_API *jackbridgesym_uuid_unparse)(jack_uuid_t, char buf[JACK_UUID_STRING_SIZE]); | |||||
typedef bool (JACKBRIDGE_API *jackbridgesym_activate)(jack_client_t*); | typedef bool (JACKBRIDGE_API *jackbridgesym_activate)(jack_client_t*); | ||||
typedef bool (JACKBRIDGE_API *jackbridgesym_deactivate)(jack_client_t*); | typedef bool (JACKBRIDGE_API *jackbridgesym_deactivate)(jack_client_t*); | ||||
typedef bool (JACKBRIDGE_API *jackbridgesym_is_realtime)(jack_client_t*); | typedef bool (JACKBRIDGE_API *jackbridgesym_is_realtime)(jack_client_t*); | ||||
@@ -139,6 +140,7 @@ struct _JackBridgeExportedFunctions { | |||||
jackbridgesym_get_uuid_for_client_name get_uuid_for_client_name_ptr; | jackbridgesym_get_uuid_for_client_name get_uuid_for_client_name_ptr; | ||||
jackbridgesym_get_client_name_by_uuid get_client_name_by_uuid_ptr; | jackbridgesym_get_client_name_by_uuid get_client_name_by_uuid_ptr; | ||||
jackbridgesym_uuid_parse uuid_parse_ptr; | jackbridgesym_uuid_parse uuid_parse_ptr; | ||||
jackbridgesym_uuid_unparse uuid_unparse_ptr; | |||||
jackbridgesym_activate activate_ptr; | jackbridgesym_activate activate_ptr; | ||||
jackbridgesym_deactivate deactivate_ptr; | jackbridgesym_deactivate deactivate_ptr; | ||||
jackbridgesym_is_realtime is_realtime_ptr; | jackbridgesym_is_realtime is_realtime_ptr; | ||||