mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
sys/sunaudio/gstsunaudiosrc.c: it is the application's responsibility to make sure it open the device once.
Original commit message from CVS: Patch by: jerry tan <jerry dot tan at sun dot com> * sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_open): remove the call of ioctl (fd, AUDIO_MIXER_MULTIPLE_OPEN), it is the application's responsibility to make sure it open the device once. Remove a careless error if AUDIODEV is set. Fixes #392620.
This commit is contained in:
parent
eae68a64fa
commit
a7efc5ceb7
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2007-04-12 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
Patch by: jerry tan <jerry dot tan at sun dot com>
|
||||||
|
|
||||||
|
* sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_open):
|
||||||
|
remove the call of ioctl (fd, AUDIO_MIXER_MULTIPLE_OPEN), it is the
|
||||||
|
application's responsibility to make sure it open the device once.
|
||||||
|
Remove a careless error if AUDIODEV is set. Fixes #392620.
|
||||||
|
|
||||||
2007-04-12 Wim Taymans <wim@fluendo.com>
|
2007-04-12 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/rtsp/gstrtpdec.c: (gst_rtp_dec_marshal_BOXED__UINT_UINT),
|
* gst/rtsp/gstrtpdec.c: (gst_rtp_dec_marshal_BOXED__UINT_UINT),
|
||||||
|
|
|
@ -234,12 +234,11 @@ static gboolean
|
||||||
gst_sunaudiosrc_open (GstAudioSrc * asrc)
|
gst_sunaudiosrc_open (GstAudioSrc * asrc)
|
||||||
{
|
{
|
||||||
GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc);
|
GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc);
|
||||||
int fd, ret, err;
|
int fd, ret;
|
||||||
|
|
||||||
fd = open (sunaudiosrc->device, O_RDONLY);
|
fd = open (sunaudiosrc->device, O_RDONLY);
|
||||||
err = ioctl (fd, AUDIO_MIXER_MULTIPLE_OPEN);
|
|
||||||
|
|
||||||
if (fd == -1 || err == -1) {
|
if (fd == -1) {
|
||||||
GST_ELEMENT_ERROR (sunaudiosrc, RESOURCE, OPEN_READ, (NULL),
|
GST_ELEMENT_ERROR (sunaudiosrc, RESOURCE, OPEN_READ, (NULL),
|
||||||
("can't open connection to Sun Audio device %s", sunaudiosrc->device));
|
("can't open connection to Sun Audio device %s", sunaudiosrc->device));
|
||||||
|
|
||||||
|
@ -284,7 +283,7 @@ gst_sunaudiosrc_open (GstAudioSrc * asrc)
|
||||||
if (audiodev == NULL) {
|
if (audiodev == NULL) {
|
||||||
sunaudiosrc->mixer = gst_sunaudiomixer_ctrl_new ("/dev/audioctl");
|
sunaudiosrc->mixer = gst_sunaudiomixer_ctrl_new ("/dev/audioctl");
|
||||||
} else {
|
} else {
|
||||||
gchar *device = g_strdup_printf ("/dev/%sctl", audiodev);
|
gchar *device = g_strdup_printf ("%sctl", audiodev);
|
||||||
|
|
||||||
sunaudiosrc->mixer = gst_sunaudiomixer_ctrl_new (device);
|
sunaudiosrc->mixer = gst_sunaudiomixer_ctrl_new (device);
|
||||||
g_free (device);
|
g_free (device);
|
||||||
|
|
Loading…
Reference in a new issue