Browse Source

Import metadata keys from jackey, cleanup and reorder definitions

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.9.13
falkTX 6 years ago
parent
commit
99fe1cb8f7
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 90 additions and 15 deletions
  1. +12
    -6
      common/JackLibAPI.cpp
  2. +78
    -9
      common/jack/metadata.h

+ 12
- 6
common/JackLibAPI.cpp View File

@@ -48,12 +48,18 @@ extern "C"
LIB_EXPORT int jack_get_client_pid (const char *name);

// Metadata API
LIB_EXPORT const char* JACK_METADATA_PRETTY_NAME = "http://jackaudio.org/metadata/pretty-name";
LIB_EXPORT const char* JACK_METADATA_HARDWARE = "http://jackaudio.org/metadata/hardware";
LIB_EXPORT const char* JACK_METADATA_CONNECTED = "http://jackaudio.org/metadata/connected";
LIB_EXPORT const char* JACK_METADATA_PORT_GROUP = "http://jackaudio.org/metadata/port-group";
LIB_EXPORT const char* JACK_METADATA_ICON_SMALL = "http://jackaudio.org/metadata/icon-small";
LIB_EXPORT const char* JACK_METADATA_ICON_LARGE = "http://jackaudio.org/metadata/icon-large";
#define JACK_METADATA_PREFIX "http://jackaudio.org/metadata/"
LIB_EXPORT const char* JACK_METADATA_CONNECTED = JACK_METADATA_PREFIX "connected";
LIB_EXPORT const char* JACK_METADATA_EVENT_TYPES = JACK_METADATA_PREFIX "event-types";
LIB_EXPORT const char* JACK_METADATA_HARDWARE = JACK_METADATA_PREFIX "hardware";
LIB_EXPORT const char* JACK_METADATA_ICON_LARGE = JACK_METADATA_PREFIX "icon-large";
LIB_EXPORT const char* JACK_METADATA_ICON_NAME = JACK_METADATA_PREFIX "icon-name";
LIB_EXPORT const char* JACK_METADATA_ICON_SMALL = JACK_METADATA_PREFIX "icon-small";
LIB_EXPORT const char* JACK_METADATA_ORDER = JACK_METADATA_PREFIX "order";
LIB_EXPORT const char* JACK_METADATA_PORT_GROUP = JACK_METADATA_PREFIX "port-group";
LIB_EXPORT const char* JACK_METADATA_PRETTY_NAME = JACK_METADATA_PREFIX "pretty-name";
LIB_EXPORT const char* JACK_METADATA_SIGNAL_TYPE = JACK_METADATA_PREFIX "signal-type";
#undef JACK_METADATA_PREFIX

LIB_EXPORT int jack_set_property(jack_client_t*, jack_uuid_t subject, const char* key, const char* value, const char* type);
LIB_EXPORT int jack_get_property(jack_uuid_t subject, const char* key, char** value, char** type);


+ 78
- 9
common/jack/metadata.h View File

@@ -1,5 +1,5 @@
/*
Copyright (C) 2011 David Robillard
Copyright (C) 2011-2014 David Robillard
Copyright (C) 2013 Paul Davis

This program is free software; you can redistribute it and/or modify it
@@ -204,19 +204,88 @@ int jack_set_property_change_callback (jack_client_t* client,
JackPropertyChangeCallback callback,
void* arg);

#ifdef __cplusplus
} /* namespace */
#endif
/**
* ...
*/
extern const char* JACK_METADATA_CONNECTED;

/**
* @}
* The supported event types of an event port.
*
* This is a kludge around Jack only supporting MIDI, particularly for OSC.
* This property is a comma-separated list of event types, currently "MIDI" or
* "OSC". If this contains "OSC", the port may carry OSC bundles (first byte
* '#') or OSC messages (first byte '/'). Note that the "status byte" of both
* OSC events is not a valid MIDI status byte, so MIDI clients that check the
* status byte will gracefully ignore OSC messages if the user makes an
* inappropriate connection.
*/
extern const char* JACK_METADATA_EVENT_TYPES;

extern const char* JACK_METADATA_PRETTY_NAME;
/**
* ...
*/
extern const char* JACK_METADATA_HARDWARE;
extern const char* JACK_METADATA_CONNECTED;
extern const char* JACK_METADATA_PORT_GROUP;
extern const char* JACK_METADATA_ICON_SMALL;

/**
* ...
*/
extern const char* JACK_METADATA_ICON_LARGE;

/**
* The name of the icon for the subject (typically client).
*
* This is used for looking up icons on the system, possibly with many sizes or
* themes. Icons should be searched for according to the freedesktop Icon
*
* Theme Specification:
* http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
*/
extern const char* JACK_METADATA_ICON_NAME;

/**
* ...
*/
extern const char* JACK_METADATA_ICON_SMALL;

/**
* Order for a port.
*
* This is used to specify the best order to show ports in user interfaces.
* The value MUST be an integer. There are no other requirements, so there may
* be gaps in the orders for several ports. Applications should compare the
* orders of ports to determine their relative order, but must not assign any
* other relevance to order values.
*/
extern const char* JACK_METADATA_ORDER;

/**
* ...
*/
extern const char* JACK_METADATA_PRETTY_NAME;

/**
* ...
*/
extern const char* JACK_METADATA_PORT_GROUP;

/**
* The type of an audio signal.
*
* This property allows audio ports to be tagged with a "meaning". The value
* is a simple string. Currently, the only type is "CV", for "control voltage"
* ports. Hosts SHOULD be take care to not treat CV ports as audibile and send
* their output directly to speakers. In particular, CV ports are not
* necessarily periodic at all and may have very high DC.
*/
extern const char* JACK_METADATA_SIGNAL_TYPE;

/**
* @}
*/

#ifdef __cplusplus
} /* namespace */
#endif

#endif /* __jack_metadata_h__ */

Loading…
Cancel
Save