From 6a5df541a6f91efa6b105aafc091080681f52af6 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 12 Jan 2004 03:21:40 +0000 Subject: [PATCH] Fixes to make ext/libcaca compile. Original commit message from CVS: * configure.ac: * ext/Makefile.am: Fixes to make ext/libcaca compile. * ext/divx/gstdivxdec.c: * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_link), (gst_gdk_pixbuf_init), (gst_gdk_pixbuf_chain): Make gdkpixbufdec handle images that span multiple buffers. Now work with both filesrc ! gdkpixbufdec and qtdemux ! gdkpixbufdec. * ext/gdk_pixbuf/gstgdkpixbuf.h: * ext/libcaca/gstcacasink.h: Fixes needed due to recent video/video.h changes * ext/xvid/gstxvid.c: (gst_xvid_csp_to_caps): same * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_get), (gst_v4lmjpegsrc_buffer_free): Use buffer free function instead of GstData free function. * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get), (gst_v4lsrc_buffer_free): same. --- ChangeLog | 19 +++++++++++++++++++ ext/Makefile.am | 8 ++++++++ sys/v4l/gstv4lmjpegsrc.c | 10 +++------- sys/v4l/gstv4lsrc.c | 10 +++------- 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index ffc35c4..1be20b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2004-01-11 David Schleef + + * configure.ac: + * ext/Makefile.am: Fixes to make ext/libcaca compile. + * ext/divx/gstdivxdec.c: + * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_link), + (gst_gdk_pixbuf_init), (gst_gdk_pixbuf_chain): Make gdkpixbufdec + handle images that span multiple buffers. Now work with both + filesrc ! gdkpixbufdec and qtdemux ! gdkpixbufdec. + * ext/gdk_pixbuf/gstgdkpixbuf.h: + * ext/libcaca/gstcacasink.h: Fixes needed due to recent + video/video.h changes + * ext/xvid/gstxvid.c: (gst_xvid_csp_to_caps): same + * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_get), + (gst_v4lmjpegsrc_buffer_free): Use buffer free function instead + of GstData free function. + * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get), (gst_v4lsrc_buffer_free): + same. + 2004-01-12 Benjamin Otte * sys/v4l2/gstv4l2element.c: (gst_v4l2element_class_init), diff --git a/ext/Makefile.am b/ext/Makefile.am index ec6955b..a5e112c 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -154,6 +154,12 @@ else LCS_DIR= endif +if USE_LIBCACA +LIBCACA_DIR=libcaca +else +LIBCACA_DIR= +endif + if USE_LIBDV LIBDV_DIR=dv else @@ -323,6 +329,7 @@ SUBDIRS=\ $(LADSPA_DIR) \ $(LAME_DIR) \ $(LCS_DIR) \ + $(LIBCACA_DIR) \ $(LIBDV_DIR) \ $(LIBFAME_DIR) \ $(LIBPNG_DIR) \ @@ -376,6 +383,7 @@ DIST_SUBDIRS=\ ladspa \ lame \ lcs \ + libcaca \ libfame \ libpng \ librfb \ diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 0030490..ad16fe0 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -103,7 +103,7 @@ static void gst_v4lmjpegsrc_set_clock (GstElement *eleme static GstElementStateReturn gst_v4lmjpegsrc_change_state (GstElement *element); /* requeue buffer after use */ -static void gst_v4lmjpegsrc_buffer_free (GstData *data); +static void gst_v4lmjpegsrc_buffer_free (GstBuffer *buffer); static GstElementClass *parent_class = NULL; static guint gst_v4lmjpegsrc_signals[LAST_SIGNAL] = { 0 }; @@ -578,7 +578,7 @@ gst_v4lmjpegsrc_get (GstPad *pad) } buf = gst_buffer_new (); - GST_DATA (buf)->free = gst_v4lmjpegsrc_buffer_free; + GST_BUFFER_FREE_DATA_FUNC (buf) = gst_v4lmjpegsrc_buffer_free; GST_BUFFER_PRIVATE (buf) = v4lmjpegsrc; GST_BUFFER_DATA(buf) = gst_v4lmjpegsrc_get_buffer(v4lmjpegsrc, num); GST_BUFFER_SIZE(buf) = v4lmjpegsrc->last_size; @@ -792,9 +792,8 @@ gst_v4lmjpegsrc_buffer_new (GstBufferPool *pool, #endif static void -gst_v4lmjpegsrc_buffer_free (GstData *data) +gst_v4lmjpegsrc_buffer_free (GstBuffer *buf) { - GstBuffer *buf = GST_BUFFER (data); GstV4lMjpegSrc *v4lmjpegsrc = GST_V4LMJPEGSRC (GST_BUFFER_PRIVATE (buf)); int n; @@ -814,7 +813,4 @@ gst_v4lmjpegsrc_buffer_free (GstData *data) if (n == v4lmjpegsrc->breq.count) gst_element_error(GST_ELEMENT(v4lmjpegsrc), "Couldn't find the buffer"); - - /* free the buffer struct et all */ - gst_buffer_default_free(buf); } diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index 78d2aba..6885dca 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -95,7 +95,7 @@ static void gst_v4lsrc_set_clock (GstElement *element, GstClock *clock); /* requeue buffer if it's back available */ -static void gst_v4lsrc_buffer_free (GstData *data); +static void gst_v4lsrc_buffer_free (GstBuffer *buffer); static GstElementClass *parent_class = NULL; static guint gst_v4lsrc_signals[LAST_SIGNAL] = { 0 }; @@ -653,7 +653,7 @@ gst_v4lsrc_get (GstPad *pad) } buf = gst_buffer_new (); - GST_DATA (buf)->free = gst_v4lsrc_buffer_free; + GST_BUFFER_FREE_DATA_FUNC (buf) = gst_v4lsrc_buffer_free; GST_BUFFER_PRIVATE (buf) = v4lsrc; /* hack to re-queue buffer on free */ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_READONLY | GST_BUFFER_DONTFREE); GST_BUFFER_DATA(buf) = gst_v4lsrc_get_buffer(v4lsrc, num); @@ -810,9 +810,8 @@ gst_v4lsrc_buffer_new (GstBufferPool *pool, #endif static void -gst_v4lsrc_buffer_free (GstData *data) +gst_v4lsrc_buffer_free (GstBuffer *buf) { - GstBuffer *buf = GST_BUFFER (data); GstV4lSrc *v4lsrc = GST_V4LSRC (GST_BUFFER_PRIVATE (buf)); int n; @@ -832,9 +831,6 @@ gst_v4lsrc_buffer_free (GstData *data) if (n == v4lsrc->mbuf.frames) gst_element_error(GST_ELEMENT(v4lsrc), "Couldn\'t find the buffer"); - - /* free struct */ - gst_buffer_default_free(buf); } -- 2.7.4