bdnav/bdjo: cite the BDJO format, not libbluray's GPL source (scan-secrets REF-IMPL-CITATION)

This commit is contained in:
Matthew Jackson
2026-09-20 20:45:55 -07:00
parent b0e297bd41
commit 0062d79d2c
+6 -7
View File
@@ -6,11 +6,10 @@
//! `classpath_extension`, and `initial_class` (the Xlet's fully-qualified class //! `classpath_extension`, and `initial_class` (the Xlet's fully-qualified class
//! name). Everything else in the file is skipped by width. //! name). Everything else in the file is skipped by width.
//! //!
//! Layout mirrors libbluray's `bdjo_parse.c` (`_parse_header` + //! Layout follows the published BD-J Object (BDJO) file format: a fixed 48-byte
//! `_parse_terminal_info` + `_parse_app_cache_info` + //! header (8-byte magic+version, then a 40-byte section-address table that real
//! `_parse_accessible_playlists` + `_parse_app_management_table`): the sections //! players skip), followed by the terminal-info, app-cache-info,
//! are laid out sequentially right after a fixed 48-byte header (8-byte //! accessible-playlists, and application-management-table sections in sequence.
//! magic+version, then a 40-byte section-address table that real players skip).
//! //!
//! This is a DOCUMENTED BINARY FORMAT read as data, never executed. Every field //! This is a DOCUMENTED BINARY FORMAT read as data, never executed. Every field
//! is bounds-checked and any malformed input yields `None` — panic-free like //! is bounds-checked and any malformed input yields `None` — panic-free like
@@ -119,7 +118,7 @@ pub(crate) fn parse(data: &[u8]) -> Option<Vec<BdjoApp>> {
Some(apps) Some(apps)
} }
// Parse one Application() record (`_parse_bdjo_app` in libbluray). // Parse one Application() record from the Application Management Table.
fn parse_app(r: &mut BitReader<'_>) -> Option<BdjoApp> { fn parse_app(r: &mut BitReader<'_>) -> Option<BdjoApp> {
let control_code = r.read(8)? as u8; let control_code = r.read(8)? as u8;
r.skip(4)?; // application_type r.skip(4)?; // application_type
@@ -184,7 +183,7 @@ fn read_app_string(r: &mut BitReader<'_>) -> Option<String> {
} }
// ── MSB-first bit reader ───────────────────────────────────────────────────── // ── MSB-first bit reader ─────────────────────────────────────────────────────
// Mirrors libbluray's BITSTREAM: bits are consumed most-significant-first. // BDJO integers are bit-packed and consumed most-significant-first.
// Every read/skip is bounds-checked and returns `None` past the end. // Every read/skip is bounds-checked and returns `None` past the end.
struct BitReader<'a> { struct BitReader<'a> {
data: &'a [u8], data: &'a [u8],