diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-10 14:32:32 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-10 14:32:32 +0100 |
commit | 93e3ed5a869afb79f9658f22ced4691ce475e8a1 (patch) | |
tree | baaec96daaf22857d61128401c12e2649ef25304 /ext/jack | |
parent | 692e00cc00d772fe2b01f518cb9ac88d124807d1 (diff) | |
parent | 2b2c0940f1b7ce8a858a26ad5e246fd645a83830 (diff) |
Merge branch 'master' into 0.11
Conflicts:
ext/cairo/gsttextoverlay.c
ext/pulse/pulseaudiosink.c
gst/audioparsers/gstaacparse.c
gst/avi/gstavimux.c
gst/flv/gstflvmux.c
gst/interleave/interleave.c
gst/isomp4/gstqtmux.c
gst/matroska/matroska-demux.c
gst/matroska/matroska-mux.c
gst/matroska/matroska-mux.h
gst/matroska/matroska-read-common.c
gst/multifile/gstmultifilesink.c
gst/multipart/multipartmux.c
gst/shapewipe/gstshapewipe.c
gst/smpte/gstsmpte.c
gst/udp/gstmultiudpsink.c
gst/videobox/gstvideobox.c
gst/videocrop/gstaspectratiocrop.c
gst/videomixer/videomixer.c
gst/videomixer/videomixer2.c
gst/wavparse/gstwavparse.c
po/ja.po
po/lv.po
po/sr.po
tests/check/Makefile.am
tests/check/elements/qtmux.c
tests/check/elements/rgvolume.c
Diffstat (limited to 'ext/jack')
-rw-r--r-- | ext/jack/gstjackaudioclient.c | 2 | ||||
-rw-r--r-- | ext/jack/gstjackaudiosink.c | 39 | ||||
-rw-r--r-- | ext/jack/gstjackaudiosink.h | 1 | ||||
-rw-r--r-- | ext/jack/gstjackaudiosrc.c | 39 | ||||
-rw-r--r-- | ext/jack/gstjackaudiosrc.h | 1 |
5 files changed, 76 insertions, 6 deletions
diff --git a/ext/jack/gstjackaudioclient.c b/ext/jack/gstjackaudioclient.c index 1789edb60..2bb355529 100644 --- a/ext/jack/gstjackaudioclient.c +++ b/ext/jack/gstjackaudioclient.c @@ -23,6 +23,8 @@ #include "gstjackaudioclient.h" +#include <gst/glib-compat-private.h> + GST_DEBUG_CATEGORY_STATIC (gst_jack_audio_client_debug); #define GST_CAT_DEFAULT gst_jack_audio_client_debug diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c index fe911840f..8055f9219 100644 --- a/ext/jack/gstjackaudiosink.c +++ b/ext/jack/gstjackaudiosink.c @@ -329,7 +329,11 @@ gst_jack_ring_buffer_open_device (GstAudioRingBuffer * buf) 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"; @@ -648,8 +652,9 @@ enum 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 { @@ -657,6 +662,7 @@ enum PROP_CONNECT, PROP_SERVER, PROP_CLIENT, + PROP_CLIENT_NAME, PROP_LAST }; @@ -705,6 +711,19 @@ gst_jack_audio_sink_class_init (GstJackAudioSinkClass * klass) "The Jack server to connect to (NULL = default)", DEFAULT_PROP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstJackAudioSink:client-name + * + * The client name to use. + * + * Since: 0.10.31 + */ + 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, @@ -738,6 +757,7 @@ gst_jack_audio_sink_init (GstJackAudioSink * sink) sink->jclient = NULL; sink->ports = NULL; sink->port_count = 0; + sink->client_name = g_strdup (DEFAULT_PROP_CLIENT_NAME); sink->buffers = NULL; } @@ -747,6 +767,12 @@ gst_jack_audio_sink_dispose (GObject * object) GstJackAudioSink *sink = GST_JACK_AUDIO_SINK (object); gst_caps_replace (&sink->caps, NULL); + + if (sink->client_name != NULL) { + g_free (sink->client_name); + sink->client_name = NULL; + } + G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -759,6 +785,10 @@ gst_jack_audio_sink_set_property (GObject * object, guint prop_id, 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; @@ -787,6 +817,9 @@ gst_jack_audio_sink_get_property (GObject * object, guint prop_id, 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; diff --git a/ext/jack/gstjackaudiosink.h b/ext/jack/gstjackaudiosink.h index 02a8db9fc..0dbc142e0 100644 --- a/ext/jack/gstjackaudiosink.h +++ b/ext/jack/gstjackaudiosink.h @@ -58,6 +58,7 @@ struct _GstJackAudioSink { GstJackConnect connect; gchar *server; jack_client_t *jclient; + gchar *client_name; /* our client */ GstJackAudioClient *client; diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c index 4973a8b77..cf21cbfc1 100644 --- a/ext/jack/gstjackaudiosrc.c +++ b/ext/jack/gstjackaudiosrc.c @@ -336,7 +336,11 @@ gst_jack_ring_buffer_open_device (GstAudioRingBuffer * buf) 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"; @@ -651,8 +655,9 @@ enum 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 { @@ -660,6 +665,7 @@ enum PROP_CONNECT, PROP_SERVER, PROP_CLIENT, + PROP_CLIENT_NAME, PROP_LAST }; @@ -726,6 +732,19 @@ gst_jack_audio_src_class_init (GstJackAudioSrcClass * klass) "The Jack server to connect to (NULL = default)", DEFAULT_PROP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstJackAudioSrc:client-name + * + * The client name to use. + * + * Since: 0.10.31 + */ + 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, @@ -765,6 +784,7 @@ gst_jack_audio_src_init (GstJackAudioSrc * src) src->ports = NULL; src->port_count = 0; src->buffers = NULL; + src->client_name = g_strdup (DEFAULT_PROP_CLIENT_NAME); } static void @@ -773,6 +793,12 @@ gst_jack_audio_src_dispose (GObject * object) GstJackAudioSrc *src = GST_JACK_AUDIO_SRC (object); gst_caps_replace (&src->caps, NULL); + + if (src->client_name != NULL) { + g_free (src->client_name); + src->client_name = NULL; + } + G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -783,6 +809,10 @@ gst_jack_audio_src_set_property (GObject * object, guint prop_id, 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; @@ -809,6 +839,9 @@ gst_jack_audio_src_get_property (GObject * object, guint prop_id, 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; diff --git a/ext/jack/gstjackaudiosrc.h b/ext/jack/gstjackaudiosrc.h index fa119472c..1401d9b0d 100644 --- a/ext/jack/gstjackaudiosrc.h +++ b/ext/jack/gstjackaudiosrc.h @@ -75,6 +75,7 @@ struct _GstJackAudioSrc GstJackConnect connect; gchar *server; jack_client_t *jclient; + gchar *client_name; /* our client */ GstJackAudioClient *client; |