GST_DEBUG_OBJECT (sink, "open");
- name = g_get_application_name ();
+ if (sink->client_name) {
+ name = sink->client_name;
+ } else {
+ name = g_get_application_name ();
+ }
if (!name)
name = "GStreamer";
SIGNAL_LAST
};
-#define DEFAULT_PROP_CONNECT GST_JACK_CONNECT_AUTO
-#define DEFAULT_PROP_SERVER NULL
+#define DEFAULT_PROP_CONNECT GST_JACK_CONNECT_AUTO
+#define DEFAULT_PROP_SERVER NULL
+#define DEFAULT_PROP_CLIENT_NAME NULL
enum
{
PROP_CONNECT,
PROP_SERVER,
PROP_CLIENT,
+ PROP_CLIENT_NAME,
PROP_LAST
};
"The Jack server to connect to (NULL = default)",
DEFAULT_PROP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class, PROP_CLIENT_NAME,
+ g_param_spec_string ("client-name", "Client name",
+ "The client name of the Jack instance (NULL = default)",
+ DEFAULT_PROP_CLIENT_NAME,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (gobject_class, PROP_CLIENT,
g_param_spec_boxed ("client", "JackClient", "Handle for jack client",
GST_TYPE_JACK_CLIENT,
sink->jclient = NULL;
sink->ports = NULL;
sink->port_count = 0;
+ sink->client_name = g_strdup (DEFAULT_PROP_CLIENT_NAME);
sink->buffers = NULL;
}
sink = GST_JACK_AUDIO_SINK (object);
switch (prop_id) {
+ case PROP_CLIENT_NAME:
+ g_free (sink->client_name);
+ sink->client_name = g_value_dup_string (value);
+ break;
case PROP_CONNECT:
sink->connect = g_value_get_enum (value);
break;
sink = GST_JACK_AUDIO_SINK (object);
switch (prop_id) {
+ case PROP_CLIENT_NAME:
+ g_value_set_string (value, sink->client_name);
+ break;
case PROP_CONNECT:
g_value_set_enum (value, sink->connect);
break;
GST_DEBUG_OBJECT (src, "open");
- name = g_get_application_name ();
+ if (src->client_name) {
+ name = src->client_name;
+ } else {
+ name = g_get_application_name ();
+ }
if (!name)
name = "GStreamer";
LAST_SIGNAL
};
-#define DEFAULT_PROP_CONNECT GST_JACK_CONNECT_AUTO
-#define DEFAULT_PROP_SERVER NULL
+#define DEFAULT_PROP_CONNECT GST_JACK_CONNECT_AUTO
+#define DEFAULT_PROP_SERVER NULL
+#define DEFAULT_PROP_CLIENT_NAME NULL
enum
{
PROP_CONNECT,
PROP_SERVER,
PROP_CLIENT,
+ PROP_CLIENT_NAME,
PROP_LAST
};
"The Jack server to connect to (NULL = default)",
DEFAULT_PROP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class, PROP_CLIENT_NAME,
+ g_param_spec_string ("client-name", "Client name",
+ "The client name of the Jack instance (NULL = default)",
+ DEFAULT_PROP_CLIENT_NAME,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (gobject_class, PROP_CLIENT,
g_param_spec_boxed ("client", "JackClient", "Handle for jack client",
GST_TYPE_JACK_CLIENT,
src->ports = NULL;
src->port_count = 0;
src->buffers = NULL;
+ src->client_name = g_strdup (DEFAULT_PROP_CLIENT_NAME);
}
static void
GstJackAudioSrc *src = GST_JACK_AUDIO_SRC (object);
switch (prop_id) {
+ case PROP_CLIENT_NAME:
+ g_free (src->client_name);
+ src->client_name = g_value_dup_string (value);
+ break;
case PROP_CONNECT:
src->connect = g_value_get_enum (value);
break;
GstJackAudioSrc *src = GST_JACK_AUDIO_SRC (object);
switch (prop_id) {
+ case PROP_CLIENT_NAME:
+ g_value_set_string (value, src->client_name);
+ break;
case PROP_CONNECT:
g_value_set_enum (value, src->connect);
break;