mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 08:08:22 +00:00
-base: update for buffer API change
This commit is contained in:
parent
7538dffaa0
commit
9c54ca5254
11 changed files with 15 additions and 15 deletions
|
@ -70,7 +70,7 @@ gst_rtcp_buffer_new_take_data (gpointer data, guint len)
|
|||
g_return_val_if_fail (len > 0, NULL);
|
||||
|
||||
result = gst_buffer_new ();
|
||||
gst_buffer_take_memory (result,
|
||||
gst_buffer_take_memory (result, -1,
|
||||
gst_memory_new_wrapped (0, data, g_free, len, 0, len));
|
||||
|
||||
return result;
|
||||
|
@ -233,7 +233,7 @@ gst_rtcp_buffer_new (guint mtu)
|
|||
g_return_val_if_fail (mtu > 0, NULL);
|
||||
|
||||
result = gst_buffer_new ();
|
||||
gst_buffer_take_memory (result,
|
||||
gst_buffer_take_memory (result, -1,
|
||||
gst_memory_new_wrapped (0, g_malloc0 (mtu), g_free, mtu, 0, mtu));
|
||||
|
||||
return result;
|
||||
|
|
|
@ -126,7 +126,7 @@ gst_rtp_buffer_allocate_data (GstBuffer * buffer, guint payload_len,
|
|||
GST_RTP_HEADER_SSRC (data) = 0;
|
||||
gst_memory_unmap (mem, data, len);
|
||||
|
||||
gst_buffer_take_memory (buffer, mem);
|
||||
gst_buffer_take_memory (buffer, -1, mem);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,7 +149,7 @@ gst_rtp_buffer_new_take_data (gpointer data, gsize len)
|
|||
g_return_val_if_fail (len > 0, NULL);
|
||||
|
||||
result = gst_buffer_new ();
|
||||
gst_buffer_take_memory (result,
|
||||
gst_buffer_take_memory (result, -1,
|
||||
gst_memory_new_wrapped (0, data, g_free, len, 0, len));
|
||||
|
||||
return result;
|
||||
|
|
|
@ -1285,7 +1285,7 @@ parse_exif_undefined_tag (GstExifReader * reader, const GstExifTagMatch * tag,
|
|||
GstBuffer *buf;
|
||||
|
||||
buf = gst_buffer_new ();
|
||||
gst_buffer_take_memory (buf,
|
||||
gst_buffer_take_memory (buf, -1,
|
||||
gst_memory_new_wrapped (0, data, g_free, count, 0, count));
|
||||
data = NULL;
|
||||
|
||||
|
|
|
@ -1866,7 +1866,7 @@ gst_tag_list_to_xmp_buffer_full (const GstTagList * list, gboolean read_only,
|
|||
bdata = g_string_free (data, FALSE);
|
||||
|
||||
buffer = gst_buffer_new ();
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (0, bdata, g_free, bsize, 0, bsize));
|
||||
|
||||
return buffer;
|
||||
|
|
|
@ -257,7 +257,7 @@ gst_gdp_pay_buffer_from_buffer (GstGDPPay * this, GstBuffer * buffer)
|
|||
|
||||
GST_LOG_OBJECT (this, "creating GDP header and payload buffer from buffer");
|
||||
headerbuf = gst_buffer_new ();
|
||||
gst_buffer_take_memory (headerbuf,
|
||||
gst_buffer_take_memory (headerbuf, -1,
|
||||
gst_memory_new_wrapped (0, header, g_free, len, 0, len));
|
||||
|
||||
/* we do not want to lose the ref on the incoming buffer */
|
||||
|
@ -290,13 +290,13 @@ gst_gdp_buffer_from_event (GstGDPPay * this, GstEvent * event)
|
|||
|
||||
GST_LOG_OBJECT (this, "creating GDP header and payload buffer from event");
|
||||
headerbuf = gst_buffer_new ();
|
||||
gst_buffer_take_memory (headerbuf,
|
||||
gst_buffer_take_memory (headerbuf, -1,
|
||||
gst_memory_new_wrapped (0, header, g_free, len, 0, len));
|
||||
|
||||
payloadbuf = gst_buffer_new ();
|
||||
plen = gst_dp_header_payload_length (header);
|
||||
if (plen && payload != NULL) {
|
||||
gst_buffer_take_memory (payloadbuf,
|
||||
gst_buffer_take_memory (payloadbuf, -1,
|
||||
gst_memory_new_wrapped (0, payload, g_free, plen, 0, plen));
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ gst_buffer_add_meta_ximage (GstBuffer * buffer, GstXImageSink * ximagesink,
|
|||
error_caught = FALSE;
|
||||
XSetErrorHandler (handler);
|
||||
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, meta->ximage->data,
|
||||
NULL, meta->size, 0, meta->size));
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ gst_buffer_add_meta_xvimage (GstBuffer * buffer, GstXvImageSink * xvimagesink,
|
|||
error_caught = FALSE;
|
||||
XSetErrorHandler (handler);
|
||||
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, meta->xvimage->data,
|
||||
NULL, meta->size, 0, meta->size));
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ feed_data (GstElement * appsrc, guint size, App * app)
|
|||
if (app->offset + size > app->length)
|
||||
size = app->length - app->offset;
|
||||
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
|
||||
app->data, NULL, app->length, app->offset, size));
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ feed_data (GstElement * appsrc, guint size, App * app)
|
|||
if (app->offset + len > app->length)
|
||||
len = app->length - app->offset;
|
||||
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
|
||||
app->data, NULL, app->length, app->offset, len));
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ read_data (App * app)
|
|||
if (app->offset + len > app->length)
|
||||
len = app->length - app->offset;
|
||||
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
|
||||
app->data, NULL, app->length, app->offset, len));
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ feed_data (GstElement * appsrc, guint size, App * app)
|
|||
if (app->offset + len > app->length)
|
||||
len = app->length - app->offset;
|
||||
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_buffer_take_memory (buffer, -1,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
|
||||
app->data, NULL, app->length, app->offset, len));
|
||||
|
||||
|
|
Loading…
Reference in a new issue