Commit 3d61d12e authored by Wim Taymans's avatar Wim Taymans

update for buffer api change

parent df946f60
......@@ -628,7 +628,7 @@ gst_jpegenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
outbuf = gst_buffer_new ();
gst_buffer_copy_into (outbuf, buf, GST_BUFFER_COPY_METADATA, 0, -1);
gst_buffer_take_memory (outbuf, -1, jpegenc->output_mem);
gst_buffer_append_memory (outbuf, jpegenc->output_mem);
jpegenc->output_mem = NULL;
ret = gst_pad_push (jpegenc->srcpad, outbuf);
......
......@@ -1557,7 +1557,7 @@ gst_avi_mux_write_index (GstAviMux * avimux)
data = (guint8 *) avimux->idx;
avimux->idx = NULL; /* will be free()'ed by gst_buffer_unref() */
gst_buffer_take_memory (buffer, -1,
gst_buffer_append_memory (buffer,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
avimux->total_data += size + 8;
......
......@@ -153,7 +153,7 @@ gst_avi_subtitle_extract_file (GstAviSubtitle * sub, GstBuffer * buffer,
ret = gst_buffer_new ();
slen = strlen (utf8);
gst_buffer_take_memory (ret, -1,
gst_buffer_append_memory (ret,
gst_memory_new_wrapped (0, utf8, slen, 0, slen, utf8, g_free));
GST_BUFFER_OFFSET (ret) = 0;
......
......@@ -136,7 +136,7 @@ _gst_buffer_new_wrapped (gpointer mem, gsize size, GFreeFunc free_func)
GstBuffer *buf;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY,
mem, size, 0, size, mem, free_func));
......
......@@ -2907,7 +2907,7 @@ _gst_buffer_new_wrapped (gpointer mem, gsize size, GFreeFunc free_func)
GstBuffer *buf;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY,
mem, size, 0, size, mem, free_func));
......
......@@ -1189,7 +1189,7 @@ _gst_buffer_new_take_data (guint8 * data, guint size)
GstBuffer *buf;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
return buf;
......
......@@ -548,7 +548,7 @@ _gst_buffer_new_wrapped (gpointer mem, gsize size, GFreeFunc free_func)
GstBuffer *buf;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY,
mem, size, 0, size, mem, free_func));
......
......@@ -693,7 +693,7 @@ buffer_list_copy_data (GstBuffer ** buf, guint idx, gpointer data)
GstMemory *mem;
mem = gst_buffer_get_memory (*buf, i);
gst_buffer_take_memory (dest, -1, mem);
gst_buffer_append_memory (dest, mem);
}
return TRUE;
......
......@@ -386,7 +386,7 @@ gst_multi_file_src_create (GstPushSrc * src, GstBuffer ** buffer)
}
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
GST_BUFFER_OFFSET (buf) = multifilesrc->offset;
GST_BUFFER_OFFSET_END (buf) = multifilesrc->offset + size;
......
......@@ -181,7 +181,7 @@ flush_data (GstRtpQDM2Depay * depay)
GST_MEMDUMP ("Extracted packet", data, depay->packetsize);
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, depay->packetsize, 0,
depay->packetsize, data, g_free));
......
......@@ -328,7 +328,7 @@ gst_rtp_theora_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
data = g_base64_decode (configuration, &size);
confbuf = gst_buffer_new ();
gst_buffer_take_memory (confbuf, -1,
gst_buffer_append_memory (confbuf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf))
......@@ -542,7 +542,7 @@ gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
/* create buffer for packet */
if (G_UNLIKELY (to_free)) {
outbuf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, to_free,
(payload - to_free) + length, payload - to_free, length, to_free,
g_free));
......
......@@ -369,7 +369,7 @@ gst_rtp_vorbis_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
data = g_base64_decode (configuration, &size);
confbuf = gst_buffer_new ();
gst_buffer_take_memory (confbuf, -1,
gst_buffer_append_memory (confbuf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
if (!gst_rtp_vorbis_depay_parse_configuration (rtpvorbisdepay, confbuf))
goto invalid_configuration;
......@@ -593,7 +593,7 @@ gst_rtp_vorbis_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
/* create buffer for packet */
if (G_UNLIKELY (to_free)) {
outbuf = gst_buffer_new ();
gst_buffer_take_memory (outbuf, -1,
gst_buffer_append_memory (outbuf,
gst_memory_new_wrapped (0, to_free,
(payload - to_free) + length, payload - to_free, length, to_free,
g_free));
......
......@@ -3631,7 +3631,7 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src)
size -= 1;
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
/* don't need message anymore */
......
......@@ -462,7 +462,7 @@ no_select:
}
outbuf = gst_buffer_new ();
gst_buffer_take_memory (outbuf, -1,
gst_buffer_append_memory (outbuf,
gst_memory_new_wrapped (0, pktdata, pktsize, offset, ret, pktdata,
g_free));
......
......@@ -239,7 +239,7 @@ gst_y4m_encode_get_stream_header (GstY4mEncode * filter, gboolean tff)
len = strlen (header);
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
return buf;
......@@ -256,7 +256,7 @@ gst_y4m_encode_get_frame_header (GstY4mEncode * filter)
len = strlen (header);
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1,
gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
return buf;
......
......@@ -183,7 +183,7 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
if (meta->mem == MAP_FAILED)
goto mmap_failed;
gst_buffer_take_memory (newbuf, -1,
gst_buffer_append_memory (newbuf,
gst_memory_new_wrapped (0,
meta->mem, meta->vbuffer.length, 0, meta->vbuffer.length, NULL,
NULL));
......
......@@ -433,7 +433,7 @@ gst_ximageutil_ximage_new (GstXContext * xcontext,
}
succeeded = TRUE;
gst_buffer_take_memory (ximage, -1,
gst_buffer_append_memory (ximage,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, meta->ximage->data,
meta->size, 0, meta->size, NULL, NULL));
......
......@@ -454,7 +454,7 @@ src_handoff_float32_8ch (GstElement * src, GstBuffer * buf, GstPad * pad,
}
buf = gst_buffer_new ();
gst_buffer_take_memory (buf, -1, gst_memory_new_wrapped (0, data,
gst_buffer_append_memory (buf, gst_memory_new_wrapped (0, data,
size, 0, size, data, g_free));
GST_BUFFER_OFFSET (buf) = 0;
GST_BUFFER_TIMESTAMP (buf) = 0;
......
......@@ -419,7 +419,7 @@ src_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
for (i = 0; i < 48000; i++)
data[i] = (n % 2 == 0) ? -1.0 : 1.0;
gst_buffer_take_memory (buffer, -1, gst_memory_new_wrapped (0, data,
gst_buffer_append_memory (buffer, gst_memory_new_wrapped (0, data,
size, 0, size, data, g_free));
GST_BUFFER_OFFSET (buffer) = GST_BUFFER_OFFSET_NONE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment