summaryrefslogtreecommitdiff
path: root/pinos/gst/gstpinossrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'pinos/gst/gstpinossrc.c')
-rw-r--r--pinos/gst/gstpinossrc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/pinos/gst/gstpinossrc.c b/pinos/gst/gstpinossrc.c
index 0c015412..8607400e 100644
--- a/pinos/gst/gstpinossrc.c
+++ b/pinos/gst/gstpinossrc.c
@@ -402,7 +402,7 @@ on_add_buffer (PinosListener *listener,
switch (m->type) {
case SPA_META_TYPE_HEADER:
- data.header = m->data;
+ data.header = m->mem.ptr;
break;
default:
break;
@@ -412,18 +412,18 @@ on_add_buffer (PinosListener *listener,
SpaData *d = &b->datas[i];
GstMemory *gmem = NULL;
- switch (d->type) {
- case SPA_DATA_TYPE_MEMFD:
- case SPA_DATA_TYPE_DMABUF:
+ switch (SPA_DATA_MEM_TYPE (d)) {
+ case SPA_MEM_TYPE_MEMFD:
+ case SPA_MEM_TYPE_DMABUF:
{
- gmem = gst_fd_allocator_alloc (pinossrc->fd_allocator, dup (d->fd),
- d->maxsize, GST_FD_MEMORY_FLAG_NONE);
- gst_memory_resize (gmem, d->offset, d->size);
+ gmem = gst_fd_allocator_alloc (pinossrc->fd_allocator, dup (SPA_DATA_MEM_FD (d)),
+ SPA_DATA_MEM_SIZE (d), GST_FD_MEMORY_FLAG_NONE);
+ gst_memory_resize (gmem, SPA_DATA_CHUNK_OFFSET (d), SPA_DATA_CHUNK_SIZE (d));
break;
}
- case SPA_DATA_TYPE_MEMPTR:
- gmem = gst_memory_new_wrapped (0, d->data, d->maxsize, d->offset,
- d->size, NULL, NULL);
+ case SPA_MEM_TYPE_MEMPTR:
+ gmem = gst_memory_new_wrapped (0, SPA_DATA_MEM_PTR (d), SPA_DATA_MEM_SIZE (d),
+ SPA_DATA_CHUNK_OFFSET (d), SPA_DATA_CHUNK_SIZE (d), NULL, NULL);
default:
break;
}
@@ -488,8 +488,8 @@ on_new_buffer (PinosListener *listener,
for (i = 0; i < data->buf->n_datas; i++) {
SpaData *d = &data->buf->datas[i];
GstMemory *mem = gst_buffer_peek_memory (buf, i);
- mem->offset = d->offset;
- mem->size = d->size;
+ mem->offset = d->chunk.chunk->offset;
+ mem->size = d->chunk.chunk->size;
}
g_queue_push_tail (&pinossrc->queue, buf);