summaryrefslogtreecommitdiffstats
path: root/sys/sunaudio/gstsunaudiomixerctrl.h
diff options
context:
space:
mode:
authorJan Schmidt <jan.schmidt@sun.com>2009-06-04 12:27:19 +0100
committerJan Schmidt <jan.schmidt@sun.com>2009-06-05 10:47:53 +0100
commit0fc43060e5e10e5a9fc24487d9fcb3e2865c0895 (patch)
treea3b2d302dcefdd91a26a55609351525a3ad4a6d5 /sys/sunaudio/gstsunaudiomixerctrl.h
parent29111fa1f8208c3ae1896d5934e5a2ff5839aa98 (diff)
sunaudio: Support new flags for options and actions
Use new audio mixer flags added in Base 0.10.23 to expose flags and options on the SunAudio devices. Fixes: #583593 Patch By: Brian Cameron <brian.cameron@sun.com> Patch By: Garrett D'Amore <garrett.damore@sun.com>
Diffstat (limited to 'sys/sunaudio/gstsunaudiomixerctrl.h')
-rw-r--r--sys/sunaudio/gstsunaudiomixerctrl.h48
1 files changed, 46 insertions, 2 deletions
diff --git a/sys/sunaudio/gstsunaudiomixerctrl.h b/sys/sunaudio/gstsunaudiomixerctrl.h
index 2956c54e..d38f02f2 100644
--- a/sys/sunaudio/gstsunaudiomixerctrl.h
+++ b/sys/sunaudio/gstsunaudiomixerctrl.h
@@ -1,7 +1,9 @@
/*
* GStreamer - SunAudio mixer interface element.
- * Copyright (C) 2005,2006 Sun Microsystems, Inc.,
+ * Copyright (C) 2005,2006,2009 Sun Microsystems, Inc.,
* Brian Cameron <brian.cameron@sun.com>
+ * Copyright (C) 2009 Sun Microsystems, Inc.,
+ * Garrett D'Amore <garrett.damore@sun.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -39,7 +41,6 @@ struct _GstSunAudioMixerCtrl {
gint mixer_fd;
gchar * device;
- gint recdevs;
};
GstSunAudioMixerCtrl* gst_sunaudiomixer_ctrl_new (const gchar *device);
@@ -58,6 +59,12 @@ void gst_sunaudiomixer_ctrl_set_record (GstSunAudioMixerCtrl
void gst_sunaudiomixer_ctrl_set_mute (GstSunAudioMixerCtrl * mixer,
GstMixerTrack * track,
gboolean mute);
+void gst_sunaudiomixer_ctrl_set_option (GstSunAudioMixerCtrl * mixer,
+ GstMixerOptions * options,
+ gchar * value);
+const gchar * gst_sunaudiomixer_ctrl_get_option (GstSunAudioMixerCtrl * mixer,
+ GstMixerOptions * options);
+GstMixerFlags gst_sunaudiomixer_ctrl_get_mixer_flags (GstSunAudioMixerCtrl *mixer);
#define GST_IMPLEMENT_SUNAUDIO_MIXER_CTRL_METHODS(Type, interface_as_function) \
static gboolean \
@@ -126,7 +133,41 @@ interface_as_function ## _set_mute (GstMixer * mixer, GstMixerTrack * track,
\
gst_sunaudiomixer_ctrl_set_mute (this->mixer, track, mute); \
} \
+ \
+static const gchar * \
+interface_as_function ## _get_option (GstMixer * mixer, GstMixerOptions * opts) \
+{ \
+ Type *this = (Type*) mixer; \
+ \
+ g_return_val_if_fail (this != NULL, NULL); \
+ g_return_val_if_fail (this->mixer != NULL, NULL); \
+ \
+ return gst_sunaudiomixer_ctrl_get_option (this->mixer, opts); \
+} \
+\
+static void \
+interface_as_function ## _set_option (GstMixer * mixer, GstMixerOptions * opts, \
+ gchar * value) \
+{ \
+ Type *this = (Type*) mixer; \
+ \
+ g_return_if_fail (this != NULL); \
+ g_return_if_fail (this->mixer != NULL); \
+ \
+ gst_sunaudiomixer_ctrl_set_option (this->mixer, opts, value); \
+} \
+\
+static GstMixerFlags \
+interface_as_function ## _get_mixer_flags (GstMixer * mixer) \
+{ \
+ Type *this = (Type*) mixer; \
\
+ g_return_val_if_fail (this != NULL, GST_MIXER_FLAG_NONE); \
+ g_return_val_if_fail (this->mixer != NULL, GST_MIXER_FLAG_NONE); \
+ \
+ return gst_sunaudiomixer_ctrl_get_mixer_flags (this->mixer); \
+} \
+ \
static void \
interface_as_function ## _interface_init (GstMixerClass * klass) \
{ \
@@ -138,6 +179,9 @@ interface_as_function ## _interface_init (GstMixerClass * klass)
klass->get_volume = interface_as_function ## _get_volume; \
klass->set_mute = interface_as_function ## _set_mute; \
klass->set_record = interface_as_function ## _set_record; \
+ klass->get_option = interface_as_function ## _get_option; \
+ klass->set_option = interface_as_function ## _set_option; \
+ klass->get_mixer_flags = interface_as_function ## _get_mixer_flags; \
}
G_END_DECLS