mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
vishnu's patch
Original commit message from CVS: vishnu's patch
This commit is contained in:
parent
cb64911d06
commit
88772a64b5
2 changed files with 37 additions and 36 deletions
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 1a826743b023d38a14e16cf1b3fb85eabdbb65d6
|
Subproject commit 316e406cd246e8cbccdf4df4ce32e98c63d7cc72
|
|
@ -786,22 +786,26 @@ gst_osssink_open_audio (GstOssSink *sink)
|
||||||
GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: attempting to open sound device");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: attempting to open sound device");
|
||||||
|
|
||||||
/* first try to open the sound card */
|
/* first try to open the sound card */
|
||||||
sink->fd = open(sink->device, O_WRONLY | O_NONBLOCK);
|
sink->fd = open (sink->device, O_WRONLY | O_NONBLOCK);
|
||||||
if (errno == EBUSY) {
|
if (errno == EBUSY) {
|
||||||
g_warning ("osssink: unable to open the sound device (in use ?)\n");
|
g_warning ("osssink: unable to open the sound device (in use ?)\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* re-open the sound device in blocking mode */
|
/* re-open the sound device in blocking mode */
|
||||||
close(sink->fd);
|
close (sink->fd);
|
||||||
sink->fd = open(sink->device, O_WRONLY);
|
sink->fd = open (sink->device, O_WRONLY);
|
||||||
|
|
||||||
/* if we have it, set the default parameters and go have fun */
|
if (sink->fd < 0) {
|
||||||
if (sink->fd >= 0) {
|
g_warning ("osssink: unable to open the sound device (errno=%d)\n", errno);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* we have it, set the default parameters and go have fun */
|
||||||
/* set card state */
|
/* set card state */
|
||||||
ioctl(sink->fd, SNDCTL_DSP_GETCAPS, &caps);
|
ioctl (sink->fd, SNDCTL_DSP_GETCAPS, &caps);
|
||||||
|
|
||||||
GST_INFO(GST_CAT_PLUGIN_INFO, "osssink: Capabilities %08x", caps);
|
GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: Capabilities %08x", caps);
|
||||||
|
|
||||||
if (caps & DSP_CAP_DUPLEX) GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: Full duplex");
|
if (caps & DSP_CAP_DUPLEX) GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: Full duplex");
|
||||||
if (caps & DSP_CAP_REALTIME) GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: Realtime");
|
if (caps & DSP_CAP_REALTIME) GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: Realtime");
|
||||||
|
@ -839,9 +843,6 @@ gst_osssink_open_audio (GstOssSink *sink)
|
||||||
GST_FLAG_SET (sink, GST_OSSSINK_OPEN);
|
GST_FLAG_SET (sink, GST_OSSSINK_OPEN);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue