diff --git a/ChangeLog b/ChangeLog index d484c0a9ca..bac54f6097 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2004-01-11 David Schleef + + * ext/divx/gstdivxenc.c: remove bogus gst_caps_is_fixed() test + * gst/debug/efence.c: (gst_efence_chain), (gst_fenced_buffer_new), + (gst_fenced_buffer_default_copy): Fix for rename of buffer private + structure members. + * gst/effectv/gstwarp.c: (gst_warptv_setup): Don't reset the time + value during a resize/renegotiation. + * gst/videofilter/gstvideofilter.c: (gst_videofilter_chain): use + gst_pad_alloc_buffer(); + * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_get), + (gst_v4lmjpegsrc_buffer_free): Fix for rename of buffer private + structure members. + * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get), (gst_v4lsrc_buffer_free): + Fix for rename of buffer private structure members. + * sys/ximage/ximagesink.c: (gst_ximagesink_chain), + (gst_ximagesink_buffer_free), (gst_ximagesink_buffer_alloc): + Fix for rename of buffer private structure members. + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_chain), + (gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc): + Fix for rename of buffer private structure members. + 2004-01-11 Arwed v. Merkatz reviewed by: David Schleef diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c index 39c40f1b0a..d26014d984 100644 --- a/gst-libs/gst/video/gstvideofilter.c +++ b/gst-libs/gst/video/gstvideofilter.c @@ -329,11 +329,10 @@ gst_videofilter_chain (GstPad *pad, GstData *_data) size, videofilter->from_buf_size); } - outbuf = gst_buffer_new(); - /* FIXME: handle bufferpools */ - GST_BUFFER_SIZE(outbuf) = videofilter->to_buf_size; - GST_BUFFER_DATA(outbuf) = g_malloc (videofilter->to_buf_size); + outbuf = gst_pad_alloc_buffer(videofilter->srcpad, GST_BUFFER_OFFSET_NONE, + videofilter->to_buf_size); GST_BUFFER_TIMESTAMP(outbuf) = GST_BUFFER_TIMESTAMP(buf); + GST_BUFFER_DURATION(outbuf) = GST_BUFFER_DURATION(buf); g_return_if_fail(videofilter->format); GST_DEBUG ("format %s",videofilter->format->fourcc); diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 07aeb3dee6..00304906dc 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -579,7 +579,7 @@ gst_v4lmjpegsrc_get (GstPad *pad) buf = gst_buffer_new (); GST_DATA (buf)->free = gst_v4lmjpegsrc_buffer_free; - buf->pool = v4lmjpegsrc; + GST_BUFFER_PRIVATE (buf) = v4lmjpegsrc; GST_BUFFER_DATA(buf) = gst_v4lmjpegsrc_get_buffer(v4lmjpegsrc, num); GST_BUFFER_SIZE(buf) = v4lmjpegsrc->last_size; GST_BUFFER_MAXSIZE(buf) = v4lmjpegsrc->breq.size; @@ -795,7 +795,7 @@ static void gst_v4lmjpegsrc_buffer_free (GstData *data) { GstBuffer *buf = GST_BUFFER (data); - GstV4lMjpegSrc *v4lmjpegsrc = GST_V4LMJPEGSRC (buf->pool); + GstV4lMjpegSrc *v4lmjpegsrc = GST_V4LMJPEGSRC (GST_BUFFER_PRIVATE (buf)); int n; if (gst_element_get_state(GST_ELEMENT(v4lmjpegsrc)) != GST_STATE_PLAYING) diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index e60e04361d..024bf44607 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -655,7 +655,7 @@ gst_v4lsrc_get (GstPad *pad) buf = gst_buffer_new (); GST_DATA (buf)->free = gst_v4lsrc_buffer_free; - buf->pool = v4lsrc; /* hack to re-queue buffer on 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); GST_BUFFER_MAXSIZE (buf) = v4lsrc->mbuf.size / v4lsrc->mbuf.frames; @@ -814,7 +814,7 @@ static void gst_v4lsrc_buffer_free (GstData *data) { GstBuffer *buf = GST_BUFFER (data); - GstV4lSrc *v4lsrc = GST_V4LSRC (buf->pool); + GstV4lSrc *v4lsrc = GST_V4LSRC (GST_BUFFER_PRIVATE (buf)); int n; if (gst_element_get_state(GST_ELEMENT(v4lsrc)) != GST_STATE_PLAYING) diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index fda9c89a80..dfbe46420c 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -738,9 +738,10 @@ gst_ximagesink_chain (GstPad *pad, GstData *data) /* If this buffer has been allocated using our buffer management we simply put the ximage which is in the PRIVATE pointer */ - if (GST_BUFFER_BUFFERPOOL (buf) == ximagesink) + if (GST_BUFFER_PRIVATE (buf) == ximagesink) { - gst_ximagesink_ximage_put (ximagesink, GST_BUFFER_POOL_PRIVATE (buf)); + GstXImage * image = buf->_gst_reserved[0]; + gst_ximagesink_ximage_put (ximagesink, image); } else /* Else we have to copy the data into our private image, */ { /* if we have one... */ @@ -778,9 +779,9 @@ gst_ximagesink_buffer_free (GstData *data) GstXImage *ximage; GstBuffer *buffer; - ximagesink = GST_BUFFER_BUFFERPOOL (data); - ximage = GST_BUFFER_POOL_PRIVATE (data); + ximagesink = GST_BUFFER_PRIVATE (data); buffer = GST_BUFFER (data); + ximage = buffer->_gst_reserved[0]; /* If our geometry changed we can't reuse that image. */ if ( (ximage->width != GST_VIDEOSINK_WIDTH (ximagesink)) || @@ -848,9 +849,8 @@ gst_ximagesink_buffer_alloc (GstPad *pad, guint64 offset, guint size) { buffer = gst_buffer_new (); - /* Storing some pointers in the buffer (bit hackish) */ - GST_BUFFER_BUFFERPOOL (buffer) = ximagesink; - GST_BUFFER_POOL_PRIVATE (buffer) = ximage; + GST_BUFFER_PRIVATE (buffer) = ximagesink; + buffer->_gst_reserved[0] = (void *)ximage; GST_BUFFER_DATA (buffer) = ximage->ximage->data; GST_DATA_FREE_FUNC (buffer) = gst_ximagesink_buffer_free; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 13f5ae61fb..b1632e1728 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -898,8 +898,8 @@ gst_xvimagesink_chain (GstPad *pad, GstData *data) /* If this buffer has been allocated using our buffer management we simply put the ximage which is in the PRIVATE pointer */ - if (GST_BUFFER_BUFFERPOOL (buf) == xvimagesink) - gst_xvimagesink_xvimage_put (xvimagesink, GST_BUFFER_POOL_PRIVATE (buf)); + if (GST_BUFFER_PRIVATE (buf) == xvimagesink) + gst_xvimagesink_xvimage_put (xvimagesink, buf->_gst_reserved[0]); else /* Else we have to copy the data into our private image, */ { /* if we have one... */ if (xvimagesink->xvimage) @@ -936,9 +936,9 @@ gst_xvimagesink_buffer_free (GstData *data) GstXvImage *xvimage; GstBuffer *buffer; - xvimagesink = GST_BUFFER_BUFFERPOOL (data); - xvimage = GST_BUFFER_POOL_PRIVATE (data); + xvimagesink = GST_BUFFER_PRIVATE (data); buffer = GST_BUFFER (data); + xvimage = buffer->_gst_reserved[0]; /* If our geometry changed we can't reuse that image. */ if ( (xvimage->width != GST_VIDEOSINK_WIDTH (xvimagesink)) || @@ -1008,8 +1008,8 @@ gst_xvimagesink_buffer_alloc (GstPad *pad, guint64 offset, guint size) buffer = gst_buffer_new (); /* Storing some pointers in the buffer (bit hackish) */ - GST_BUFFER_BUFFERPOOL (buffer) = xvimagesink; - GST_BUFFER_POOL_PRIVATE (buffer) = xvimage; + GST_BUFFER_PRIVATE (buffer) = xvimagesink; + buffer->_gst_reserved[0] = xvimage; GST_BUFFER_DATA (buffer) = xvimage->xvimage->data; GST_DATA_FREE_FUNC (buffer) = gst_xvimagesink_buffer_free;