Commit c161e293 authored by Marc-Andre Lureau's avatar Marc-Andre Lureau Committed by Jan Schmidt

Fixes: #152864

Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-sections.txt:
* ext/alsa/gstalsamixer.c:
* ext/alsa/gstalsamixer.h:
* ext/alsa/gstalsamixerelement.c:
* ext/alsa/gstalsamixertrack.c:
* gst-libs/gst/interfaces/mixer.c:
* gst-libs/gst/interfaces/mixer.h:
* gst-libs/gst/interfaces/mixeroptions.c:
* gst-libs/gst/interfaces/mixeroptions.h:
* gst-libs/gst/interfaces/mixertrack.c:
* gst-libs/gst/interfaces/mixertrack.h:
* tests/check/Makefile.am:
* tests/check/libs/mixer.c:
Patch By: Marc-Andre Lureau <marcandre.lureau@gmail.com>
Fixes: #152864
Add support for notifying mixer changes on the message bus, and
implement it in alsamixer.
API: gst_mixer_get_mixer_flags
API: gst_mixer_message_parse_mute_toggled
API: gst_mixer_message_parse_record_toggled
API: gst_mixer_message_parse_volume_changed
API: gst_mixer_message_parse_option_changed
API: GstMixerMessageType
API: GstMixerFlags
parent 11cf0dcd
2007-07-20 Jan Schmidt <thaytan@noraisin.net>
* docs/libs/gst-plugins-base-libs-sections.txt:
* ext/alsa/gstalsamixer.c:
* ext/alsa/gstalsamixer.h:
* ext/alsa/gstalsamixerelement.c:
* ext/alsa/gstalsamixertrack.c:
* gst-libs/gst/interfaces/mixer.c:
* gst-libs/gst/interfaces/mixer.h:
* gst-libs/gst/interfaces/mixeroptions.c:
* gst-libs/gst/interfaces/mixeroptions.h:
* gst-libs/gst/interfaces/mixertrack.c:
* gst-libs/gst/interfaces/mixertrack.h:
* tests/check/Makefile.am:
* tests/check/libs/mixer.c:
Patch By: Marc-Andre Lureau <marcandre.lureau@gmail.com>
Fixes: #152864
Add support for notifying mixer changes on the message bus, and
implement it in alsamixer.
API: gst_mixer_get_mixer_flags
API: gst_mixer_message_parse_mute_toggled
API: gst_mixer_message_parse_record_toggled
API: gst_mixer_message_parse_volume_changed
API: gst_mixer_message_parse_option_changed
API: GstMixerMessageType
API: GstMixerFlags
2007-07-20 Michael Smith <msmith@fluendo.com>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new),
......@@ -288,6 +288,8 @@ gst_color_balance_channel_get_type
<INCLUDE>gst/interfaces/mixer.h</INCLUDE>
GstMixer
GstMixerType
GstMixerFlags
GstMixerMessageType
gst_mixer_list_tracks
gst_mixer_get_volume
......@@ -303,6 +305,14 @@ gst_mixer_volume_changed
gst_mixer_option_changed
gst_mixer_get_option
gst_mixer_get_mixer_flags
gst_mixer_message_get_type
gst_mixer_message_parse_mute_toggled
gst_mixer_message_parse_option_changed
gst_mixer_message_parse_record_toggled
gst_mixer_message_parse_volume_changed
<SUBSECTION Standard>
GstMixerClass
GST_TYPE_MIXER
......@@ -315,6 +325,8 @@ GST_IS_MIXER
GST_IS_MIXER_CLASS
gst_mixer_get_type
gst_mixer_type_get_type
gst_mixer_flags_get_type
gst_mixer_message_type_get_type
</SECTION>
<SECTION>
......
This diff is collapsed.
......@@ -52,6 +52,13 @@ struct _GstAlsaMixer
snd_mixer_t * handle;
GstTask * task;
GStaticRecMutex * task_mutex;
GStaticRecMutex * rec_mutex;
int pfd[2];
GstMixer * interface;
gchar * device;
gchar * cardname;
......@@ -81,7 +88,9 @@ void gst_alsa_mixer_set_option (GstAlsaMixer * mixer,
gchar * value);
const gchar* gst_alsa_mixer_get_option (GstAlsaMixer * mixer,
GstMixerOptions * opts);
void _gst_alsa_mixer_set_interface (GstAlsaMixer * mixer,
GstMixer * interface);
GstMixerFlags gst_alsa_mixer_get_mixer_flags (GstAlsaMixer *mixer);
#define GST_IMPLEMENT_ALSA_MIXER_METHODS(Type, interface_as_function) \
static gboolean \
......@@ -174,6 +183,17 @@ interface_as_function ## _get_option (GstMixer * mixer, GstMixerOptions * opts)
return gst_alsa_mixer_get_option (this->mixer, opts); \
} \
\
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_alsa_mixer_get_mixer_flags (this->mixer); \
} \
\
static void \
interface_as_function ## _interface_init (GstMixerClass * klass) \
{ \
......@@ -187,6 +207,7 @@ interface_as_function ## _interface_init (GstMixerClass * klass)
klass->set_record = interface_as_function ## _set_record; \
klass->set_option = interface_as_function ## _set_option; \
klass->get_option = interface_as_function ## _get_option; \
klass->get_mixer_flags = interface_as_function ## _get_mixer_flags; \
}
......
......@@ -44,22 +44,22 @@ GST_ELEMENT_DETAILS ("Alsa mixer",
static void gst_alsa_mixer_element_init_interfaces (GType type);
GST_BOILERPLATE_FULL (GstAlsaMixerElement, gst_alsa_mixer_element,
GstElement, GST_TYPE_ELEMENT, gst_alsa_mixer_element_init_interfaces)
GstElement, GST_TYPE_ELEMENT, gst_alsa_mixer_element_init_interfaces);
/* massive macro that takes care of all the GstMixer stuff */
GST_IMPLEMENT_ALSA_MIXER_METHODS (GstAlsaMixerElement, gst_alsa_mixer_element);
GST_IMPLEMENT_ALSA_MIXER_METHODS (GstAlsaMixerElement, gst_alsa_mixer_element);
static void gst_alsa_mixer_element_get_property (GObject * object,
static void gst_alsa_mixer_element_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static void gst_alsa_mixer_element_set_property (GObject * object,
static void gst_alsa_mixer_element_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_alsa_mixer_element_finalize (GObject * object);
static void gst_alsa_mixer_element_finalize (GObject * object);
static GstStateChangeReturn gst_alsa_mixer_element_change_state (GstElement
static GstStateChangeReturn gst_alsa_mixer_element_change_state (GstElement
* element, GstStateChange transition);
static gboolean
gst_alsa_mixer_element_interface_supported (GstAlsaMixerElement * this,
static gboolean
gst_alsa_mixer_element_interface_supported (GstAlsaMixerElement * this,
GType interface_type)
{
if (interface_type == GST_TYPE_MIXER) {
......@@ -214,6 +214,7 @@ gst_alsa_mixer_element_change_state (GstElement * element,
this->mixer = gst_alsa_mixer_new (this->device, GST_ALSA_MIXER_ALL);
if (!this->mixer)
goto open_failed;
_gst_alsa_mixer_set_interface (this->mixer, GST_MIXER (element));
}
break;
default:
......
......@@ -47,6 +47,7 @@ gst_alsa_mixer_track_get_type (void)
sizeof (GstAlsaMixerTrack),
0,
(GInstanceInitFunc) gst_alsa_mixer_track_init,
0
};
track_type =
......@@ -239,6 +240,26 @@ gst_alsa_mixer_track_update (GstAlsaMixerTrack * alsa_track)
gint i;
gint audible = !(track->flags & GST_MIXER_TRACK_MUTE);
if (alsa_track_has_cap (alsa_track, GST_ALSA_MIXER_TRACK_PVOLUME)) {
/* update playback volume */
for (i = 0; i < track->num_channels; i++) {
long vol = 0;
snd_mixer_selem_get_playback_volume (alsa_track->element, i, &vol);
alsa_track->volumes[i] = (gint) vol;
}
}
if (alsa_track_has_cap (alsa_track, GST_ALSA_MIXER_TRACK_CVOLUME)) {
/* update capture volume */
for (i = 0; i < track->num_channels; i++) {
long vol = 0;
snd_mixer_selem_get_capture_volume (alsa_track->element, i, &vol);
alsa_track->volumes[i] = (gint) vol;
}
}
/* Any updates in flags? */
if (alsa_track_has_cap (alsa_track, GST_ALSA_MIXER_TRACK_PSWITCH)) {
int v = 0;
......
This diff is collapsed.
......@@ -53,6 +53,44 @@ typedef enum
GST_MIXER_SOFTWARE
} GstMixerType;
/**
* GstMixerMessageType:
* @GST_MIXER_MESSAGE_INVALID: Not a GstMixer message
* @GST_MIXER_MESSAGE_MUTE_TOGGLED: A mute-toggled GstMixer message
* @GST_MIXER_MESSAGE_RECORD_TOGGLED: A record-toggled GstMixer message
* @GST_MIXER_MESSAGE_VOLUME_CHANGED: A volume-changed GstMixer message
* @GST_MIXER_MESSAGE_OPTION_CHANGED: An option-changed GstMixer message
*
* An enumeration for the type of a GstMixer message received on the bus
*
* Since: 0.10.14
*/
typedef enum
{
GST_MIXER_MESSAGE_INVALID,
GST_MIXER_MESSAGE_MUTE_TOGGLED,
GST_MIXER_MESSAGE_RECORD_TOGGLED,
GST_MIXER_MESSAGE_VOLUME_CHANGED,
GST_MIXER_MESSAGE_OPTION_CHANGED
} GstMixerMessageType;
/**
* GstMixerFlags:
* @GST_MIXER_FLAG_NONE: No flags
* @GST_MIXER_AUTO_NOTIFICATIONS: The mixer implementation automatically sends
* notification messages.
*
* Flags for supported features. Whether the element automatically sends
* notifications on the bus is the only one for now.
*
* Since: 0.10.14
*/
typedef enum
{
GST_MIXER_FLAG_NONE = 0,
GST_MIXER_FLAG_AUTO_NOTIFICATIONS = (1<<0)
} GstMixerFlags;
struct _GstMixerClass {
GTypeInterface klass;
......@@ -74,8 +112,8 @@ struct _GstMixerClass {
void (* set_record) (GstMixer *mixer,
GstMixerTrack *track,
gboolean record);
/* signals */
#ifndef GST_DISABLE_DEPRECATED
/* signals (deprecated) */
void (* mute_toggled) (GstMixer *mixer,
GstMixerTrack *channel,
gboolean mute);
......@@ -85,6 +123,7 @@ struct _GstMixerClass {
void (* volume_changed) (GstMixer *mixer,
GstMixerTrack *channel,
gint *volumes);
#endif /* not GST_DISABLE_DEPRECATED */
void (* set_option) (GstMixer *mixer,
GstMixerOptions *opts,
......@@ -92,12 +131,16 @@ struct _GstMixerClass {
const gchar * (* get_option) (GstMixer *mixer,
GstMixerOptions *opts);
#ifndef GST_DISABLE_DEPRECATED
void (* option_changed) (GstMixer *mixer,
GstMixerOptions *opts,
gchar *option);
gchar *option);
#endif /* not GST_DISABLE_DEPRECATED */
GstMixerFlags (* get_mixer_flags) (GstMixer *mixer);
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
gpointer _gst_reserved[GST_PADDING-1];
};
GType gst_mixer_get_type (void);
......@@ -122,7 +165,7 @@ void gst_mixer_set_option (GstMixer *mixer,
const gchar * gst_mixer_get_option (GstMixer *mixer,
GstMixerOptions *opts);
/* trigger signals */
/* trigger bus messages */
void gst_mixer_mute_toggled (GstMixer *mixer,
GstMixerTrack *track,
gboolean mute);
......@@ -136,6 +179,24 @@ void gst_mixer_option_changed (GstMixer *mixer,
GstMixerOptions *opts,
gchar *value);
GstMixerFlags gst_mixer_get_mixer_flags (GstMixer *mixer);
/* Functions for recognising and parsing GstMixerMessages on the bus */
GstMixerMessageType gst_mixer_message_get_type (GstMessage *message);
void gst_mixer_message_parse_mute_toggled (GstMessage *message,
GstMixerTrack **track,
gboolean *mute);
void gst_mixer_message_parse_record_toggled (GstMessage *message,
GstMixerTrack **track,
gboolean *record);
void gst_mixer_message_parse_volume_changed (GstMessage *message,
GstMixerTrack **track,
gint **volumes,
gint *num_channels);
void gst_mixer_message_parse_option_changed (GstMessage *message,
GstMixerOptions **options,
const gchar **value);
G_END_DECLS
#endif /* __GST_MIXER_H__ */
......@@ -25,19 +25,21 @@
#include "mixeroptions.h"
#ifndef GST_DISABLE_DEPRECATED
enum
{
/* FILL ME */
SIGNAL_OPTION_CHANGED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
#endif
static void gst_mixer_options_class_init (GstMixerOptionsClass * klass);
static void gst_mixer_options_init (GstMixerOptions * mixer);
static void gst_mixer_options_dispose (GObject * object);
static GObjectClass *parent_class = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
GType
gst_mixer_options_get_type (void)
......@@ -72,13 +74,14 @@ gst_mixer_options_class_init (GstMixerOptionsClass * klass)
GObjectClass *object_klass = (GObjectClass *) klass;
parent_class = g_type_class_peek_parent (klass);
#ifndef GST_DISABLE_DEPRECATED
signals[SIGNAL_OPTION_CHANGED] =
g_signal_new ("option_changed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstMixerOptionsClass, option_changed),
NULL, NULL, g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
#endif
object_klass->dispose = gst_mixer_options_dispose;
}
......
......@@ -57,9 +57,11 @@ struct _GstMixerOptions {
struct _GstMixerOptionsClass {
GstMixerTrackClass parent;
#ifndef GST_DISABLE_DEPRECATED
/* signals */
void (* option_changed) (GstMixerOptions *opts,
gchar *value);
#endif /* not GST_DISABLE_DEPRECATED */
gpointer _gst_reserved[GST_PADDING];
};
......
......@@ -24,7 +24,7 @@
#endif
#include "mixertrack.h"
#ifndef GST_DISABLE_DEPRECATED
enum
{
/* FILL ME */
......@@ -33,6 +33,8 @@ enum
SIGNAL_MUTE_TOGGLED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
#endif
enum
{
......@@ -55,7 +57,6 @@ static void gst_mixer_track_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static GObjectClass *parent_class = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
GType
gst_mixer_track_get_type (void)
......@@ -135,6 +136,7 @@ gst_mixer_track_class_init (GstMixerTrackClass * klass)
"The number of channels contained within the track",
0, G_MAXINT, 0, G_PARAM_READABLE));
#ifndef GST_DISABLE_DEPRECATED
signals[SIGNAL_RECORD_TOGGLED] =
g_signal_new ("record_toggled", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
......@@ -156,6 +158,7 @@ gst_mixer_track_class_init (GstMixerTrackClass * klass)
volume_changed),
NULL, NULL, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
#endif
object_klass->dispose = gst_mixer_track_dispose;
}
......
......@@ -88,13 +88,15 @@ struct _GstMixerTrack {
struct _GstMixerTrackClass {
GObjectClass parent;
/* signals */
#ifndef GST_DISABLE_DEPRECATED
/* signals (deprecated) */
void (* mute_toggled) (GstMixerTrack *channel,
gboolean mute);
void (* record_toggled) (GstMixerTrack *channel,
gboolean record);
void (* volume_changed) (GstMixerTrack *channel,
gint *volumes);
#endif /* not GST_DISABLE_DEPRECATED */
gpointer _gst_reserved[GST_PADDING];
};
......
......@@ -89,6 +89,7 @@ check_PROGRAMS = \
gst/typefindfunctions \
libs/audio \
libs/cddabasesrc \
libs/mixer \
libs/netbuffer \
libs/pbutils \
libs/tag \
......@@ -138,6 +139,16 @@ libs_cddabasesrc_LDADD = \
$(GST_BASE_LIBS) \
$(LDADD)
libs_mixer_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(AM_CFLAGS)
libs_mixer_LDADD = \
$(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
$(GST_BASE_LIBS) \
$(LDADD)
libs_netbuffer_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(AM_CFLAGS)
......
/* GStreamer
*
* unit tests for audio support library
*
* Copyright (C) 2007 Jan Schmidt <thaytan@noraisin.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/check/gstcheck.h>
#include <gst/interfaces/mixer.h>
#include <string.h>
#define TEST_ELEMENT_TYPE (test_element_get_type())
typedef struct TestElement TestElement;
typedef struct TestElementClass TestElementClass;
struct TestElement
{
GstElement parent;
};
struct TestElementClass
{
GstElementClass parent_class;
};
static void init_interface (GType type);
static void gst_implements_interface_init (GstImplementsInterfaceClass * klass);
GST_BOILERPLATE_FULL (TestElement, test_element, GstElement, GST_TYPE_ELEMENT,
init_interface);
static void
test_element_mixer_interface_init (GstMixerClass * klass)
{
/* Not actually implementing any interfaces for this test atm */
}
static void
init_interface (GType type)
{
static const GInterfaceInfo mixer_iface_info = {
(GInterfaceInitFunc) test_element_mixer_interface_init,
NULL,
NULL,
};
static const GInterfaceInfo implements_iface_info = {
(GInterfaceInitFunc) gst_implements_interface_init,
NULL,
NULL,
};
g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,
&implements_iface_info);
g_type_add_interface_static (type, GST_TYPE_MIXER, &mixer_iface_info);
}
static void
test_element_base_init (gpointer klass)
{
}
static void
test_element_class_init (TestElementClass * klass)
{
}
static gboolean
test_element_interface_supported (TestElement * this, GType interface_type)
{
if (interface_type == GST_TYPE_MIXER)
return TRUE;
return FALSE;
}
static void
gst_implements_interface_init (GstImplementsInterfaceClass * klass)
{
klass->supported = (gpointer) test_element_interface_supported;
}
static void
test_element_init (TestElement * this, TestElementClass * klass)
{
}
GST_START_TEST (test_messages)
{
/* Create an empty GstElement that has a GstMixer interface and then
* send some notifications and validate them */
GstElement *test_element =
(GstElement *) g_object_new (TEST_ELEMENT_TYPE, NULL);
GstBus *bus = gst_bus_new ();
GstMixerTrack *mtrack = g_object_new (GST_TYPE_MIXER_TRACK, NULL);
GstMixerOptions *mopts = g_object_new (GST_TYPE_MIXER_OPTIONS, NULL);
GstMixerTrack *t;
GstMixerOptions *o;
gint vols_in[2] = { 50, 75 };
gboolean mute, record;
gint *vols_out;
gint n_chans, i;
const gchar *val;
GstMessage *message;
mtrack->num_channels = 2;
mtrack->flags = GST_MIXER_TRACK_MUTE | GST_MIXER_TRACK_RECORD;
gst_element_set_bus (test_element, bus);
/* Test mute-toggled */
gst_mixer_mute_toggled (GST_MIXER (test_element), mtrack, TRUE);
message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, GST_CLOCK_TIME_NONE);
fail_if (message == NULL);
fail_unless (gst_mixer_message_get_type (message) ==
GST_MIXER_MESSAGE_MUTE_TOGGLED);
/* Test that we can pass NULL args */
gst_mixer_message_parse_mute_toggled (message, NULL, NULL);
/* Test the parsing */
gst_mixer_message_parse_mute_toggled (message, &t, &mute);
fail_unless (t == mtrack);
fail_unless (mute == TRUE);
gst_message_unref (message);
/* Test record-toggled */
gst_mixer_record_toggled (GST_MIXER (test_element), mtrack, TRUE);
message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, GST_CLOCK_TIME_NONE);
fail_if (message == NULL);
fail_unless (gst_mixer_message_get_type (message) ==
GST_MIXER_MESSAGE_RECORD_TOGGLED);
gst_mixer_message_parse_record_toggled (message, NULL, NULL);
gst_mixer_message_parse_record_toggled (message, &t, &record);
fail_unless (t == mtrack);
fail_unless (record == TRUE);
gst_message_unref (message);
/* Test volume-changed */
gst_mixer_volume_changed (GST_MIXER (test_element), mtrack, vols_in);
message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, GST_CLOCK_TIME_NONE);
fail_if (message == NULL);
fail_unless (gst_mixer_message_get_type (message) ==
GST_MIXER_MESSAGE_VOLUME_CHANGED);
gst_mixer_message_parse_volume_changed (message, NULL, NULL, NULL);
gst_mixer_message_parse_volume_changed (message, NULL, NULL, &n_chans);
fail_unless (n_chans == 2);
gst_mixer_message_parse_volume_changed (message, &t, &vols_out, &n_chans);
fail_unless (mtrack == t);
for (i = 0; i < n_chans; i++)
fail_unless (vols_out[i] == vols_in[i]);
gst_message_unref (message);
g_free (vols_out);
/* Test options-changed */
gst_mixer_option_changed (GST_MIXER (test_element), mopts, "TESTING");
message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, GST_CLOCK_TIME_NONE);
fail_if (message == NULL);
fail_unless (gst_mixer_message_get_type (message) ==
GST_MIXER_MESSAGE_OPTION_CHANGED);
gst_mixer_message_parse_option_changed (message, NULL, NULL);
gst_mixer_message_parse_option_changed (message, &o, &val);
fail_unless (o == mopts);
fail_unless (g_str_equal (val, "TESTING"));
gst_message_unref (message);
gst_object_unref (mtrack);
gst_object_unref (mopts);
gst_object_unref (bus);
gst_object_unref (test_element);
}
GST_END_TEST;
static Suite *
mixer_suite (void)
{
Suite *s = suite_create ("mixer interface");
TCase *tc_chain = tcase_create ("notifications");
suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_messages);
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = mixer_suite ();
SRunner *sr = srunner_create (s);
gst_check_init (&argc, &argv);