Commit 4062b810 authored by Julien Moutte Moutte's avatar Julien Moutte Moutte

configure.ac: X_DISPLAY_MISSING is set to 1 if AC_PATH_XTRA fails to find X...

configure.ac: X_DISPLAY_MISSING is set to 1 if AC_PATH_XTRA fails to find X development files. I don't understand the...

Original commit message from CVS:
* configure.ac: X_DISPLAY_MISSING is set to 1 if AC_PATH_XTRA fails to
find X development files. I don't understand the previous tests and
they fail on my debian/ppc unstable. This one works.
* examples/gstplay/player.c: (main): Set the pipeline to READY before
exiting.
* gst-libs/gst/play/gstplay.c: (gst_play_get_length_callback),
(gst_play_set_video_sink), (gst_play_set_audio_sink),
(gst_play_set_visualization): Add some safety checks in set_ methods
and state_change. This was throwing some ugly CRITICAL messages when
pipeline was getting disposed and casts were failing.
parent 967aca77
2003-12-21 Julien MOUTTE <julien@moutte.net>
* configure.ac: X_DISPLAY_MISSING is set to 1 if AC_PATH_XTRA fails to
find X development files. I don't understand the previous tests and
they fail on my debian/ppc unstable. This one works.
* examples/gstplay/player.c: (main): Set the pipeline to READY before
exiting.
* gst-libs/gst/play/gstplay.c: (gst_play_get_length_callback),
(gst_play_set_video_sink), (gst_play_set_audio_sink),
(gst_play_set_visualization): Add some safety checks in set_ methods
and state_change. This was throwing some ugly CRITICAL messages when
pipeline was getting disposed and casts were failing.
2003-12-21 Ronald Bultje <rbultje@ronald.bitfreak.net>
* configure.ac:
......
......@@ -505,7 +505,8 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
GST_CHECK_FEATURE(X, [X libraries and plugins],
[ximagesink], [
AC_PATH_XTRA
if test "x$X_CFLAGS" == "x" -o "$X_CFLAGS" == "-DX_DISPLAY_MISSING"
dnl if test "x$X_CFLAGS" == "x" -o "$X_CFLAGS" == "-DX_DISPLAY_MISSING"
if test "x$X_DISPLAY_MISSING" = "x1"
then
AC_MSG_NOTICE([cannot find X11 development files])
HAVE_X="no"
......
......@@ -149,6 +149,8 @@ main (int argc, char *argv[])
g_main_loop_run (loop);
gst_element_set_state (GST_ELEMENT (play), GST_STATE_READY);
/* unref */
gst_object_unref (GST_OBJECT (play));
......
......@@ -304,8 +304,10 @@ gst_play_get_length_callback (GstPlay *play)
}
/* Audio first and then Video */
q = gst_element_query (audio_sink_element, GST_QUERY_TOTAL, &format, &value);
if (!q)
if (GST_IS_ELEMENT (audio_sink_element))
q = gst_element_query (audio_sink_element, GST_QUERY_TOTAL, &format,
&value);
if ( (!q) && (GST_IS_ELEMENT (video_sink_element)) )
q = gst_element_query (video_sink_element, GST_QUERY_TOTAL, &format,
&value);
......@@ -647,6 +649,8 @@ gst_play_set_video_sink (GstPlay *play, GstElement *video_sink)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
g_return_val_if_fail (video_sink != NULL, FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (video_sink), FALSE);
/* We bring back the pipeline to READY */
if (GST_STATE (GST_ELEMENT (play)) != GST_STATE_READY)
......@@ -703,6 +707,8 @@ gst_play_set_audio_sink (GstPlay *play, GstElement *audio_sink)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
g_return_val_if_fail (audio_sink != NULL, FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (audio_sink), FALSE);
/* We bring back the pipeline to READY */
if (GST_STATE (GST_ELEMENT (play)) != GST_STATE_READY)
......@@ -767,6 +773,8 @@ gst_play_set_visualization (GstPlay *play, GstElement *vis_element)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
g_return_val_if_fail (vis_element != NULL, FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (vis_element), FALSE);
/* We bring back the pipeline to READY */
if (GST_STATE (GST_ELEMENT (play)) == GST_STATE_PLAYING) {
......
......@@ -304,8 +304,10 @@ gst_play_get_length_callback (GstPlay *play)
}
/* Audio first and then Video */
q = gst_element_query (audio_sink_element, GST_QUERY_TOTAL, &format, &value);
if (!q)
if (GST_IS_ELEMENT (audio_sink_element))
q = gst_element_query (audio_sink_element, GST_QUERY_TOTAL, &format,
&value);
if ( (!q) && (GST_IS_ELEMENT (video_sink_element)) )
q = gst_element_query (video_sink_element, GST_QUERY_TOTAL, &format,
&value);
......@@ -647,6 +649,8 @@ gst_play_set_video_sink (GstPlay *play, GstElement *video_sink)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
g_return_val_if_fail (video_sink != NULL, FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (video_sink), FALSE);
/* We bring back the pipeline to READY */
if (GST_STATE (GST_ELEMENT (play)) != GST_STATE_READY)
......@@ -703,6 +707,8 @@ gst_play_set_audio_sink (GstPlay *play, GstElement *audio_sink)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
g_return_val_if_fail (audio_sink != NULL, FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (audio_sink), FALSE);
/* We bring back the pipeline to READY */
if (GST_STATE (GST_ELEMENT (play)) != GST_STATE_READY)
......@@ -767,6 +773,8 @@ gst_play_set_visualization (GstPlay *play, GstElement *vis_element)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
g_return_val_if_fail (vis_element != NULL, FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (vis_element), FALSE);
/* We bring back the pipeline to READY */
if (GST_STATE (GST_ELEMENT (play)) == GST_STATE_PLAYING) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment