Table of Contents

Class DVDGPRMArray

Namespace
VisioForge.Core.Types.MediaInfo
Assembly
VisioForge.Core.dll

Represents an array of DVD General Purpose Register Memory (GPRM) values used for DVD navigation and playback control.

public class DVDGPRMArray

Inheritance

Inherited Members

Examples

// Read current GPRM values to understand DVD navigation state
var gprmArray = dvdInfo.Disc_GPRMs;

// Display all GPRM values
for (int i = 0; i < gprmArray.Registers.Length; i++)
{
    Console.WriteLine($"GPRM[{i}] = {gprmArray.Registers[i]}");
}

// Check specific GPRM used for menu selection
short menuSelection = gprmArray.Registers[0];
switch (menuSelection)
{
    case 1:
        Console.WriteLine("Main menu selected");
        break;
    case 2:
        Console.WriteLine("Chapter selection menu");
        break;
    case 3:
        Console.WriteLine("Audio/Subtitle setup menu");
        break;
}

// Monitor GPRM changes during playback
var previousGPRMs = gprmArray.Registers.ToArray();
// ... after some navigation ...
var currentGPRMs = dvdInfo.Disc_GPRMs.Registers;

for (int i = 0; i < 16; i++)
{
    if (previousGPRMs[i] != currentGPRMs[i])
    {
        Console.WriteLine($"GPRM[{i}] changed from {previousGPRMs[i]} to {currentGPRMs[i]}");
    }
}

Remarks

DVD General Purpose Registers (GPRMs) are 16 storage locations (registers 0-15) that can be used by DVD authors to store values and control navigation logic during playback. These registers act as variables in the DVD's programming language (DVD-Video Virtual Machine commands).

GPRMs are used for: - Storing user selections and preferences during playback - Implementing complex navigation logic and branching - Tracking viewing history or progress through content - Controlling conditional playback based on user choices - Creating interactive games or quizzes on DVD - Implementing parental control features

Each GPRM is a 16-bit register that can store values from -32768 to 32767 (signed) or 0 to 65535 (unsigned). The DVD Virtual Machine can perform operations like load, store, add, subtract, and compare on these registers. GPRMs persist only during the current playback session and are reset when the disc is ejected.

Common GPRM usage patterns: - GPRM 0-3: Often used for menu navigation state - GPRM 4-7: Frequently used for angle and audio stream selection - GPRM 8-11: Commonly used for subtitle selection and display options - GPRM 12-15: Typically used for custom interactive features

Properties

Registers

Gets or sets the array containing all 16 General Purpose Register Memory (GPRM) values.

public short[] Registers { get; set; }

Property Value

short[]

Remarks

These registers are volatile and exist only during the current playback session. They are used by DVD navigation commands to implement interactive features, track user choices, and control conditional branching in DVD menus and playback. The interpretation of each register's value depends on how the DVD author programmed the disc's navigation logic.