mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +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 */
|
/* some caps messing */
|
||||||
caps = gst_caps_from_string (SRC_CAPS_TMPL);
|
caps = gst_caps_from_string (SRC_CAPS_TMPL);
|
||||||
cdata =
|
cdata =
|
||||||
gst_buffer_new_wrapped_full (h264_codec_data, NULL, 0,
|
gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, h264_codec_data,
|
||||||
sizeof (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_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, cdata, NULL);
|
||||||
gst_buffer_unref (cdata);
|
gst_buffer_unref (cdata);
|
||||||
desc = gst_caps_to_string (caps);
|
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;
|
gsize i;
|
||||||
|
|
||||||
for (i = 0; i < test_data_size; 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);
|
buffer_in = g_list_append (buffer_in, buffer);
|
||||||
}
|
}
|
||||||
return buffer_in;
|
return buffer_in;
|
||||||
|
@ -171,7 +173,9 @@ _make_buffers_out (GList * buffer_out, guint8 * test_data, gsize test_data_size)
|
||||||
{
|
{
|
||||||
GstBuffer *buffer;
|
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);
|
buffer_out = g_list_append (buffer_out, buffer);
|
||||||
|
|
||||||
return buffer_out;
|
return buffer_out;
|
||||||
|
|
|
@ -134,8 +134,8 @@ _src_getrange (GstPad * pad, GstObject * parent, guint64 offset, guint length,
|
||||||
if (offset + length > sizeof (mxf_file))
|
if (offset + length > sizeof (mxf_file))
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
|
|
||||||
*buffer = gst_buffer_new_wrapped_full ((guint8 *) (mxf_file + offset), NULL,
|
*buffer = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||||
0, length);
|
(guint8 *) (mxf_file + offset), length, 0, length, NULL, NULL);
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
@ -229,8 +229,8 @@ GST_START_TEST (test_push)
|
||||||
fail_unless (sinkpad != NULL);
|
fail_unless (sinkpad != NULL);
|
||||||
|
|
||||||
buffer =
|
buffer =
|
||||||
gst_buffer_new_wrapped_full ((guint8 *) mxf_file, NULL, 0,
|
gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||||
sizeof (mxf_file));
|
(guint8 *) mxf_file, sizeof (mxf_file), 0, sizeof (mxf_file), NULL, NULL);
|
||||||
GST_BUFFER_OFFSET (buffer) = 0;
|
GST_BUFFER_OFFSET (buffer) = 0;
|
||||||
|
|
||||||
mysinkpad = _create_sink_pad ();
|
mysinkpad = _create_sink_pad ();
|
||||||
|
|
Loading…
Reference in a new issue