Blame docs/libs/html/gst-plugins-base-libs-dmabuf.html

Packit 971217
Packit 971217
<html>
Packit 971217
<head>
Packit 971217
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 971217
<title>GstDmaBufAllocator: GStreamer Base Plugins 1.0 Library Reference Manual</title>
Packit 971217
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
Packit 971217
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
Packit 971217
<link rel="up" href="gstreamer-allocators.html" title="Allocators Library">
Packit 971217
<link rel="prev" href="gstreamer-allocators.html" title="Allocators Library">
Packit 971217
<link rel="next" href="gst-plugins-base-libs-fdmemory.html" title="GstFdAllocator">
Packit 971217
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit 971217
<link rel="stylesheet" href="style.css" type="text/css">
Packit 971217
</head>
Packit 971217
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 971217
Packit 971217
Packit 971217
Top  | 
Packit 971217
                  Description
Packit 971217
Packit 971217
Home
Packit 971217
Up
Packit 971217
Prev
Packit 971217
Next
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

GstDmaBufAllocator

Packit 971217

GstDmaBufAllocator — Memory wrapper for Linux dmabuf memory

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Functions

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstAllocator *
Packit 971217
Packit 971217
Packit 971217
gst_dmabuf_allocator_new ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstMemory *
Packit 971217
Packit 971217
Packit 971217
gst_dmabuf_allocator_alloc ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gint
Packit 971217
Packit 971217
Packit 971217
gst_dmabuf_memory_get_fd ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GType
Packit 971217
Packit 971217
Packit 971217
gst_dmabuf_allocator_get_type ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
Packit 971217
Packit 971217
gst_is_dmabuf_memory ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
#define
Packit 971217
GST_CAPS_FEATURE_MEMORY_DMABUF
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Includes

Packit 971217
#include <gst/allocators/gstdmabuf.h>
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Description

Packit 971217
Packit 971217
Packit 971217

Functions

Packit 971217
Packit 971217

gst_dmabuf_allocator_new ()

Packit 971217
GstAllocator *
Packit 971217
gst_dmabuf_allocator_new (void);
Packit 971217

Return a new dmabuf allocator.

Packit 971217
Packit 971217

Returns

Packit 971217

a new dmabuf allocator, or NULL if the allocator

Packit 971217
isn't available. Use gst_object_unref() to release the allocator after
Packit 971217
usage. 

Packit 971217

[transfer full]

Packit 971217
Packit 971217

Since: 1.2

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_dmabuf_allocator_alloc ()

Packit 971217
GstMemory *
Packit 971217
gst_dmabuf_allocator_alloc (GstAllocator *allocator,
Packit 971217
                            gint fd,
Packit 971217
                            gsize size);
Packit 971217

Return a GstMemory that wraps a dmabuf file descriptor.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

allocator

Packit 971217

allocator to be used for this memory

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

dmabuf file descriptor

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

size

Packit 971217

memory size

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

a GstMemory based on allocator

Packit 971217
.
Packit 971217
When the buffer will be released dmabuf allocator will close the fd
Packit 971217
.
Packit 971217
The memory is only mmapped on gst_buffer_mmap() request. 

Packit 971217

[transfer full]

Packit 971217
Packit 971217

Since: 1.2

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_dmabuf_memory_get_fd ()

Packit 971217
gint
Packit 971217
gst_dmabuf_memory_get_fd (GstMemory *mem);
Packit 971217

Return the file descriptor associated with mem

Packit 971217
.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

mem

Packit 971217

the memory to get the file descriptor

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

the file descriptor associated with the memory, or -1. The file

Packit 971217
descriptor is still owned by the GstMemory.  Use dup to take a copy
Packit 971217
if you intend to use it beyond the lifetime of this GstMemory.

Packit 971217
Packit 971217

Since: 1.2

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_dmabuf_allocator_get_type ()

Packit 971217
GType
Packit 971217
gst_dmabuf_allocator_get_type (void);
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_is_dmabuf_memory ()

Packit 971217
gboolean
Packit 971217
gst_is_dmabuf_memory (GstMemory *mem);
Packit 971217

Check if mem

Packit 971217
 is dmabuf memory.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

mem

Packit 971217

the memory to be check

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

TRUE if mem

Packit 971217
is dmabuf memory, otherwise FALSE

Packit 971217
Packit 971217

Since: 1.2

Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217

GST_CAPS_FEATURE_MEMORY_DMABUF

Packit 971217
#define GST_CAPS_FEATURE_MEMORY_DMABUF "memory:DMABuf"
Packit 971217
Packit 971217

Constant that defines the caps feature name for DMA buffer sharing.

Packit 971217

It has to be used for non-mappable dma-buf only, i.e. when the underlying

Packit 971217
memory is not mappable to user space. Or when the mapped memory contains
Packit 971217
non meaningful data. It can be the case for protected content or when the
Packit 971217
user wants explicitly avoid any software post processing.

Packit 971217

In these cases all elements between the exported and the importer has to work

Packit 971217
in passthrough mode. This is done by adding this caps feature.

Packit 971217

When the memory is mappable for read and write requests then it is assumes

Packit 971217
to be a fast path and so this caps feature should not be used. Though
Packit 971217
according to the dma-buf protocal, while it is mapped it prevents the
Packit 971217
exporter to migrate the buffer.

Packit 971217

This caps feature should not serve at all the purpose of selecting the

Packit 971217
GST_ALLOCATOR_DMABUF
Packit 971217
 allocator during caps negotiation.
Packit 971217
When the exporter is the upstream element from the importer point of view,
Packit 971217
the exporter should try to map the dma buffer at runtime (preferrably during
Packit 971217
decide_allocation phase). When it succeeds for GST_MAP_READWRITE this caps
Packit 971217
feature should not be used. This allows scalers, color converts and any image
Packit 971217
processing filters to work directly on the dma buffer.
Packit 971217
In this case the importer element should check all incomming memory using
Packit 971217
gst_is_dmabuf_memory().

Packit 971217

Since: 1.12

Packit 971217
Packit 971217
Packit 971217
Packit 971217

See Also

Packit 971217

GstMemory

Packit 971217
Packit 971217
Packit 971217
Packit 971217

Generated by GTK-Doc V1.27
Packit 971217
</body>
Packit 971217
</html>