mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
Rename osselement to ossmixer and only open audio device if we have at least one pad. This makes ossmixer *only* open...
Original commit message from CVS: Rename osselement to ossmixer and only open audio device if we have at least one pad. This makes ossmixer *only* open the mixer, which means we can open multiple mixer sessions.
This commit is contained in:
parent
5de12607be
commit
5d540ce924
1 changed files with 6 additions and 2 deletions
|
@ -412,6 +412,8 @@ gst_osselement_open_audio (GstOssElement *oss)
|
|||
if (GST_PAD_IS_SINK (firstpad)) {
|
||||
mode = GST_OSSELEMENT_WRITE;
|
||||
}
|
||||
} else {
|
||||
goto do_mixer;
|
||||
}
|
||||
|
||||
/* first try to open the sound card */
|
||||
|
@ -515,6 +517,7 @@ gst_osselement_open_audio (GstOssElement *oss)
|
|||
|
||||
oss->caps = caps;
|
||||
|
||||
do_mixer:
|
||||
gst_ossmixer_build_list (oss);
|
||||
|
||||
return TRUE;
|
||||
|
@ -523,10 +526,11 @@ gst_osselement_open_audio (GstOssElement *oss)
|
|||
static void
|
||||
gst_osselement_close_audio (GstOssElement *oss)
|
||||
{
|
||||
gst_ossmixer_free_list (oss);
|
||||
|
||||
if (oss->fd < 0)
|
||||
return;
|
||||
|
||||
gst_ossmixer_free_list (oss);
|
||||
close(oss->fd);
|
||||
oss->fd = -1;
|
||||
}
|
||||
|
@ -678,7 +682,7 @@ gst_osselement_factory_init (GstPlugin *plugin)
|
|||
{
|
||||
GstElementFactory *factory;
|
||||
|
||||
factory = gst_element_factory_new ("osselement",
|
||||
factory = gst_element_factory_new ("ossmixer",
|
||||
GST_TYPE_OSSELEMENT,
|
||||
&gst_osselement_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
|
|
Loading…
Reference in a new issue