Browse Source

Add jackbridge_uuid_unparse

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
adb60204ea
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 23 additions and 1 deletions
  1. +4
    -0
      source/jackbridge/JackBridge.hpp
  2. +16
    -1
      source/jackbridge/JackBridge1.cpp
  3. +1
    -0
      source/jackbridge/JackBridge3.cpp
  4. +2
    -0
      source/jackbridge/JackBridgeExport.hpp

+ 4
- 0
source/jackbridge/JackBridge.hpp View File

@@ -95,6 +95,9 @@
#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode|JackBBTFrameOffset|JackAudioVideoRatio|JackVideoFrameOffset)
#define EXTENDED_TIME_INFO

#define JACK_UUID_SIZE 36
#define JACK_UUID_STRING_SIZE (JACK_UUID_SIZE+1) /* includes trailing null */

extern "C" {

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 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_deactivate(jack_client_t* client);


+ 16
- 1
source/jackbridge/JackBridge1.cpp View File

@@ -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_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_deactivate)(jack_client_t*);
@@ -195,6 +196,7 @@ struct JackBridge {
jacksym_get_client_name_by_uuid get_client_name_by_uuid_ptr;

jacksym_uuid_parse uuid_parse_ptr;
jacksym_uuid_unparse uuid_unparse_ptr;

jacksym_activate activate_ptr;
jacksym_deactivate deactivate_ptr;
@@ -311,6 +313,7 @@ struct JackBridge {
get_uuid_for_client_name_ptr(nullptr),
get_client_name_by_uuid_ptr(nullptr),
uuid_parse_ptr(nullptr),
uuid_unparse_ptr(nullptr),
activate_ptr(nullptr),
deactivate_ptr(nullptr),
is_realtime_ptr(nullptr),
@@ -435,6 +438,7 @@ struct JackBridge {
LIB_SYMBOL(get_client_name_by_uuid)

LIB_SYMBOL(uuid_parse)
LIB_SYMBOL(uuid_unparse)

LIB_SYMBOL(activate)
LIB_SYMBOL(deactivate)
@@ -934,6 +938,17 @@ bool jackbridge_uuid_parse(const char* buf, jack_uuid_t* uuid)
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)


+ 1
- 0
source/jackbridge/JackBridge3.cpp View File

@@ -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_client_name_by_uuid_ptr = jackbridge_get_client_name_by_uuid;
funcs.uuid_parse_ptr = jackbridge_uuid_parse;
funcs.uuid_unparse_ptr = jackbridge_uuid_unparse;
funcs.activate_ptr = jackbridge_activate;
funcs.deactivate_ptr = jackbridge_deactivate;
funcs.is_realtime_ptr = jackbridge_is_realtime;


+ 2
- 0
source/jackbridge/JackBridgeExport.hpp View File

@@ -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_client_name_by_uuid)(jack_client_t*, const char*);
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_deactivate)(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_client_name_by_uuid get_client_name_by_uuid_ptr;
jackbridgesym_uuid_parse uuid_parse_ptr;
jackbridgesym_uuid_unparse uuid_unparse_ptr;
jackbridgesym_activate activate_ptr;
jackbridgesym_deactivate deactivate_ptr;
jackbridgesym_is_realtime is_realtime_ptr;


Loading…
Cancel
Save