Skip to main content

Crate oxideav_dvd

Crate oxideav_dvd 

Source
Expand description

Read-only DVD-Video disc reader — ISO 9660 + UDF 1.02 mount + VIDEO_TS/ directory walk.

Phase 1 (this release) handles the physical + filesystem + disc- identification layers — enough to point a player at a DVD-Video disc image or block device and enumerate the title-set files. No IFO / VOB / PGC / VM / CSS parsing yet.

§Scope

  • ISO 9660 PVD + path-table + directory walk (the ECMA-268 bridge layer).
  • UDF 1.02 mount: AVDP, Volume Descriptor Sequence, File Set Descriptor, root File Identifier Descriptor walk, File Entry parsing with short_ad / long_ad / ext_ad allocation descriptors.
  • VIDEO_TS/ file enumeration: VIDEO_TS.IFO + per-VTS VTS_xx_0.IFO / VTS_xx_0.VOB (menu) / VTS_xx_1..9.VOB (title content) / VTS_xx_0.BUP.
  • dvd:// URI handler (default-on registry feature) that surfaces a DvdDiscSource to oxideav_core::SourceRegistry.

Out of scope (deferred to Phase 2 / Phase 3):

  • IFO body parsing (VMGI, VTSI, PGCI, cell-address tables).
  • VOB demuxing (MPEG-2 Program Stream + nav-pack overlays).
  • VM execution (HDMV navigation opcodes, SPRMs / GPRMs).
  • CSS authentication + descrambling (lives in a future oxideav-css sibling crate).

§Sub-Picture Unit decoder (spu module)

The spu module parses one DVD subpicture (subtitle / menu overlay) blob assembled from concatenated PES packet payloads on substream 0x20..=0x3F: SPUH + the chained SP_DCSQT command stream + the two PXD fields’ 2-bit run-length-encoded pixel data. spu::SubPictureUnit::composite optionally resolves those palette indices through the PGC’s 16-entry ifo::PaletteEntry colour-LUT (BT.601 studio-swing YCbCr → RGB plus the SET_CONTR alpha) into a finished RGBA spu::SpuBitmap overlay; blending it onto the decoded video frame stays with the player.

§Phase 3b — mkv-output feature (default off)

Enable mkv-output to pull in [pipeline::convert_dvd_to_mkv], which walks a title’s VOBs and writes a Matroska file with the PGC’s chapter timeline. The feature pulls in oxideav-mkv as a runtime dependency; default builds (and default-feature CI) stay free of it so the crate keeps compiling against any published oxideav-mkv version.

§Clean-room references

  • docs/container/dvd/physical/ECMA-267_3rd_edition_april_2001.pdf
  • docs/container/dvd/physical/ECMA-268_3rd_edition_april_2001.pdf
  • docs/container/dvd/physical/OSTA_UDF_1.02.pdf
  • docs/container/bluray/ECMA-167_3rd_edition_june_1997.pdf (cross-ref)
  • docs/container/dvd/application/mpucoder-ifo.html (for the VIDEO_TS directory layout, file-naming convention, and BUP backup semantics only — IFO bodies are out of Phase-1 scope)

§Quick start

use oxideav_dvd::DvdDisc;

let disc = DvdDisc::open("path/to/disc.iso").unwrap();
println!("volume_id = {}", disc.volume_id);
println!("title_set_count = {}", disc.title_set_count);
for f in &disc.video_ts_files {
    println!("  {:?}  lba={}  size={}", f.kind, f.lba, f.size);
}

§Standalone build

oxideav-core is gated behind the default-on registry feature. Drop the framework dependency entirely with:

oxideav-dvd = { version = "0.0", default-features = false }

Re-exports§

pub use ac3::Ac3AudioCodingMode;
pub use ac3::Ac3BitstreamMode;
pub use ac3::Ac3Header;
pub use ac3::Ac3SampleRate;
pub use ac3::AC3_SYNC_WORD;
pub use disc::DvdDisc;
pub use disc::DvdFile;
pub use disc::DvdFileKind;
pub use error::Error;
pub use error::Result;
pub use ifo::menu_existence;
pub use ifo::AudioApplicationMode;
pub use ifo::AudioAttributes;
pub use ifo::AudioCodingMode;
pub use ifo::AudioLanguageType;
pub use ifo::AudioQuantizationDrc;
pub use ifo::CellAddrEntry;
pub use ifo::CellPlaybackInfo;
pub use ifo::CellPositionInfo;
pub use ifo::DvdChapter;
pub use ifo::DvdTitle;
pub use ifo::DvdTitleEntry;
pub use ifo::FrameRate;
pub use ifo::McExtensionEntry;
pub use ifo::MenuAttributes;
pub use ifo::MenuType;
pub use ifo::NavCommand;
pub use ifo::PaletteEntry;
pub use ifo::Pgc;
pub use ifo::PgcCommandTable;
pub use ifo::PgcTime;
pub use ifo::Pgci;
pub use ifo::PgciLu;
pub use ifo::PgciLuSrp;
pub use ifo::PgciSrp;
pub use ifo::PgciUt;
pub use ifo::PgciUtSrp;
pub use ifo::PtlMait;
pub use ifo::Ptt;
pub use ifo::PttTitle;
pub use ifo::SubpictureAttributes;
pub use ifo::SubpictureCodingMode;
pub use ifo::SubpictureLanguageType;
pub use ifo::TitleAttributes;
pub use ifo::TmapEntry;
pub use ifo::TtSrpt;
pub use ifo::VideoAspectRatio;
pub use ifo::VideoAttributes;
pub use ifo::VideoCodingMode;
pub use ifo::VideoResolution;
pub use ifo::VideoStandard;
pub use ifo::VmgIfo;
pub use ifo::VmgPtlMait;
pub use ifo::VmgVtsAtrt;
pub use ifo::VmgVtsAtrtEntry;
pub use ifo::VobuAdmap;
pub use ifo::VtsCAdt;
pub use ifo::VtsIfo;
pub use ifo::VtsPttSrpt;
pub use ifo::VtsTmap;
pub use ifo::VtsTmapti;
pub use ifo::VtsiMat;
pub use ifo::DVD_SECTOR;
pub use ifo::VMG_MAGIC;
pub use ifo::VTS_MAGIC;
pub use iso9660::DirectoryRecord;
pub use iso9660::Iso9660Entry;
pub use iso9660::Iso9660Volume;
pub use iso9660::PathTableEntry;
pub use iso9660::PrimaryVolumeDescriptor;
pub use iso9660::VolumeDescriptorType;
pub use lpcm::peel_lpcm_payload;
pub use lpcm::LpcmHeader;
pub use lpcm::LpcmQuantisation;
pub use lpcm::LpcmSampleFrequency;
pub use lpcm::DVD_LPCM_MAX_BITRATE_KBPS;
pub use lpcm::LPCM_HEADER_LEN;
pub use nav::CallSSTarget;
pub use nav::CmpOp;
pub use nav::JumpSSTarget;
pub use nav::LinkSubset;
pub use nav::NavInstruction;
pub use nav::Operand;
pub use nav::Register;
pub use nav::SetOp;
pub use source::parse_dvd_uri;
pub use source::DvdDiscSource;
pub use source::DvdUri;
pub use spu::decode_rle_field;
pub use spu::render_field;
pub use spu::spdcsq_stm_to_ms;
pub use spu::ycbcr_to_rgb;
pub use spu::PixelRun;
pub use spu::SpDcSq;
pub use spu::SpuBitmap;
pub use spu::SpuCommand;
pub use spu::SpuHeader;
pub use spu::SubPictureUnit;
pub use udf::AdType;
pub use udf::AnchorVolumeDescriptorPointer;
pub use udf::DescriptorTag;
pub use udf::ExtAd;
pub use udf::Extent;
pub use udf::FileEntry;
pub use udf::FileIdentifierDescriptor;
pub use udf::FileSetDescriptor;
pub use udf::IcbTag;
pub use udf::LbAddr;
pub use udf::LogicalVolumeDescriptor;
pub use udf::LongAd;
pub use udf::PartitionDescriptor;
pub use udf::ShortAd;
pub use udf::TagId;
pub use udf::UdfFile;
pub use udf::UdfVolume;
pub use uops::title_type_uop_mask;
pub use uops::UopIter;
pub use uops::UopLevel;
pub use uops::UopMask;
pub use uops::UserOp;
pub use uops::UOP_ANGLE_CHANGE;
pub use uops::UOP_AUDIO_STREAM_CHANGE;
pub use uops::UOP_BACKWARD_SCAN;
pub use uops::UOP_BIT_COUNT;
pub use uops::UOP_BUTTON_SELECT_OR_ACTIVATE;
pub use uops::UOP_DEFINED_BITS;
pub use uops::UOP_FORWARD_SCAN;
pub use uops::UOP_GO_UP;
pub use uops::UOP_KARAOKE_AUDIO_MIX_CHANGE;
pub use uops::UOP_MENU_CALL_ANGLE;
pub use uops::UOP_MENU_CALL_AUDIO;
pub use uops::UOP_MENU_CALL_PTT;
pub use uops::UOP_MENU_CALL_ROOT;
pub use uops::UOP_MENU_CALL_SUBPICTURE;
pub use uops::UOP_MENU_CALL_TITLE;
pub use uops::UOP_PAUSE_ON;
pub use uops::UOP_RESUME;
pub use uops::UOP_STILL_OFF;
pub use uops::UOP_STOP;
pub use uops::UOP_SUBPICTURE_STREAM_CHANGE;
pub use uops::UOP_TITLE_PLAY;
pub use uops::UOP_VIDEO_PRESENTATION_MODE_CHANGE;
pub use vm::AspectRatio;
pub use vm::AudioCapabilities;
pub use vm::AudioLanguageExt;
pub use vm::AudioMixMode;
pub use vm::AudioStreamSelector;
pub use vm::DisplayMode;
pub use vm::LanguageCode;
pub use vm::LinkAction;
pub use vm::ParentalLevel;
pub use vm::RegisterFile;
pub use vm::ResumePoint;
pub use vm::SubpictureLanguageExt;
pub use vm::SubpictureStreamView;
pub use vm::VideoPreference;
pub use vm::Vm;
pub use vm::VmAction;
pub use vm::GPRM_COUNT;
pub use vm::MAX_RSM_DEPTH;
pub use vm::SPRM_AMXMD;
pub use vm::SPRM_ANGLE;
pub use vm::SPRM_AUDIO_CAPS;
pub use vm::SPRM_AUDIO_STREAM;
pub use vm::SPRM_CC_PLT;
pub use vm::SPRM_COUNT;
pub use vm::SPRM_HL_BTNN;
pub use vm::SPRM_MENU_LANG;
pub use vm::SPRM_NV_PGCN;
pub use vm::SPRM_NV_TIMER;
pub use vm::SPRM_PARENTAL_LEVEL;
pub use vm::SPRM_PGCN;
pub use vm::SPRM_PREF_AUDIO_LANG;
pub use vm::SPRM_PREF_AUDIO_LANG_EXT;
pub use vm::SPRM_PREF_SUBP_LANG;
pub use vm::SPRM_PREF_SUBP_LANG_EXT;
pub use vm::SPRM_PTT;
pub use vm::SPRM_REGION_MASK;
pub use vm::SPRM_SUBPICTURE_STREAM;
pub use vm::SPRM_TITLE;
pub use vm::SPRM_VIDEO_PREF;
pub use vm::SPRM_VTS_TITLE;
pub use vob::demux_vobs;
pub use vob::demux_vobs_path;
pub use vob::looks_like_nav_pack;
pub use vob::ButtonInfo;
pub use vob::ButtonMode;
pub use vob::CellId;
pub use vob::DsiGi;
pub use vob::DsiPacket;
pub use vob::DvdSubstream;
pub use vob::ElementaryStream;
pub use vob::HighlightInfo;
pub use vob::HighlightStatus;
pub use vob::NavPack;
pub use vob::NsmlAgli;
pub use vob::NsmlAngleCell;
pub use vob::PackHeader;
pub use vob::PciPacket;
pub use vob::PesPacket;
pub use vob::SlColi;
pub use vob::SlColiCell;
pub use vob::SmlAgli;
pub use vob::SmlAngleCell;
pub use vob::SmlAudioGap;
pub use vob::SmlPbi;
pub use vob::Synci;
pub use vob::VobDemuxer;
pub use vob::VobId;
pub use vob::VobStreams;
pub use vob::VobuSri;
pub use source::register;

Modules§

ac3
DVD-Video AC-3 (Dolby Digital) sync-frame header decoder.
disc
High-level DVD-Video disc detection and VIDEO_TS/ enumeration.
error
Crate-local error type.
ifo
IFO body parser — Video Manager Information (VMGI), Video Title Set Information (VTSI), Program Chain Information (PGCI), Title Search Pointer Table (TT_SRPT), Part-of-Title Search Pointer Table (VTS_PTT_SRPT), Cell Address Table (VTS_C_ADT).
iso9660
Minimal read-only ISO 9660 (ECMA-119) reader.
lpcm
DVD-Video LPCM private_stream_1 audio-pack 7-byte header decoder.
nav
DVD-Video VM instruction decoder — Phase 3c precursor.
source
dvd:// URI scheme — opens a DVD-Video ISO image or block device and surfaces it to oxideav_core::SourceRegistry.
spu
DVD Sub-Picture Unit (SPU) decoder.
udf
Minimal read-only UDF 1.02 mounter, scoped to what’s needed to walk the VIDEO_TS/ and AUDIO_TS/ directories of a DVD-Video disc.
uops
DVD-Video User Operation flags (UOPs).
vm
DVD-Video VM interpreter — Phase 3c.
vob
VOB (Video OBject) demuxer — MPEG-2 Program Stream pack walker