Class AVIOContext
Represents a managed wrapper around FFmpeg's unmanaged FFmpeg.AutoGen._AVIOContext structure.
Inherited Members
Namespace: FFmpeg.IO
Assembly: FFmpeg.dll
Syntax
public class AVIOContext : IDisposable, IAVPointer<_AVIOContext>
Remarks
An AVIOContext provides buffered input/output operations for media data. It can represent file-based I/O, network streams, memory buffers, or custom user-defined data sources. Instances own the underlying unmanaged context and release it when disposed.
Properties
View SourceEOF
Gets a value indicating whether the end of the file (EOF) has been reached.
Declaration
public bool EOF { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ErrorCode
Gets the error code associated with the AVIOContext. If no error occurred, this will be >=0.
Declaration
public AVResult32 ErrorCode { get; }
Property Value
| Type | Description |
|---|---|
| AVResult32 |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the AVIOContext and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
~AVIOContext()
Finalizer that releases unmanaged resources before the object is reclaimed by garbage collection.
Declaration
protected ~AVIOContext()
Flush()
Flushes any buffered output data to the underlying destination.
Declaration
public virtual void Flush()
Remarks
This method has an effect only for writable I/O contexts. For read-only contexts, calling this method typically has no effect.
SetContext(_AVIOContext**)
Replaces the underlying unmanaged FFmpeg.AutoGen._AVIOContext.
Declaration
protected void SetContext(_AVIOContext** context)
Parameters
| Type | Name | Description |
|---|---|---|
| _AVIOContext** | context | A pointer to the new unmanaged context. |
Remarks
If this instance already owns a different context, the previous context is released before the new one is assigned. This method is intended for derived classes that create custom AVIO contexts.