mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
memory: add flags to the mapinfo
This commit is contained in:
parent
203dd6fbe1
commit
9c9848e952
2 changed files with 5 additions and 0 deletions
|
@ -582,6 +582,7 @@ gst_memory_map (GstMemory * mem, GstMapInfo * info, GstMapFlags flags)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
info->memory = mem;
|
info->memory = mem;
|
||||||
|
info->flags = flags;
|
||||||
info->size = mem->size;
|
info->size = mem->size;
|
||||||
info->maxsize = mem->maxsize - mem->offset;
|
info->maxsize = mem->maxsize - mem->offset;
|
||||||
info->data = info->data + mem->offset;
|
info->data = info->data + mem->offset;
|
||||||
|
|
|
@ -101,6 +101,7 @@ typedef enum {
|
||||||
/**
|
/**
|
||||||
* GstMapInfo:
|
* GstMapInfo:
|
||||||
* @memory: a pointer to the mapped memory
|
* @memory: a pointer to the mapped memory
|
||||||
|
* @flags: flags used when mapping the memory
|
||||||
* @data: a pointer to the mapped data
|
* @data: a pointer to the mapped data
|
||||||
* @size: the valid size in @data
|
* @size: the valid size in @data
|
||||||
* @maxsize: the maximum bytes in @data
|
* @maxsize: the maximum bytes in @data
|
||||||
|
@ -110,11 +111,14 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GstMemory *memory;
|
GstMemory *memory;
|
||||||
|
GstMapFlags flags;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
gsize size;
|
gsize size;
|
||||||
gsize maxsize;
|
gsize maxsize;
|
||||||
} GstMapInfo;
|
} GstMapInfo;
|
||||||
|
|
||||||
|
#define GST_MAP_INFO_INIT { NULL, 0, NULL, 0, 0 }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GST_MAP_READWRITE:
|
* GST_MAP_READWRITE:
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue