Class PlatformDetector

Namespace
CHDSharp.Encoder
Assembly
CHDSharpLib.dll

Detects the game platform of a raw disc image (CHDlite detect_input parity) and picks smart per-platform codec presets (CHDlite smart_compression_for, chd_archiver.cpp:124-165). Works on raw .bin/.iso/.img files and on CUE/GDI/NRG descriptors before archiving.

public static class PlatformDetector
Inheritance
PlatformDetector
Inherited Members

Methods

AutoCodecs(DiscPlatform, string)

Selects the smart default codec list for a detected platform and content format (CHDlite smart_compression_for parity): PS2 DVD → zlib; PS2 CD → cdzl+cdfl; other DVD → zstd; other CD/GD-ROM → cdzs+cdfl. Returns null when no smart default applies (caller falls back to its own defaults).

public static uint[]? AutoCodecs(DiscPlatform platform, string format)

Parameters

platform DiscPlatform
format string

Returns

uint[]

Detect(string)

Detects the platform of a disc image file. For CUE/GDI/NRG descriptors the track layout is parsed and sectors are read from the underlying track files; for raw .bin/.iso/.img files the sector size is inferred from the content.

public static DiscPlatformInfo Detect(string inputPath)

Parameters

inputPath string

Path to the disc image (cue/gdi/nrg/iso/bin/img).

Returns

DiscPlatformInfo

The detection result; on parse failure the platform is Unknown.