projects
/
platform
/
upstream
/
gstreamer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update for buffer api change
[platform/upstream/gstreamer.git]
/
tests
/
examples
/
app
/
appsrc-stream.c
diff --git
a/tests/examples/app/appsrc-stream.c
b/tests/examples/app/appsrc-stream.c
index
51398d7
..
01e9362
100644
(file)
--- a/
tests/examples/app/appsrc-stream.c
+++ b/
tests/examples/app/appsrc-stream.c
@@
-83,8
+83,6
@@
read_data (App * app)
guint len;
GstFlowReturn ret;
guint len;
GstFlowReturn ret;
- buffer = gst_buffer_new ();
-
if (app->offset >= app->length) {
/* we are EOS, send end-of-stream and remove the source */
g_signal_emit_by_name (app->appsrc, "end-of-stream", &ret);
if (app->offset >= app->length) {
/* we are EOS, send end-of-stream and remove the source */
g_signal_emit_by_name (app->appsrc, "end-of-stream", &ret);
@@
-92,11
+90,13
@@
read_data (App * app)
}
/* read the next chunk */
}
/* read the next chunk */
+ buffer = gst_buffer_new ();
+
len = CHUNK_SIZE;
if (app->offset + len > app->length)
len = app->length - app->offset;
len = CHUNK_SIZE;
if (app->offset + len > app->length)
len = app->length - app->offset;
- gst_buffer_
take_memory (buffer, -1
,
+ gst_buffer_
append_memory (buffer
,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
app->data, app->length, app->offset, len, NULL, NULL));
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
app->data, app->length, app->offset, len, NULL, NULL));