configure.ac: In the output at the end, don't show the first plugin on the same line as "Core plug-ins, always built:".

Original commit message from CVS:
* configure.ac:
In the output at the end, don't show the first plugin on the same
line as "Core plug-ins, always built:".
Indent the output as for other plugin categories
* gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_create):
#define that can be used to not use peer buffer_alloc functions for
test purposes.
* sys/ximage/ximagesink.c: (gst_ximage_buffer_init),
(gst_ximage_buffer_get_type), (gst_ximagesink_ximage_new),
(gst_ximagesink_show_frame):
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_init),
(gst_xvimage_buffer_get_type), (gst_xvimagesink_setcaps),
(gst_xvimagesink_show_frame):
Error case handling fixes. gst-launch fakesrc ! x[v]imagesink now
fails gracefully instead of XError aborting or deadlocking.
This commit is contained in:
Jan Schmidt 2005-09-06 23:26:49 +00:00
parent 3e8ada2cfe
commit 71ab6314a1
5 changed files with 41 additions and 11 deletions

View file

@ -1,3 +1,21 @@
2005-09-07 Jan Schmidt <thaytan@mad.scientist.com>
* configure.ac:
In the output at the end, don't show the first plugin on the same
line as "Core plug-ins, always built:".
Indent the output as for other plugin categories
* gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_create):
#define that can be used to not use peer buffer_alloc functions for
test purposes.
* sys/ximage/ximagesink.c: (gst_ximage_buffer_init),
(gst_ximage_buffer_get_type), (gst_ximagesink_ximage_new),
(gst_ximagesink_show_frame):
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_init),
(gst_xvimage_buffer_get_type), (gst_xvimagesink_setcaps),
(gst_xvimagesink_show_frame):
Error case handling fixes. gst-launch fakesrc ! x[v]imagesink now
fails gracefully instead of XError aborting or deadlocking.
2005-09-07 Stefan Kost <ensonic@users.sf.net> 2005-09-07 Stefan Kost <ensonic@users.sf.net>
* ext/libvisual/Makefile.am: * ext/libvisual/Makefile.am:

View file

@ -867,8 +867,8 @@ m4/Makefile
) )
AC_OUTPUT AC_OUTPUT
echo -n "configure: *** Core plug-ins, always built:" echo "configure: *** Core plug-ins, always built:"
( for i in $GST_PLUGINS_ALL; do echo $i; done ) | sort ( for i in $GST_PLUGINS_ALL; do echo -e '\t'$i; done ) | sort
echo echo
echo -n "configure: *** Plug-ins relying on libraries that will be built:" echo -n "configure: *** Plug-ins relying on libraries that will be built:"
echo -e "$GST_PLUGINS_YES" | sort echo -e "$GST_PLUGINS_YES" | sort

View file

@ -29,6 +29,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <liboil/liboil.h> #include <liboil/liboil.h>
#define USE_PEER_BUFFERALLOC
GST_DEBUG_CATEGORY (videotestsrc_debug); GST_DEBUG_CATEGORY (videotestsrc_debug);
#define GST_CAT_DEFAULT videotestsrc_debug #define GST_CAT_DEFAULT videotestsrc_debug
@ -402,11 +403,20 @@ gst_videotestsrc_create (GstPushSrc * psrc, GstBuffer ** buffer)
GST_LOG_OBJECT (videotestsrc, "creating buffer of %ld bytes for %dx%d image", GST_LOG_OBJECT (videotestsrc, "creating buffer of %ld bytes for %dx%d image",
newsize, videotestsrc->width, videotestsrc->height); newsize, videotestsrc->width, videotestsrc->height);
#ifdef USE_PEER_BUFFERALLOC
res = res =
gst_pad_alloc_buffer (GST_BASE_SRC_PAD (psrc), GST_BUFFER_OFFSET_NONE, gst_pad_alloc_buffer (GST_BASE_SRC_PAD (psrc), GST_BUFFER_OFFSET_NONE,
newsize, GST_PAD_CAPS (GST_BASE_SRC_PAD (psrc)), &outbuf); newsize, GST_PAD_CAPS (GST_BASE_SRC_PAD (psrc)), &outbuf);
if (res != GST_FLOW_OK) if (res != GST_FLOW_OK)
goto no_buffer; goto no_buffer;
#else
res = GST_FLOW_OK;
outbuf = gst_buffer_new_and_alloc (newsize);
if (outbuf == NULL)
goto no_buffer;
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (GST_BASE_SRC_PAD (psrc)));
#endif
videotestsrc->make_image (videotestsrc, (void *) GST_BUFFER_DATA (outbuf), videotestsrc->make_image (videotestsrc, (void *) GST_BUFFER_DATA (outbuf),
videotestsrc->width, videotestsrc->height); videotestsrc->width, videotestsrc->height);

View file

@ -141,9 +141,10 @@ gst_ximage_buffer_finalize (GstXImageBuffer * ximage_buffer)
} }
static void static void
gst_ximage_buffer_init (GTypeInstance * instance, gpointer g_class) gst_ximage_buffer_init (GstXImageBuffer * ximage_buffer, gpointer g_class)
{ {
ximage_buffer->SHMInfo.shmaddr = ((void *) -1);
ximage_buffer->SHMInfo.shmid = -1;
} }
static void static void
@ -170,7 +171,7 @@ gst_ximage_buffer_get_type (void)
NULL, NULL,
sizeof (GstXImageBuffer), sizeof (GstXImageBuffer),
0, 0,
gst_ximage_buffer_init, (GInstanceInitFunc) gst_ximage_buffer_init,
NULL NULL
}; };
_gst_ximage_buffer_type = g_type_register_static (GST_TYPE_BUFFER, _gst_ximage_buffer_type = g_type_register_static (GST_TYPE_BUFFER,
@ -354,9 +355,9 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, gint width, gint height)
GST_BUFFER_DATA (ximage) = (guchar *) ximage->ximage->data; GST_BUFFER_DATA (ximage) = (guchar *) ximage->ximage->data;
GST_BUFFER_SIZE (ximage) = ximage->size; GST_BUFFER_SIZE (ximage) = ximage->size;
beach:
g_mutex_unlock (ximagesink->x_lock); g_mutex_unlock (ximagesink->x_lock);
beach:
if (!succeeded) { if (!succeeded) {
gst_buffer_unref (GST_BUFFER (ximage)); gst_buffer_unref (GST_BUFFER (ximage));
ximage = NULL; ximage = NULL;
@ -1253,7 +1254,7 @@ no_ximage:
{ {
/* No image available. That's very bad ! */ /* No image available. That's very bad ! */
g_mutex_unlock (ximagesink->stream_lock); g_mutex_unlock (ximagesink->stream_lock);
gst_buffer_unref (buf); GST_DEBUG ("could not create image");
GST_ELEMENT_ERROR (ximagesink, CORE, NEGOTIATION, (NULL), GST_ELEMENT_ERROR (ximagesink, CORE, NEGOTIATION, (NULL),
("Failed creating an XImage in ximagesink chain function.")); ("Failed creating an XImage in ximagesink chain function."));
return GST_FLOW_ERROR; return GST_FLOW_ERROR;

View file

@ -202,8 +202,10 @@ gst_xvimage_buffer_free (GstXvImageBuffer * xvimage)
} }
static void static void
gst_xvimage_buffer_init (GTypeInstance * instance, gpointer g_class) gst_xvimage_buffer_init (GstXvImageBuffer * xvimage, gpointer g_class)
{ {
xvimage->SHMInfo.shmaddr = ((void *) -1);
xvimage->SHMInfo.shmid = -1;
} }
static void static void
@ -230,7 +232,7 @@ gst_xvimage_buffer_get_type (void)
NULL, NULL,
sizeof (GstXvImageBuffer), sizeof (GstXvImageBuffer),
0, 0,
gst_xvimage_buffer_init, (GInstanceInitFunc) gst_xvimage_buffer_init,
NULL NULL
}; };
_gst_xvimage_buffer_type = g_type_register_static (GST_TYPE_BUFFER, _gst_xvimage_buffer_type = g_type_register_static (GST_TYPE_BUFFER,
@ -1309,7 +1311,7 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
xvimagesink = GST_XVIMAGESINK (bsink); xvimagesink = GST_XVIMAGESINK (bsink);
GST_DEBUG_OBJECT (xvimagesink, GST_DEBUG_OBJECT (xvimagesink,
"sinkconnect possible caps %" GST_PTR_FORMAT " with given caps %" "In setcaps. Possible caps %" GST_PTR_FORMAT ", setting caps %"
GST_PTR_FORMAT, xvimagesink->xcontext->caps, caps); GST_PTR_FORMAT, xvimagesink->xcontext->caps, caps);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
@ -1548,7 +1550,6 @@ gst_xvimagesink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
no_image: no_image:
{ {
/* No image available. That's very bad ! */ /* No image available. That's very bad ! */
gst_buffer_unref (buf);
GST_DEBUG ("could not create image"); GST_DEBUG ("could not create image");
GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, (NULL), GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, (NULL),
("Failed creating an XvImage in xvimagesink chain function.")); ("Failed creating an XvImage in xvimagesink chain function."));