mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tests: update for memory api changes
This commit is contained in:
parent
289e9683e9
commit
351f13bd42
3 changed files with 12 additions and 8 deletions
|
@ -292,8 +292,8 @@ GST_START_TEST (test_parse_packetized)
|
|||
/* some caps messing */
|
||||
caps = gst_caps_from_string (SRC_CAPS_TMPL);
|
||||
cdata =
|
||||
gst_buffer_new_wrapped_full (h264_codec_data, NULL, 0,
|
||||
sizeof (h264_codec_data));
|
||||
gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, h264_codec_data,
|
||||
sizeof (h264_codec_data), 0, sizeof (h264_codec_data), NULL, NULL);
|
||||
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, cdata, NULL);
|
||||
gst_buffer_unref (cdata);
|
||||
desc = gst_caps_to_string (caps);
|
||||
|
|
|
@ -157,7 +157,9 @@ _make_buffers_in (GList * buffer_in, guint8 * test_data, gsize test_data_size)
|
|||
gsize i;
|
||||
|
||||
for (i = 0; i < test_data_size; i++) {
|
||||
buffer = gst_buffer_new_wrapped_full (test_data + i, NULL, 0, 1);
|
||||
buffer =
|
||||
gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, test_data + i, 1,
|
||||
0, 1, NULL, NULL);
|
||||
buffer_in = g_list_append (buffer_in, buffer);
|
||||
}
|
||||
return buffer_in;
|
||||
|
@ -171,7 +173,9 @@ _make_buffers_out (GList * buffer_out, guint8 * test_data, gsize test_data_size)
|
|||
{
|
||||
GstBuffer *buffer;
|
||||
|
||||
buffer = gst_buffer_new_wrapped_full (test_data, NULL, 0, test_data_size);
|
||||
buffer =
|
||||
gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, test_data,
|
||||
test_data_size, 0, test_data_size, NULL, NULL);
|
||||
buffer_out = g_list_append (buffer_out, buffer);
|
||||
|
||||
return buffer_out;
|
||||
|
|
|
@ -134,8 +134,8 @@ _src_getrange (GstPad * pad, GstObject * parent, guint64 offset, guint length,
|
|||
if (offset + length > sizeof (mxf_file))
|
||||
return GST_FLOW_EOS;
|
||||
|
||||
*buffer = gst_buffer_new_wrapped_full ((guint8 *) (mxf_file + offset), NULL,
|
||||
0, length);
|
||||
*buffer = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||
(guint8 *) (mxf_file + offset), length, 0, length, NULL, NULL);
|
||||
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
@ -229,8 +229,8 @@ GST_START_TEST (test_push)
|
|||
fail_unless (sinkpad != NULL);
|
||||
|
||||
buffer =
|
||||
gst_buffer_new_wrapped_full ((guint8 *) mxf_file, NULL, 0,
|
||||
sizeof (mxf_file));
|
||||
gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||
(guint8 *) mxf_file, sizeof (mxf_file), 0, sizeof (mxf_file), NULL, NULL);
|
||||
GST_BUFFER_OFFSET (buffer) = 0;
|
||||
|
||||
mysinkpad = _create_sink_pad ();
|
||||
|
|
Loading…
Reference in a new issue