mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
add device property
Original commit message from CVS: add device property
This commit is contained in:
parent
c1b14f407b
commit
33f1e1633f
7 changed files with 134 additions and 13 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* docs/libs/tmpl/gstcolorbalance.sgml:
|
||||||
|
* docs/libs/tmpl/gstmixer.sgml:
|
||||||
|
* ext/alsa/gstalsasink.c: (gst_alsasink_class_init),
|
||||||
|
(gst_alsasink_set_property), (gst_alsasink_get_property):
|
||||||
|
* ext/alsa/gstalsasrc.c: (gst_alsasrc_class_init),
|
||||||
|
(gst_alsasrc_set_property), (gst_alsasrc_get_property):
|
||||||
|
add device property
|
||||||
|
|
||||||
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* ext/gnomevfs/gstgnomevfs.c: (plugin_init):
|
* ext/gnomevfs/gstgnomevfs.c: (plugin_init):
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 03aa1cd7f77f87fc24565044c0a3c9c5124c39a4
|
Subproject commit 221ac8abacb46858382a9f8c924152ae588f4a2e
|
|
@ -20,6 +20,15 @@ interface for elements that provide color balance operations
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstColorBalance::value-changed ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstcolorbalance: the object which received the signal.
|
||||||
|
@arg1:
|
||||||
|
@arg2:
|
||||||
|
|
||||||
<!-- ##### STRUCT GstColorBalanceClass ##### -->
|
<!-- ##### STRUCT GstColorBalanceClass ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|
|
@ -45,18 +45,12 @@ gstmixer
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@parent:
|
|
||||||
@values:
|
|
||||||
@_gst_reserved:
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstMixerTrack ##### -->
|
<!-- ##### STRUCT GstMixerTrack ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@parent:
|
|
||||||
@label:
|
|
||||||
@flags:
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_mixer_list_tracks ##### -->
|
<!-- ##### FUNCTION gst_mixer_list_tracks ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -40,10 +40,20 @@ GST_ELEMENT_DETAILS ("Audio Sink (ALSA)",
|
||||||
"Output to a sound card via ALSA",
|
"Output to a sound card via ALSA",
|
||||||
"Wim Taymans <wim@fluendo.com>");
|
"Wim Taymans <wim@fluendo.com>");
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_DEVICE,
|
||||||
|
};
|
||||||
|
|
||||||
static void gst_alsasink_base_init (gpointer g_class);
|
static void gst_alsasink_base_init (gpointer g_class);
|
||||||
static void gst_alsasink_class_init (GstAlsaSinkClass * klass);
|
static void gst_alsasink_class_init (GstAlsaSinkClass * klass);
|
||||||
static void gst_alsasink_init (GstAlsaSink * alsasink);
|
static void gst_alsasink_init (GstAlsaSink * alsasink);
|
||||||
static void gst_alsasink_dispose (GObject * object);
|
static void gst_alsasink_dispose (GObject * object);
|
||||||
|
static void gst_alsasink_set_property (GObject * object,
|
||||||
|
guint prop_id, const GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_alsasink_get_property (GObject * object,
|
||||||
|
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static GstCaps *gst_alsasink_getcaps (GstBaseSink * bsink);
|
static GstCaps *gst_alsasink_getcaps (GstBaseSink * bsink);
|
||||||
|
|
||||||
|
@ -143,7 +153,9 @@ gst_alsasink_class_init (GstAlsaSinkClass * klass)
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_BASEAUDIOSINK);
|
parent_class = g_type_class_ref (GST_TYPE_BASEAUDIOSINK);
|
||||||
|
|
||||||
gobject_class->dispose = gst_alsasink_dispose;
|
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_alsasink_dispose);
|
||||||
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_alsasink_get_property);
|
||||||
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_alsasink_set_property);
|
||||||
|
|
||||||
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasink_getcaps);
|
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasink_getcaps);
|
||||||
|
|
||||||
|
@ -152,6 +164,49 @@ gst_alsasink_class_init (GstAlsaSinkClass * klass)
|
||||||
gstaudiosink_class->write = GST_DEBUG_FUNCPTR (gst_alsasink_write);
|
gstaudiosink_class->write = GST_DEBUG_FUNCPTR (gst_alsasink_write);
|
||||||
gstaudiosink_class->delay = GST_DEBUG_FUNCPTR (gst_alsasink_delay);
|
gstaudiosink_class->delay = GST_DEBUG_FUNCPTR (gst_alsasink_delay);
|
||||||
gstaudiosink_class->reset = GST_DEBUG_FUNCPTR (gst_alsasink_reset);
|
gstaudiosink_class->reset = GST_DEBUG_FUNCPTR (gst_alsasink_reset);
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_DEVICE,
|
||||||
|
g_param_spec_string ("device", "Device",
|
||||||
|
"ALSA device, as defined in an asound configuration file",
|
||||||
|
"default", G_PARAM_READWRITE));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_alsasink_set_property (GObject * object, guint prop_id,
|
||||||
|
const GValue * value, GParamSpec * pspec)
|
||||||
|
{
|
||||||
|
GstAlsaSink *sink;
|
||||||
|
|
||||||
|
sink = GST_ALSA_SINK (object);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_DEVICE:
|
||||||
|
if (sink->device)
|
||||||
|
g_free (sink->device);
|
||||||
|
sink->device = g_strdup (g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_alsasink_get_property (GObject * object, guint prop_id,
|
||||||
|
GValue * value, GParamSpec * pspec)
|
||||||
|
{
|
||||||
|
GstAlsaSink *sink;
|
||||||
|
|
||||||
|
sink = GST_ALSA_SINK (object);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_DEVICE:
|
||||||
|
g_value_set_string (value, sink->device);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -40,10 +40,20 @@ GST_ELEMENT_DETAILS ("Audio Src (ALSA)",
|
||||||
"Output to a sound card via ALSA",
|
"Output to a sound card via ALSA",
|
||||||
"Wim Taymans <wim@fluendo.com>");
|
"Wim Taymans <wim@fluendo.com>");
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_DEVICE,
|
||||||
|
};
|
||||||
|
|
||||||
static void gst_alsasrc_base_init (gpointer g_class);
|
static void gst_alsasrc_base_init (gpointer g_class);
|
||||||
static void gst_alsasrc_class_init (GstAlsaSrcClass * klass);
|
static void gst_alsasrc_class_init (GstAlsaSrcClass * klass);
|
||||||
static void gst_alsasrc_init (GstAlsaSrc * alsasrc);
|
static void gst_alsasrc_init (GstAlsaSrc * alsasrc);
|
||||||
static void gst_alsasrc_dispose (GObject * object);
|
static void gst_alsasrc_dispose (GObject * object);
|
||||||
|
static void gst_alsasrc_set_property (GObject * object,
|
||||||
|
guint prop_id, const GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_alsasrc_get_property (GObject * object,
|
||||||
|
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static GstCaps *gst_alsasrc_getcaps (GstBaseSrc * bsrc);
|
static GstCaps *gst_alsasrc_getcaps (GstBaseSrc * bsrc);
|
||||||
|
|
||||||
|
@ -139,7 +149,9 @@ gst_alsasrc_class_init (GstAlsaSrcClass * klass)
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_BASEAUDIOSRC);
|
parent_class = g_type_class_ref (GST_TYPE_BASEAUDIOSRC);
|
||||||
|
|
||||||
gobject_class->dispose = gst_alsasrc_dispose;
|
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_alsasrc_dispose);
|
||||||
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_alsasrc_get_property);
|
||||||
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_alsasrc_set_property);
|
||||||
|
|
||||||
gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasrc_getcaps);
|
gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasrc_getcaps);
|
||||||
|
|
||||||
|
@ -148,6 +160,49 @@ gst_alsasrc_class_init (GstAlsaSrcClass * klass)
|
||||||
gstaudiosrc_class->read = GST_DEBUG_FUNCPTR (gst_alsasrc_read);
|
gstaudiosrc_class->read = GST_DEBUG_FUNCPTR (gst_alsasrc_read);
|
||||||
gstaudiosrc_class->delay = GST_DEBUG_FUNCPTR (gst_alsasrc_delay);
|
gstaudiosrc_class->delay = GST_DEBUG_FUNCPTR (gst_alsasrc_delay);
|
||||||
gstaudiosrc_class->reset = GST_DEBUG_FUNCPTR (gst_alsasrc_reset);
|
gstaudiosrc_class->reset = GST_DEBUG_FUNCPTR (gst_alsasrc_reset);
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_DEVICE,
|
||||||
|
g_param_spec_string ("device", "Device",
|
||||||
|
"ALSA device, as defined in an asound configuration file",
|
||||||
|
"default", G_PARAM_READWRITE));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_alsasrc_set_property (GObject * object, guint prop_id,
|
||||||
|
const GValue * value, GParamSpec * pspec)
|
||||||
|
{
|
||||||
|
GstAlsaSrc *src;
|
||||||
|
|
||||||
|
src = GST_ALSA_SRC (object);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_DEVICE:
|
||||||
|
if (src->device)
|
||||||
|
g_free (src->device);
|
||||||
|
src->device = g_strdup (g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_alsasrc_get_property (GObject * object, guint prop_id,
|
||||||
|
GValue * value, GParamSpec * pspec)
|
||||||
|
{
|
||||||
|
GstAlsaSrc *src;
|
||||||
|
|
||||||
|
src = GST_ALSA_SRC (object);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_DEVICE:
|
||||||
|
g_value_set_string (value, src->device);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
GST_DEBUG_CATEGORY (videorate_debug);
|
GST_DEBUG_CATEGORY (videorate_debug);
|
||||||
#define GST_CAT_DEFAULT videorate_debug
|
#define GST_CAT_DEFAULT videorate_debug
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_VIDEORATE \
|
#define GST_TYPE_VIDEORATE \
|
||||||
(gst_videorate_get_type())
|
(gst_videorate_get_type())
|
||||||
#define GST_VIDEORATE(obj) \
|
#define GST_VIDEORATE(obj) \
|
||||||
|
|
Loading…
Reference in a new issue