Skip to content

node-av / lib/native-types / NativeHardwareDeviceContext

Interface: NativeHardwareDeviceContext

Defined in: src/lib/native-types.ts:868

Internal

Native AVHWDeviceContext binding interface

Hardware device context for hardware acceleration. Direct mapping to FFmpeg's AVHWDeviceContext.

Extends

  • Disposable

Properties

__brand

readonly __brand: "NativeHardwareDeviceContext"

Defined in: src/lib/native-types.ts:869


hwctx

readonly hwctx: bigint | null

Defined in: src/lib/native-types.ts:872


type

readonly type: AVHWDeviceType

Defined in: src/lib/native-types.ts:871

Methods

[dispose]()

[dispose](): void

Defined in: src/lib/native-types.ts:889

Returns

void

Overrides

Disposable.[dispose]


alloc()

alloc(type): void

Defined in: src/lib/native-types.ts:874

Parameters

type

AVHWDeviceType

Returns

void


create()

create(type, device, options): number

Defined in: src/lib/native-types.ts:876

Parameters

type

AVHWDeviceType

device

string | null

options

any

Returns

number


createDerived()

createDerived(source, type): number

Defined in: src/lib/native-types.ts:877

Parameters

source

NativeHardwareDeviceContext

type

AVHWDeviceType

Returns

number


free()

free(): void

Defined in: src/lib/native-types.ts:887

Returns

void


getHwframeConstraints()

getHwframeConstraints(hwconfig?): { maxHeight: number; maxWidth: number; minHeight: number; minWidth: number; validHwFormats?: AVPixelFormat[]; validSwFormats?: AVPixelFormat[]; } | null

Defined in: src/lib/native-types.ts:879

Parameters

hwconfig?

bigint

Returns

{ maxHeight: number; maxWidth: number; minHeight: number; minWidth: number; validHwFormats?: AVPixelFormat[]; validSwFormats?: AVPixelFormat[]; } | null


hwconfigAlloc()

hwconfigAlloc(): bigint | null

Defined in: src/lib/native-types.ts:878

Returns

bigint | null


init()

init(): number

Defined in: src/lib/native-types.ts:875

Returns

number