mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
sys/oss/gstosssrc.*: Easy to implement a mixer, eh...
Original commit message from CVS: 2005-08-23 Andy Wingo <wingo@pobox.com> * sys/oss/gstosssrc.c: * sys/oss/gstosssrc.h: Easy to implement a mixer, eh...
This commit is contained in:
parent
b976e88c29
commit
02a32faa48
3 changed files with 22 additions and 6 deletions
|
@ -1,5 +1,8 @@
|
|||
2005-08-23 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* sys/oss/gstosssrc.c:
|
||||
* sys/oss/gstosssrc.h: Easy to implement a mixer, eh...
|
||||
|
||||
* sys/oss/gstossmixerelement.h:
|
||||
* sys/oss/gstossmixerelement.c: Added mixer element like
|
||||
alsamixer.
|
||||
|
|
|
@ -47,13 +47,10 @@ enum
|
|||
PROP_DEVICE_NAME,
|
||||
};
|
||||
|
||||
GST_BOILERPLATE (GstOssSrc, gst_oss_src, GstAudioSrc, GST_TYPE_AUDIO_SRC);
|
||||
GST_BOILERPLATE_WITH_INTERFACE (GstOssSrc, gst_oss_src, GstAudioSrc,
|
||||
GST_TYPE_AUDIO_SRC, GstMixer, GST_TYPE_MIXER, gst_oss_src_mixer);
|
||||
|
||||
/*
|
||||
GST_BOILERPLATE_WITH_INTERFACE (GstOssSrc, gst_oss_src, GstAudioSrc, GST_TYPE_AUDIO_SRC,
|
||||
GstMixer, GST_TYPE_MIXER, gst_oss_src_mixer);
|
||||
GST_IMPLEMENT_OSS_MIXER_METHODS (GstOssSrc, gst_oss_src_mixer);
|
||||
*/
|
||||
|
||||
static void gst_oss_src_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
|
@ -309,13 +306,26 @@ gst_oss_src_open (GstAudioSrc * asrc)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!oss->mixer)
|
||||
oss->mixer = gst_ossmixer_new ("/dev/mixer", GST_OSS_MIXER_CAPTURE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_oss_src_close (GstAudioSrc * asrc)
|
||||
{
|
||||
close (GST_OSS_SRC (asrc)->fd);
|
||||
GstOssSrc *oss;
|
||||
|
||||
oss = GST_OSS_SRC (asrc);
|
||||
|
||||
close (oss->fd);
|
||||
|
||||
if (oss->mixer) {
|
||||
gst_ossmixer_free (oss->mixer);
|
||||
oss->mixer = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <gst/audio/gstaudiosrc.h>
|
||||
|
||||
#include "gstosshelper.h"
|
||||
#include "gstossmixer.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -49,6 +50,8 @@ struct _GstOssSrc {
|
|||
|
||||
gchar *device;
|
||||
gchar *device_name;
|
||||
|
||||
GstOssMixer *mixer;
|
||||
};
|
||||
|
||||
struct _GstOssSrcClass {
|
||||
|
|
Loading…
Reference in a new issue