## GstCudaContext

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstCudaContext

### Members

`object` (GstObject) –
No description available

Since : 1.22

### Class structure

#### GstCudaContextClass

##### Fields

`parent_class` (GstObjectClass) –
No description available

### GstCuda.CudaContextClass

##### Attributes

`parent_class` (Gst.ObjectClass) –
No description available

### GstCuda.CudaContextClass

##### Attributes

`parent_class` (Gst.ObjectClass) –
No description available

## GstCuda.CudaContext

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──GstCuda.CudaContext

### Members

`object` (Gst.Object) –
No description available

Since : 1.22

## GstCuda.CudaContext

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──GstCuda.CudaContext

### Members

`object` (Gst.Object) –
No description available

Since : 1.22

### Constructors

#### gst_cuda_context_new

    GstCudaContext *
    gst_cuda_context_new (guint device_id)

Create GstCudaContext with given device_id

Parameters:

`device_id` –

device-id for creating GstCudaContext

Returns ( [transfer: full][nullable]) –

a new GstCudaContext or NULL on failure

Since : 1.22

#### GstCuda.CudaContext.prototype.new

    function GstCuda.CudaContext.prototype.new(device_id: Number): {
        // javascript wrapper for 'gst_cuda_context_new'
    }

Create GstCuda.CudaContext with given device_id

Parameters:

`device_id` (Number) –

device-id for creating GstCuda.CudaContext

Returns (GstCuda.CudaContext) –

a new GstCuda.CudaContext or null on failure

Since : 1.22

#### GstCuda.CudaContext.new

    def GstCuda.CudaContext.new (device_id):
        #python wrapper for 'gst_cuda_context_new'

Create GstCuda.CudaContext with given device_id

Parameters:

`device_id` (int) –

device-id for creating GstCuda.CudaContext

Returns (GstCuda.CudaContext) –

a new GstCuda.CudaContext or None on failure

Since : 1.22

#### gst_cuda_context_new_wrapped

    GstCudaContext *
    gst_cuda_context_new_wrapped (CUcontext handler,
                                  CUdevice device)

Note: The caller is responsible for ensuring that the CUcontext and CUdevice represented by handle and device stay alive while the returned GstCudaContext is active.

Parameters:

`handler` –

A CUcontext to wrap

`device` –

A CUDevice to wrap

Returns ( [transfer: full][nullable]) –

A newly created GstCudaContext

Since : 1.22

#### GstCuda.CudaContext.prototype.new_wrapped

    function GstCuda.CudaContext.prototype.new_wrapped(handler: CudaGst.context, device: CudaGst.device): {
        // javascript wrapper for 'gst_cuda_context_new_wrapped'
    }

Note: The caller is responsible for ensuring that the CUcontext and CUdevice represented by handle and device stay alive while the returned GstCuda.CudaContext is active.

Parameters:

`handler` (CudaGst.context) –

A CUcontext to wrap

`device` (CudaGst.device) –

A CUDevice to wrap

Returns (GstCuda.CudaContext) –

A newly created GstCuda.CudaContext

Since : 1.22

#### GstCuda.CudaContext.new_wrapped

    def GstCuda.CudaContext.new_wrapped (handler, device):
        #python wrapper for 'gst_cuda_context_new_wrapped'

Note: The caller is responsible for ensuring that the CUcontext and CUdevice represented by handle and device stay alive while the returned GstCuda.CudaContext is active.

Parameters:

`handler` (CudaGst.context) –

A CUcontext to wrap

`device` (CudaGst.device) –

A CUDevice to wrap

Returns (GstCuda.CudaContext) –

A newly created GstCuda.CudaContext

Since : 1.22

### Methods

#### gst_cuda_context_can_access_peer

    gboolean
    gst_cuda_context_can_access_peer (GstCudaContext * ctx,
                                      GstCudaContext * peer)

Query whether ctx can access any memory which belongs to peer directly.

Parameters:

`ctx` –

a GstCudaContext

`peer` –

a GstCudaContext

Returns –

TRUE if ctx can access peer directly

Since : 1.22

#### GstCuda.CudaContext.prototype.can_access_peer

    function GstCuda.CudaContext.prototype.can_access_peer(peer: GstCuda.CudaContext): {
        // javascript wrapper for 'gst_cuda_context_can_access_peer'
    }

Query whether ctx can access any memory which belongs to peer directly.

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext

`peer` (GstCuda.CudaContext) –

a GstCuda.CudaContext

Returns (Number) –

true if ctx can access peer directly

Since : 1.22

#### GstCuda.CudaContext.can_access_peer

    def GstCuda.CudaContext.can_access_peer (self, peer):
        #python wrapper for 'gst_cuda_context_can_access_peer'

Query whether ctx can access any memory which belongs to peer directly.

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext

`peer` (GstCuda.CudaContext) –

a GstCuda.CudaContext

Returns (bool) –

True if ctx can access peer directly

Since : 1.22

#### gst_cuda_context_get_handle

    gpointer
    gst_cuda_context_get_handle (GstCudaContext * ctx)

Get CUDA device context. Caller must not modify and/or destroy returned device context.

Parameters:

`ctx` –

a GstCudaContext

Returns –

the `CUcontext` of ctx

Since : 1.22

#### GstCuda.CudaContext.prototype.get_handle

    function GstCuda.CudaContext.prototype.get_handle(): {
        // javascript wrapper for 'gst_cuda_context_get_handle'
    }

Get CUDA device context. Caller must not modify and/or destroy returned device context.

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext

Returns (Object) –

the `CUcontext` of ctx

Since : 1.22

#### GstCuda.CudaContext.get_handle

    def GstCuda.CudaContext.get_handle (self):
        #python wrapper for 'gst_cuda_context_get_handle'

Get CUDA device context. Caller must not modify and/or destroy returned device context.

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext

Returns (object) –

the `CUcontext` of ctx

Since : 1.22

#### gst_cuda_context_get_texture_alignment

    gint
    gst_cuda_context_get_texture_alignment (GstCudaContext * ctx)

Get required texture alignment by device

Parameters:

`ctx` –

a GstCudaContext

Returns –

the `CUcontext` of ctx

Since : 1.22

#### GstCuda.CudaContext.prototype.get_texture_alignment

    function GstCuda.CudaContext.prototype.get_texture_alignment(): {
        // javascript wrapper for 'gst_cuda_context_get_texture_alignment'
    }

Get required texture alignment by device

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext

Returns (Number) –

the `CUcontext` of ctx

Since : 1.22

#### GstCuda.CudaContext.get_texture_alignment

    def GstCuda.CudaContext.get_texture_alignment (self):
        #python wrapper for 'gst_cuda_context_get_texture_alignment'

Get required texture alignment by device

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext

Returns (int) –

the `CUcontext` of ctx

Since : 1.22

#### gst_cuda_context_push

    gboolean
    gst_cuda_context_push (GstCudaContext * ctx)

Pushes the given ctx onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all CUDA functions that operate on the current context are affected.

Parameters:

`ctx` –

a GstCudaContext to push current thread

Returns –

TRUE if ctx was pushed without error.

Since : 1.22

#### GstCuda.CudaContext.prototype.push

    function GstCuda.CudaContext.prototype.push(): {
        // javascript wrapper for 'gst_cuda_context_push'
    }

Pushes the given ctx onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all CUDA functions that operate on the current context are affected.

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext to push current thread

Returns (Number) –

true if ctx was pushed without error.

Since : 1.22

#### GstCuda.CudaContext.push

    def GstCuda.CudaContext.push (self):
        #python wrapper for 'gst_cuda_context_push'

Pushes the given ctx onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all CUDA functions that operate on the current context are affected.

Parameters:

`ctx` (GstCuda.CudaContext) –

a GstCuda.CudaContext to push current thread

Returns (bool) –

True if ctx was pushed without error.

Since : 1.22

### Functions

#### gst_cuda_context_pop

    gboolean
    gst_cuda_context_pop (CUcontext* cuda_ctx)

Pops the current CUDA context from CPU thread

Parameters:

`cuda_ctx` –
No description available
Returns –

TRUE if ctx was pushed without error.

Since : 1.22

#### GstCuda.CudaContext.prototype.pop

    function GstCuda.CudaContext.prototype.pop(cuda_ctx: CudaGst.context): {
        // javascript wrapper for 'gst_cuda_context_pop'
    }

Pops the current CUDA context from CPU thread

Parameters:

`cuda_ctx` (CudaGst.context) –
No description available
Returns (Number) –

true if ctx was pushed without error.

Since : 1.22

#### GstCuda.CudaContext.pop

    def GstCuda.CudaContext.pop (cuda_ctx):
        #python wrapper for 'gst_cuda_context_pop'

Pops the current CUDA context from CPU thread

Parameters:

`cuda_ctx` (CudaGst.context) –
No description available
Returns (bool) –

True if ctx was pushed without error.

Since : 1.22

### Properties

#### cuda-device-id

    “cuda-device-id” guint

Flags : Read / Write / Construct Only

#### cuda-device-id

    “cuda-device-id” Number

Flags : Read / Write / Construct Only

#### cuda_device_id

    “self.props.cuda_device_id” int

Flags : Read / Write / Construct Only

#### default-gpu-stack-size

    “default-gpu-stack-size” guint

The default stack size for each GPU thread.

Flags : Read / Write

Since : 1.26

#### default-gpu-stack-size

    “default-gpu-stack-size” Number

The default stack size for each GPU thread.

Flags : Read / Write

Since : 1.26

#### default_gpu_stack_size

    “self.props.default_gpu_stack_size” int

The default stack size for each GPU thread.

Flags : Read / Write

Since : 1.26

#### external-resource-interop

    “external-resource-interop” gboolean

External resource interop API support

Flags : Read

Since : 1.26

#### external-resource-interop

    “external-resource-interop” Number

External resource interop API support

Flags : Read

Since : 1.26

#### external_resource_interop

    “self.props.external_resource_interop” bool

External resource interop API support

Flags : Read

Since : 1.26

#### os-handle

    “os-handle” gboolean

OS handle supportability in virtual memory management

Flags : Read

Since : 1.24

#### os-handle

    “os-handle” Number

OS handle supportability in virtual memory management

Flags : Read

Since : 1.24

#### os_handle

    “self.props.os_handle” bool

OS handle supportability in virtual memory management

Flags : Read

Since : 1.24

#### prefer-stream-ordered-alloc

    “prefer-stream-ordered-alloc” gboolean

Flags : Read / Write

Since : 1.26

#### prefer-stream-ordered-alloc

    “prefer-stream-ordered-alloc” Number

Flags : Read / Write

Since : 1.26

#### prefer_stream_ordered_alloc

    “self.props.prefer_stream_ordered_alloc” bool

Flags : Read / Write

Since : 1.26

#### stream-ordered-alloc

    “stream-ordered-alloc” gboolean

Flags : Read

Since : 1.26

#### stream-ordered-alloc

    “stream-ordered-alloc” Number

Flags : Read

Since : 1.26

#### stream_ordered_alloc

    “self.props.stream_ordered_alloc” bool

Flags : Read

Since : 1.26

#### virtual-memory

    “virtual-memory” gboolean

Virtual memory management supportability

Flags : Read

Since : 1.24

#### virtual-memory

    “virtual-memory” Number

Virtual memory management supportability

Flags : Read

Since : 1.24

#### virtual_memory

    “self.props.virtual_memory” bool

Virtual memory management supportability

Flags : Read

Since : 1.24

## Function Macros

### GST_CUDA_CONTEXT_CAST

    #define GST_CUDA_CONTEXT_CAST(obj)        ((GstCudaContext*)(obj))

Since : 1.22

## Constants

### GST_CUDA_CONTEXT_TYPE

    #define GST_CUDA_CONTEXT_TYPE "gst.cuda.context"

Since : 1.22

### GstCuda.CUDA_CONTEXT_TYPE

Since : 1.22

### GstCuda.CUDA_CONTEXT_TYPE

Since : 1.22

The results of the search are