Table of Contents

Class FramerateConverter

Namespace
VAST.Media
Assembly
VAST.Common.dll

Converts video frames from one framerate to another by dropping or duplicating frames as needed.

public class FramerateConverter : IDisposable
Inheritance
FramerateConverter
Implements
Inherited Members

Remarks

This converter only supports uncompressed video samples. It handles discontinuities in the input stream and adjusts timestamps to match the output framerate.

Constructors

FramerateConverter(MediaType, MediaType)

Initializes a new instance of the FramerateConverter class.

public FramerateConverter(MediaType inputMediaType, MediaType outputMediaType)

Parameters

inputMediaType MediaType

The input media type describing the source video format and framerate.

outputMediaType MediaType

The output media type describing the target video format and framerate.

Exceptions

Exception

Thrown when the media types are not video, not uncompressed, or missing framerate information.

Methods

Dispose()

Releases all resources used by the framerate converter.

public void Dispose()

Read()

Reads the next converted output frame from the converter.

public VersatileBuffer Read()

Returns

VersatileBuffer

The converted video frame with adjusted timestamp, or null if no frame is available.

Write(VersatileBuffer)

Writes an input video frame to the converter for framerate conversion.

public void Write(VersatileBuffer packet)

Parameters

packet VersatileBuffer

The input video frame to process.

Remarks

The frame may be dropped if it arrives too early relative to the expected output timing. Discontinuities in the input stream are automatically detected and handled.