mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
ext/alsa/gstalsamixerelement.c: Make state change fail if the specified device can't be opened for some reason.
Original commit message from CVS: * ext/alsa/gstalsamixerelement.c: (gst_alsa_mixer_element_change_state): Make state change fail if the specified device can't be opened for some reason.
This commit is contained in:
parent
ac162b0f78
commit
f82bb0c84e
2 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-07-20 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/alsa/gstalsamixerelement.c:
|
||||||
|
(gst_alsa_mixer_element_change_state):
|
||||||
|
Make state change fail if the specified device can't be opened
|
||||||
|
for some reason.
|
||||||
|
|
||||||
2006-07-20 Wim Taymans <wim@fluendo.com>
|
2006-07-20 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
|
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
|
||||||
|
|
|
@ -208,10 +208,13 @@ gst_alsa_mixer_element_change_state (GstElement * element,
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
if (!this->mixer) {
|
if (!this->mixer) {
|
||||||
if (!this->device) {
|
const gchar *device = (this->device) ? this->device : "default";
|
||||||
this->mixer = gst_alsa_mixer_new ("default", GST_ALSA_MIXER_ALL);
|
|
||||||
} else {
|
this->mixer = gst_alsa_mixer_new (device, GST_ALSA_MIXER_ALL);
|
||||||
this->mixer = gst_alsa_mixer_new (this->device, GST_ALSA_MIXER_ALL);
|
if (!this->mixer) {
|
||||||
|
GST_ELEMENT_ERROR (element, RESOURCE, OPEN_READ_WRITE, (NULL),
|
||||||
|
("Failed to open alsa mixer device '%s'", device));
|
||||||
|
return GST_STATE_CHANGE_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue