mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
Fixing error message when a plugin is missing (gst-player -> libgstplay).
Original commit message from CVS: Fixing error message when a plugin is missing (gst-player -> libgstplay). Pipeline state change on error is now done directly in error callback, there's still something weird with oss /dev/dsp ressource busy error.
This commit is contained in:
parent
cd3f2fa760
commit
6af1a5e382
1 changed files with 5 additions and 6 deletions
|
@ -144,7 +144,7 @@ gst_play_error_plugin ( GstPlayError type,
|
||||||
*error = g_error_new ( GST_PLAY_ERROR,
|
*error = g_error_new ( GST_PLAY_ERROR,
|
||||||
type,
|
type,
|
||||||
"The %s plug-in could not be found. "
|
"The %s plug-in could not be found. "
|
||||||
"This plug-in is essential for gst-player. "
|
"This plug-in is essential for libgstplay. "
|
||||||
"Please install it and verify that it works "
|
"Please install it and verify that it works "
|
||||||
"by running 'gst-inspect %s'",
|
"by running 'gst-inspect %s'",
|
||||||
name, name);
|
name, name);
|
||||||
|
@ -341,8 +341,6 @@ gst_play_idle_signal (GstPlay *play)
|
||||||
gst_object_unref (signal->signal_data.info.object);
|
gst_object_unref (signal->signal_data.info.object);
|
||||||
break;
|
break;
|
||||||
case PIPELINE_ERROR:
|
case PIPELINE_ERROR:
|
||||||
if (gst_element_get_state(play->pipeline) == GST_STATE_PLAYING)
|
|
||||||
gst_element_set_state(play->pipeline, GST_STATE_READY);
|
|
||||||
g_signal_emit (G_OBJECT (play), gst_play_signals[PIPELINE_ERROR], 0,
|
g_signal_emit (G_OBJECT (play), gst_play_signals[PIPELINE_ERROR], 0,
|
||||||
signal->signal_data.error.element, signal->signal_data.error.error);
|
signal->signal_data.error.element, signal->signal_data.error.error);
|
||||||
if (signal->signal_data.error.error)
|
if (signal->signal_data.error.error)
|
||||||
|
@ -435,11 +433,14 @@ callback_pipeline_error ( GstElement *object,
|
||||||
signal->signal_id = PIPELINE_ERROR;
|
signal->signal_id = PIPELINE_ERROR;
|
||||||
signal->signal_data.error.element = orig;
|
signal->signal_data.error.element = orig;
|
||||||
signal->signal_data.error.error = g_strdup(error);
|
signal->signal_data.error.error = g_strdup(error);
|
||||||
|
|
||||||
gst_object_ref (GST_OBJECT(orig));
|
gst_object_ref (GST_OBJECT(orig));
|
||||||
|
|
||||||
g_async_queue_push(play->signal_queue, signal);
|
g_async_queue_push(play->signal_queue, signal);
|
||||||
|
|
||||||
|
if (GST_IS_ELEMENT(play->pipeline))
|
||||||
|
gst_element_set_state(play->pipeline, GST_STATE_READY);
|
||||||
|
|
||||||
play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
|
play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,8 +478,6 @@ callback_pipeline_state_change ( GstElement *element,
|
||||||
g_return_if_fail (GST_IS_PLAY (play));
|
g_return_if_fail (GST_IS_PLAY (play));
|
||||||
g_return_if_fail (element == play->pipeline);
|
g_return_if_fail (element == play->pipeline);
|
||||||
|
|
||||||
/*g_print ("got state change %s to %s\n", gst_element_state_get_name (old), gst_element_state_get_name (state));*/
|
|
||||||
|
|
||||||
/* do additional stuff depending on state */
|
/* do additional stuff depending on state */
|
||||||
if (GST_IS_PIPELINE (play->pipeline)){
|
if (GST_IS_PIPELINE (play->pipeline)){
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
|
Loading…
Reference in a new issue