Throw a runtime error when a bad audio device is selected, so that the GUI can process the error message.
refer to #2165
This commit is contained in:
parent
b65810adfd
commit
3db4168db1
|
@ -143,11 +143,14 @@ GstreamerPlayer :: errorHandler(GstElement * pipeline,
|
|||
gpointer self)
|
||||
throw ()
|
||||
{
|
||||
std::cerr << "gstreamer error: " << error->message << std::endl;
|
||||
|
||||
// Important: We *must* use an idle function call here, so that the signal handler returns
|
||||
// before fireOnStopEvent() is executed.
|
||||
g_idle_add(fireOnStopEvent, self);
|
||||
|
||||
std::string str( "Audio Player Error: ");
|
||||
str += error->message;
|
||||
|
||||
throw std::runtime_error(str);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue