Struct DeviceContext_ref
Represents a pointer to an FFmpeg hardware device context buffer reference. This is used to manage hardware-accelerated contexts in FFmpeg.
Inherited Members
Namespace: FFmpeg.HW
Assembly: FFmpeg.dll
Syntax
public readonly struct DeviceContext_ref : IEquatable<DeviceContext_ref>, IReference<DeviceContext>, IAVPointer<_AVHWDeviceContext>
Properties
View SourceDeviceType
This field identifies the underlying API used for hardware access.
Declaration
public DeviceType DeviceType { get; }
Property Value
| Type | Description |
|---|---|
| DeviceType |
IsReadOnly
Indicates whether the device context is read-only. If true, attempting to modify the context will result in a NotSupportedException.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceAsVulkan()
Returns the internal hwctx as VulkanDeviceContext
Declaration
public VulkanDeviceContext AsVulkan()
Returns
| Type | Description |
|---|---|
| VulkanDeviceContext |
Equals(DeviceContext_ref)
Determines whether the current DeviceContext_ref is equal to another instance of DeviceContext_ref.
Declaration
public bool Equals(DeviceContext_ref other)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceContext_ref | other | The other DeviceContext_ref to compare with. |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Determines whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourceGetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
View SourceGetReferencedObject()
Gets the object currently being referenced. Or a copy if the type is nor reference counted.
Declaration
public DeviceContext? GetReferencedObject()
Returns
| Type | Description |
|---|---|
| DeviceContext | The referenced object of type DeviceContext if available, or null if not. |
SetReferencedObject(DeviceContext?)
Sets the reference to a new object of type DeviceContext or creates a copy if the type is not reference counted or unlinks the current reference.
Declaration
public void SetReferencedObject(DeviceContext? device)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceContext | device |
Operators
View Sourceoperator ==(DeviceContext_ref, DeviceContext_ref)
Determines whether two DeviceContext_ref instances are equal.
Declaration
public static bool operator ==(DeviceContext_ref left, DeviceContext_ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceContext_ref | left | The first instance to compare. |
| DeviceContext_ref | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
operator ==(DeviceContext_ref?, DeviceContext_ref?)
Determines whether two DeviceContext_ref instances are equal.
Declaration
public static bool operator ==(DeviceContext_ref? left, DeviceContext_ref? right)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceContext_ref? | left | The first instance to compare. |
| DeviceContext_ref? | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(DeviceContext_ref, DeviceContext_ref)
Determines whether two DeviceContext_ref instances are not equal.
Declaration
public static bool operator !=(DeviceContext_ref left, DeviceContext_ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceContext_ref | left | The first instance to compare. |
| DeviceContext_ref | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(DeviceContext_ref?, DeviceContext_ref?)
Determines whether two DeviceContext_ref instances are not equal.
Declaration
public static bool operator !=(DeviceContext_ref? left, DeviceContext_ref? right)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceContext_ref? | left | The first instance to compare. |
| DeviceContext_ref? | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |