mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
make this test compile with the new buffers
Original commit message from CVS: make this test compile with the new buffers
This commit is contained in:
parent
9be26b5152
commit
c9b994f357
3 changed files with 8 additions and 13 deletions
|
@ -118,17 +118,17 @@ gst_buffer_new (void)
|
|||
* Returns: new buffer
|
||||
*/
|
||||
GstBuffer*
|
||||
gst_buffer_new_from_pool (GstBufferPool *pool, guint32 offset, guint32 size)
|
||||
gst_buffer_new_from_pool (gpointer pool, guint32 offset, guint32 size)
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
GstBuffer *buffer = NULL;
|
||||
|
||||
g_return_val_if_fail (pool != NULL, NULL);
|
||||
/*g_return_val_if_fail (pool != NULL, NULL);
|
||||
g_return_val_if_fail (pool->buffer_new != NULL, NULL);
|
||||
|
||||
buffer = pool->buffer_new (pool, offset, size, pool->user_data);
|
||||
buffer->pool = pool;
|
||||
buffer->free = pool->buffer_free;
|
||||
buffer->copy = pool->buffer_copy;
|
||||
buffer->copy = pool->buffer_copy;*/
|
||||
|
||||
GST_INFO (GST_CAT_BUFFER,"creating new buffer %p from pool %p (size %x, offset %x)",
|
||||
buffer, pool, size, offset);
|
||||
|
|
|
@ -95,8 +95,6 @@ typedef void (*GstBufferFreeFunc) (GstBuffer *buf);
|
|||
typedef GstBuffer *(*GstBufferCopyFunc) (GstBuffer *srcbuf);
|
||||
|
||||
|
||||
#include <gst/gstbufferpool.h>
|
||||
|
||||
struct _GstBuffer {
|
||||
GstData data_type;
|
||||
|
||||
|
@ -129,7 +127,7 @@ struct _GstBuffer {
|
|||
GstBuffer *parent;
|
||||
|
||||
/* this is a pointer to the buffer pool (if any) */
|
||||
GstBufferPool *pool;
|
||||
gpointer pool;
|
||||
gpointer pool_private;
|
||||
|
||||
/* utility function pointers */
|
||||
|
@ -141,7 +139,7 @@ struct _GstBuffer {
|
|||
void _gst_buffer_initialize (void);
|
||||
/* creating a new buffer from scratch */
|
||||
GstBuffer* gst_buffer_new (void);
|
||||
GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool, guint32 offset, guint32 size);
|
||||
GstBuffer* gst_buffer_new_from_pool (gpointer pool, guint32 offset, guint32 size);
|
||||
|
||||
/* creating a subbuffer */
|
||||
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint32 offset, guint32 size);
|
||||
|
|
|
@ -9,11 +9,8 @@ main (int argc, char *argv[])
|
|||
gst_init (&argc, &argv);
|
||||
|
||||
for (i=0; i<5000000; i++) {
|
||||
/* buffer API has changed, use default pool with 1024 size buffers */
|
||||
buf = gst_buffer_new (NULL, 1024);
|
||||
/*
|
||||
gst_buffer_unref (buf);
|
||||
*/
|
||||
/* buffer API has changed, use default pool with empty buffers */
|
||||
buf = gst_buffer_new (NULL, 0);
|
||||
gst_data_unref (GST_DATA (buf));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue