GstCudaGraphicsResource
Members
cuda_context
(GstCudaContext *)
–
graphics_context
(GstObject *)
–
type
(GstCudaGraphicsResourceType)
–
resource
(CUgraphicsResource)
–
flags
(CUgraphicsRegisterFlags)
–
registered
(gboolean)
–
mapped
(gboolean)
–
Since : 1.22
GstCuda.CudaGraphicsResource
Members
cuda_context
(GstCuda.CudaContext)
–
graphics_context
(Gst.Object)
–
type
(GstCuda.CudaGraphicsResourceType)
–
resource
(CudaGst.graphicsResource)
–
flags
(CudaGst.graphicsRegisterFlags)
–
registered
(Number)
–
mapped
(Number)
–
Since : 1.22
GstCuda.CudaGraphicsResource
Members
cuda_context
(GstCuda.CudaContext)
–
graphics_context
(Gst.Object)
–
type
(GstCuda.CudaGraphicsResourceType)
–
resource
(CudaGst.graphicsResource)
–
flags
(CudaGst.graphicsRegisterFlags)
–
registered
(bool)
–
mapped
(bool)
–
Since : 1.22
Methods
gst_cuda_graphics_resource_free
gst_cuda_graphics_resource_free (GstCudaGraphicsResource * resource)
Free resource
Parameters:
resource
–
Since : 1.22
gst_cuda_graphics_resource_map
CUgraphicsResource gst_cuda_graphics_resource_map (GstCudaGraphicsResource * resource, CUstream stream, CUgraphicsMapResourceFlags flags)
Map previously registered resource with map flags
Parameters:
resource
–
stream
–
a CUstream
flags
–
a CUgraphicsMapResourceFlags
the CUgraphicsResource
if successful or NULL when failed
Since : 1.22
gst_cuda_graphics_resource_register_gl_buffer
gboolean gst_cuda_graphics_resource_register_gl_buffer (GstCudaGraphicsResource * resource, guint buffer, CUgraphicsRegisterFlags flags)
Register the buffer for access by CUDA. Must be called from the gl context thread with current cuda context was pushed on the current thread
Parameters:
resource
–
buffer
–
a GL buffer object
flags
–
a CUgraphicsRegisterFlags
whether buffer was registered or not
Since : 1.22
gst_cuda_graphics_resource_unmap
gst_cuda_graphics_resource_unmap (GstCudaGraphicsResource * resource, CUstream stream)
Unmap previously mapped resource
Since : 1.22
gst_cuda_graphics_resource_unregister
gst_cuda_graphics_resource_unregister (GstCudaGraphicsResource * resource)
Unregister previously registered resource. For GL resource, this method must be called from gl context thread. Also, current cuda context should be pushed on the current thread before calling this method.
Parameters:
resource
–
Since : 1.22
Functions
gst_cuda_graphics_resource_new
GstCudaGraphicsResource * gst_cuda_graphics_resource_new (GstCudaContext * context, GstObject * graphics_context, GstCudaGraphicsResourceType type)
Create new GstCudaGraphicsResource with given context and type
Parameters:
context
(
[transfer: none])
–
graphics_context
(
[transfer: none][nullable])
–
a graphics API specific context object
type
–
a GstCudaGraphicsResourceType of resource registration
a new GstCudaGraphicsResource. Free with gst_cuda_graphics_resource_free
Since : 1.22
Functions
gst_context_new_cuda_context
GstContext * gst_context_new_cuda_context (GstCudaContext * cuda_ctx)
Parameters:
cuda_ctx
(
[transfer: none])
–
a new GstContext embedding the cuda_ctx
Since : 1.22
GstCuda.prototype.context_new_cuda_context
function GstCuda.prototype.context_new_cuda_context(cuda_ctx: GstCuda.CudaContext): {
// javascript wrapper for 'gst_context_new_cuda_context'
}
Parameters:
a new Gst.Context embedding the cuda_ctx
Since : 1.22
GstCuda.context_new_cuda_context
def GstCuda.context_new_cuda_context (cuda_ctx):
#python wrapper for 'gst_context_new_cuda_context'
Parameters:
a new Gst.Context embedding the cuda_ctx
Since : 1.22
gst_cuda_create_user_token
gint64 gst_cuda_create_user_token ()
Creates new user token value
user token value
Since : 1.24
GstCuda.prototype.cuda_create_user_token
function GstCuda.prototype.cuda_create_user_token(): {
// javascript wrapper for 'gst_cuda_create_user_token'
}
Creates new user token value
user token value
Since : 1.24
GstCuda.cuda_create_user_token
def GstCuda.cuda_create_user_token ():
#python wrapper for 'gst_cuda_create_user_token'
Creates new user token value
user token value
Since : 1.24
gst_cuda_ensure_element_context
gboolean gst_cuda_ensure_element_context (GstElement * element, gint device_id, GstCudaContext ** cuda_ctx)
Perform the steps necessary for retrieving a GstCudaContext from the surrounding elements or from the application using the GstContext mechanism.
If the content of cuda_ctx is not NULL, then no GstContext query is necessary for GstCudaContext.
Parameters:
element
–
the GstElement running the query
device_id
–
preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.
cuda_ctx
(
[inout])
–
the resulting GstCudaContext
whether a GstCudaContext exists in cuda_ctx
Since : 1.22
GstCuda.prototype.cuda_ensure_element_context
function GstCuda.prototype.cuda_ensure_element_context(element: Gst.Element, device_id: Number, cuda_ctx: GstCuda.CudaContext): {
// javascript wrapper for 'gst_cuda_ensure_element_context'
}
Perform the steps necessary for retrieving a GstCuda.CudaContext from the surrounding elements or from the application using the Gst.Context mechanism.
If the content of cuda_ctx is not null, then no Gst.Context query is necessary for GstCuda.CudaContext.
Parameters:
the Gst.Element running the query
preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.
the resulting GstCuda.CudaContext
Returns a tuple made of:
whether a GstCuda.CudaContext exists in cuda_ctx
whether a GstCuda.CudaContext exists in cuda_ctx
Since : 1.22
GstCuda.cuda_ensure_element_context
def GstCuda.cuda_ensure_element_context (element, device_id, cuda_ctx):
#python wrapper for 'gst_cuda_ensure_element_context'
Perform the steps necessary for retrieving a GstCuda.CudaContext from the surrounding elements or from the application using the Gst.Context mechanism.
If the content of cuda_ctx is not None, then no Gst.Context query is necessary for GstCuda.CudaContext.
Parameters:
the Gst.Element running the query
preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.
the resulting GstCuda.CudaContext
Returns a tuple made of:
whether a GstCuda.CudaContext exists in cuda_ctx
whether a GstCuda.CudaContext exists in cuda_ctx
Since : 1.22
gst_cuda_handle_context_query
gboolean gst_cuda_handle_context_query (GstElement * element, GstQuery * query, GstCudaContext * cuda_ctx)
Parameters:
element
–
query
–
a GstQuery of type GST_QUERY_CONTEXT
cuda_ctx
(
[transfer: none][nullable])
–
Whether the query was successfully responded to from the passed context.
Since : 1.22
GstCuda.prototype.cuda_handle_context_query
function GstCuda.prototype.cuda_handle_context_query(element: Gst.Element, query: Gst.Query, cuda_ctx: GstCuda.CudaContext): {
// javascript wrapper for 'gst_cuda_handle_context_query'
}
Whether the query was successfully responded to from the passed context.
Since : 1.22
GstCuda.cuda_handle_context_query
def GstCuda.cuda_handle_context_query (element, query, cuda_ctx):
#python wrapper for 'gst_cuda_handle_context_query'
Whether the query was successfully responded to from the passed context.
Since : 1.22
gst_cuda_handle_set_context
gboolean gst_cuda_handle_set_context (GstElement * element, GstContext * context, gint device_id, GstCudaContext ** cuda_ctx)
Helper function for implementing set_context() in CUDA capable elements.
Retrieves the GstCudaContext in context and places the result in cuda_ctx.
Parameters:
element
–
context
–
device_id
–
preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.
cuda_ctx
(
[inout][transfer: full])
–
location of a GstCudaContext
whether the cuda_ctx could be set successfully
Since : 1.22
GstCuda.prototype.cuda_handle_set_context
function GstCuda.prototype.cuda_handle_set_context(element: Gst.Element, context: Gst.Context, device_id: Number, cuda_ctx: GstCuda.CudaContext): {
// javascript wrapper for 'gst_cuda_handle_set_context'
}
Helper function for implementing vfunc_set_context() in CUDA capable elements.
Retrieves the GstCuda.CudaContext in context and places the result in cuda_ctx.
Parameters:
preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.
location of a GstCuda.CudaContext
Returns a tuple made of:
whether the cuda_ctx could be set successfully
whether the cuda_ctx could be set successfully
Since : 1.22
GstCuda.cuda_handle_set_context
def GstCuda.cuda_handle_set_context (element, context, device_id, cuda_ctx):
#python wrapper for 'gst_cuda_handle_set_context'
Helper function for implementing do_set_context() in CUDA capable elements.
Retrieves the GstCuda.CudaContext in context and places the result in cuda_ctx.
Parameters:
preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.
location of a GstCuda.CudaContext
Returns a tuple made of:
whether the cuda_ctx could be set successfully
whether the cuda_ctx could be set successfully
Since : 1.22
gst_cuda_quark_from_id
GQuark gst_cuda_quark_from_id (GstCudaQuarkId id)
Parameters:
id
–
the GQuark for given id or 0 if id is unknown value
Since : 1.22
Function Macros
gst_cuda_result
#define gst_cuda_result(result) \ _gst_cuda_debug(result, GST_CAT_DEFAULT, __FILE__, GST_FUNCTION, __LINE__)
Parameters:
result
–
CUDA device API return code CUresult
TRUE if CUDA device API call result is CUDA_SUCCESS
Since : 1.22
Enumerations
GstCudaGraphicsResourceType
Members
GST_CUDA_GRAPHICS_RESOURCE_NONE
(0)
–
GST_CUDA_GRAPHICS_RESOURCE_GL_BUFFER
(1)
–
GST_CUDA_GRAPHICS_RESOURCE_D3D11_RESOURCE
(2)
–
GST_CUDA_GRAPHICS_RESOURCE_EGL_RESOURCE
(3)
–
Resource represents a EGL resource.
(Since: 1.26)Since : 1.22
GstCuda.CudaGraphicsResourceType
Members
GstCuda.CudaGraphicsResourceType.NONE
(0)
–
GstCuda.CudaGraphicsResourceType.GL_BUFFER
(1)
–
GstCuda.CudaGraphicsResourceType.D3D11_RESOURCE
(2)
–
GstCuda.CudaGraphicsResourceType.EGL_RESOURCE
(3)
–
Resource represents a EGL resource.
(Since: 1.26)Since : 1.22
GstCuda.CudaGraphicsResourceType
Members
GstCuda.CudaGraphicsResourceType.NONE
(0)
–
GstCuda.CudaGraphicsResourceType.GL_BUFFER
(1)
–
GstCuda.CudaGraphicsResourceType.D3D11_RESOURCE
(2)
–
GstCuda.CudaGraphicsResourceType.EGL_RESOURCE
(3)
–
Resource represents a EGL resource.
(Since: 1.26)Since : 1.22
GstCudaQuarkId
Members
GST_CUDA_QUARK_GRAPHICS_RESOURCE
(0)
–
GST_CUDA_QUARK_MAX
(1)
–
Since : 1.22
GstCuda.CudaQuarkId
Members
GstCuda.CudaQuarkId.GRAPHICS_RESOURCE
(0)
–
GstCuda.CudaQuarkId.MAX
(1)
–
Since : 1.22
GstCuda.CudaQuarkId
Members
GstCuda.CudaQuarkId.GRAPHICS_RESOURCE
(0)
–
GstCuda.CudaQuarkId.MAX
(1)
–
Since : 1.22
The results of the search are