Table of Contents

Class ConfigurationParser

Namespace
VAST.Codecs.Mpeg4
Assembly
VAST.Common.dll

Provides parsing functionality for MPEG-4 Part 2 (Visual) video configuration data.

public class ConfigurationParser
Inheritance
ConfigurationParser
Inherited Members

Constructors

ConfigurationParser()

Initializes a new instance of the ConfigurationParser class.

public ConfigurationParser()

Properties

AspectRatio

Gets the pixel aspect ratio parsed from the Video Object Layer (VOL).

public Rational AspectRatio { get; }

Property Value

Rational

Bitrate

Gets the bitrate in bits per second calculated from the VBV parameters.

public int Bitrate { get; }

Property Value

int

FrameRate

Gets the frame rate as a rational number derived from VOP time increment resolution and fixed VOP time increment.

public Rational FrameRate { get; }

Property Value

Rational

HaveBFrames

Gets a value indicating whether the video stream contains B-frames (bidirectional predicted frames).

public bool HaveBFrames { get; }

Property Value

bool

Height

Gets the video height in pixels parsed from the Video Object Layer (VOL).

public int Height { get; }

Property Value

int

Level

Gets the level indicator extracted from the lower 4 bits of the profile and level indication.

public int Level { get; }

Property Value

int

Profile

Gets the profile indicator extracted from the upper 4 bits of the profile and level indication.

public int Profile { get; }

Property Value

int

ProfileLevel

Gets the combined profile and level indicator parsed from the Visual Object Sequence (VOS).

public int ProfileLevel { get; }

Property Value

int

Width

Gets the video width in pixels parsed from the Video Object Layer (VOL).

public int Width { get; }

Property Value

int

Methods

FindVopStart(VersatileBuffer, int, int)

Finds the position of the VOP (Video Object Plane) start code in the buffer.

public static int FindVopStart(VersatileBuffer buffer, int startPosition, int bufferLength)

Parameters

buffer VersatileBuffer

The buffer to search.

startPosition int

The position within the buffer to start searching.

bufferLength int

The length of valid data in the buffer.

Returns

int

The position of the VOP start code, or -1 if not found.

Parse(byte[])

Parses MPEG-4 Part 2 video configuration from a byte array containing the Visual Object Sequence.

public int Parse(byte[] buffer)

Parameters

buffer byte[]

The buffer containing the MPEG-4 video data with VOS/VOL headers.

Returns

int

Returns 1 when parsing completes.