result = gst_buffer_new ();
gst_buffer_take_memory (result, -1,
- gst_memory_new_wrapped (0, data, g_free, len, 0, len));
+ gst_memory_new_wrapped (0, data, len, 0, len, data, g_free));
return result;
}
gst_rtcp_buffer_new (guint mtu)
{
GstBuffer *result;
+ guint8 *data;
g_return_val_if_fail (mtu > 0, NULL);
+ data = g_malloc0 (mtu);
+
result = gst_buffer_new ();
gst_buffer_take_memory (result, -1,
- gst_memory_new_wrapped (0, g_malloc0 (mtu), g_free, mtu, 0, 0));
+ gst_memory_new_wrapped (0, data, mtu, 0, 0, data, g_free));
return result;
}
result = gst_buffer_new ();
gst_buffer_take_memory (result, -1,
- gst_memory_new_wrapped (0, data, g_free, len, 0, len));
+ gst_memory_new_wrapped (0, data, len, 0, len, data, g_free));
return result;
}
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, count, 0, count));
+ gst_memory_new_wrapped (0, data, count, 0, count, data, g_free));
data = NULL;
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_APPEND, tag->gst_tag,
buffer = gst_buffer_new ();
gst_buffer_take_memory (buffer, -1,
- gst_memory_new_wrapped (0, bdata, g_free, bsize, 0, bsize));
+ gst_memory_new_wrapped (0, bdata, bsize, 0, bsize, bdata, g_free));
return buffer;
}
GST_LOG_OBJECT (this, "creating GDP header and payload buffer from caps");
headerbuf = gst_buffer_new ();
gst_buffer_take_memory (headerbuf, -1,
- gst_memory_new_wrapped (0, header, g_free, len, 0, len));
+ gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
payloadbuf = gst_buffer_new ();
plen = gst_dp_header_payload_length (header);
gst_buffer_take_memory (payloadbuf, -1,
- gst_memory_new_wrapped (0, payload, g_free, plen, 0, plen));
+ gst_memory_new_wrapped (0, payload, plen, 0, plen, payload, g_free));
return gst_buffer_join (headerbuf, payloadbuf);
GST_LOG_OBJECT (this, "creating GDP header and payload buffer from buffer");
headerbuf = gst_buffer_new ();
gst_buffer_take_memory (headerbuf, -1,
- gst_memory_new_wrapped (0, header, g_free, len, 0, len));
+ gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
/* we do not want to lose the ref on the incoming buffer */
gst_buffer_ref (buffer);
GST_LOG_OBJECT (this, "creating GDP header and payload buffer from event");
headerbuf = gst_buffer_new ();
gst_buffer_take_memory (headerbuf, -1,
- gst_memory_new_wrapped (0, header, g_free, len, 0, len));
+ gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
payloadbuf = gst_buffer_new ();
plen = gst_dp_header_payload_length (header);
if (plen && payload != NULL) {
gst_buffer_take_memory (payloadbuf, -1,
- gst_memory_new_wrapped (0, payload, g_free, plen, 0, plen));
+ gst_memory_new_wrapped (0, payload, plen, 0, plen, payload, g_free));
}
return gst_buffer_join (headerbuf, payloadbuf);
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, meta->ximage->data,
- NULL, meta->size, 0, meta->size));
+ meta->size, 0, meta->size, NULL, NULL));
g_mutex_unlock (ximagesink->x_lock);
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, meta->xvimage->data,
- NULL, meta->size, 0, meta->size));
+ meta->size, 0, meta->size, NULL, NULL));
g_mutex_unlock (xvimagesink->x_lock);
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, 0,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) dummytext, NULL, sizeof (dummytext), 0,
- sizeof (dummytext)));
+ (gpointer) dummytext, sizeof (dummytext), 0,
+ sizeof (dummytext), NULL, NULL));
GST_BUFFER_OFFSET (buf) = 0;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) s, NULL, len, 0, len));
+ (gpointer) s, len, 0, len, NULL, NULL));
return buf;
}
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) qt_redirect_396042, NULL,
- sizeof (qt_redirect_396042), 0, sizeof (qt_redirect_396042)));
+ (gpointer) qt_redirect_396042,
+ sizeof (qt_redirect_396042), 0, sizeof (qt_redirect_396042), NULL,
+ NULL));
GST_BUFFER_OFFSET (buf) = 0;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) flac_id_packet, NULL,
- sizeof (flac_id_packet), 0, sizeof (flac_id_packet)));
+ (gpointer) flac_id_packet,
+ sizeof (flac_id_packet), 0, sizeof (flac_id_packet), NULL, NULL));
GST_BUFFER_OFFSET (buf) = 0;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) data, NULL, data_len, 0, data_len));
+ (gpointer) data, data_len, 0, data_len, NULL, NULL));
GST_BUFFER_OFFSET (buf) = 0;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- data, NULL, TEST_RANDOM_DATA_SIZE, 0, TEST_RANDOM_DATA_SIZE));
+ data, TEST_RANDOM_DATA_SIZE, 0, TEST_RANDOM_DATA_SIZE, NULL, NULL));
GST_BUFFER_OFFSET (buf) = 0;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_TIME);
s.start = 4 * GST_SECOND;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_TIME);
s.start = 4 * GST_SECOND;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_TIME);
s.start = 2 * GST_SECOND;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_TIME);
s.start = 12 * GST_SECOND;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_TIME);
s.start = 4 * GST_SECOND;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_TIME);
s.start = 0 * GST_SECOND;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_PERCENT);
s.start = 0;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_DEFAULT);
s.start = 400;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_DEFAULT);
s.start = 400;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_DEFAULT);
s.start = 200;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_DEFAULT);
s.start = 1200;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_DEFAULT);
s.start = 400;
buf = gst_buffer_new ();
data = (guint8 *) g_malloc (1000);
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, data, g_free, 1000, 0, 1000));
+ gst_memory_new_wrapped (0, data, 1000, 0, 1000, data, g_free));
gst_segment_init (&s, GST_FORMAT_DEFAULT);
s.start = 0;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) speex_comments_buf1, NULL,
- sizeof (speex_comments_buf1), 0, sizeof (speex_comments_buf1)));
+ (gpointer) speex_comments_buf1,
+ sizeof (speex_comments_buf1), 0, sizeof (speex_comments_buf1), NULL,
+ NULL));
/* make sure it doesn't memcmp over the end of the buffer */
fail_unless (gst_tag_list_from_vorbiscomment_buffer (buf,
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- (gpointer) vorbis_comments_buf, NULL,
- sizeof (vorbis_comments_buf), 0, sizeof (vorbis_comments_buf)));
+ (gpointer) vorbis_comments_buf,
+ sizeof (vorbis_comments_buf), 0, sizeof (vorbis_comments_buf), NULL,
+ NULL));
/* make sure it doesn't memcmp over the end of the buffer */
fail_unless (gst_tag_list_from_vorbiscomment_buffer (buf,
buf = gst_buffer_new ();
len = strlen (text) + 1;
gst_buffer_take_memory (buf, -1,
- gst_memory_new_wrapped (0, text, NULL, len, 0, len));
+ gst_memory_new_wrapped (0, text, len, 0, len, NULL, NULL));
list = gst_tag_list_from_xmp_buffer (buf);
if (test_data[i].result_size >= 0) {
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- app->data, NULL, app->length, app->offset, size));
+ app->data, app->length, app->offset, size, NULL, NULL));
/* we need to set an offset for random access */
GST_BUFFER_OFFSET (buffer) = app->offset;
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- app->data, NULL, app->length, app->offset, len));
+ app->data, app->length, app->offset, len, NULL, NULL));
GST_DEBUG ("feed buffer %p, offset %" G_GUINT64_FORMAT "-%u", buffer,
app->offset, len);
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- app->data, NULL, app->length, app->offset, len));
+ app->data, app->length, app->offset, len, NULL, NULL));
GST_DEBUG ("feed buffer %p, offset %" G_GUINT64_FORMAT "-%u", buffer,
app->offset, len);
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
- app->data, NULL, app->length, app->offset, len));
+ app->data, app->length, app->offset, len, NULL, NULL));
GST_DEBUG ("feed buffer %p, offset %" G_GUINT64_FORMAT "-%u", buffer,
app->offset, len);