+2004-01-11 David Schleef <ds@schleef.org>
+
+ * 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 <v.merkatz@gmx.net>
reviewed by: David Schleef <ds@schleef.org>
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);
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;
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)
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;
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)
/* 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... */
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)) ||
{
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;
/* 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)
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)) ||
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;