Use psx-fmv to assemble a movie-playback pipeline from explicit pieces, or call player::play to stream one movie from the disc, decode it and show it. With the pieces, your program remains responsible for feeding sectors and presenting decoded frames.
How the crate is organized
stream demultiplexes STR sectors and assembles frame chunks. bitstream decodes version-1 and version-2 bitstreams into MDEC run-length data, with rle and idct below it. mdec, available on the PS1 target, transfers input and output through DMA0/DMA1, either waiting for each column or starting it and polling, and holds the MdecDma token while it does. iso finds root-directory files in ISO9660 data. player, also PS1 only, runs the whole pipeline overlapped: the drive, the bitstream decode of the next frame, the MDEC and the VRAM upload all work at once, at 15 or 24 bits, with XA audio, and the caller lends the memory and a skip poll.
Integration notes
The bitstream decoder accepts versions 1 and 2, which are coded alike; version 3 is rejected. Keep CD servicing frequent enough while decoding and uploading columns to VRAM. The caller must schedule CD, DMA, audio and presentation work and budget its buffers. The parser modules can be tested on the host; host success does not verify the hardware transfer path.
The complete hello-fmv source includes its library and boot wrapper, explains the required MOVIE.STR, and distinguishes lost sectors, bad sectors and late frames.
API, dependencies and source structure
SDK revision f2fec1c301f1. Structure, dependencies and features below come from this revision.
The PS1 reference includes all Cargo features. The manifest below shows which features are enabled by default.
Dependencies
psx-gpu: all targetspsx-hw(shared repository crate): all targetspsx-io: all targetspsx-pack: all targetspsx-rt: all targetspsx-spu: all targetspsx-vram: all targets
Cargo features
This crate declares no Cargo features.
Read the complete manifest and feature comments.
Source layout
The list includes internal implementation and test files. Public modules, types, functions and their signatures are indexed in the API reference above.
10 source and manifest files
Cargo.tomlsrc/bitstream.rs: BS ("bitstream") frame decode: variable-length codes to MDEC run-lengthsrc/idct.rs: The MDEC's IDCT matrix, generated from the DCT basis.src/iso.rs: Minimal ISO9660 lookup: find a file in the disc's root directory.src/lib.rs: FMV playback building blocks for PS1 guests.src/mdec.rs: MDEC driver: table upload, decode command, DMA0 in, DMA1 out.src/player.rs: A streaming STR player a game can call:playstreams one movie fromsrc/rle.rs: Run-length data: whatcrate::bitstream::decode_frameproduces and thesrc/stream.rs: STR video sectors: the 32-byte chunk header and frame reassembly.tests/encoder_stream.rs: Round trip against real encoder output: demux every frame of a