[libdvdnav-devel] [Git][videolan/libdvdread][master] 4 commits: ifo_types: describe the DVD-Audio disc model
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Aug 14 17:21:24 UTC 2026
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread
Commits:
d111ea99 by Saifelden Mohamed Ismail at 2026-08-14T18:13:30+03:00
ifo_types: describe the DVD-Audio disc model
- - - - -
d8a43ac5 by Saifelden Mohamed Ismail at 2026-08-14T18:13:58+03:00
ifo_types: describe the album menu
- - - - -
c4ffce53 by Saifelden Mohamed Ismail at 2026-08-14T18:14:35+03:00
ifo_types: describe what an audio title set holds
- - - - -
859008d9 by Saifelden Mohamed Ismail at 2026-08-14T18:15:10+03:00
dvd_reader: document the DVD-Audio open and read paths
- - - - -
2 changed files:
- src/dvdread/dvd_reader.h
- src/dvdread/ifo_types.h
Changes:
=====================================
src/dvdread/dvd_reader.h
=====================================
@@ -160,7 +160,11 @@ DVDREAD_API dvd_reader_t *DVDOpenStream( void *, dvd_reader_stream_cb * );
DVDREAD_API dvd_reader_t *DVDOpen2( void *, const dvd_logger_cb *, const char *);
DVDREAD_API dvd_reader_t *DVDOpenStream2( void *, const dvd_logger_cb *, dvd_reader_stream_cb *);
-/* in the case the the type was autodetected, can check with dvd->dvd_type */
+/* The calls above pick the type from the disc. A disc holding only an audio
+ * zone opens as DVD-Audio, but a disc holding both zones opens as DVD-Video.
+ * Use the call below to reach the audio zone of such a disc. The chosen type
+ * is not readable back from the handle, open an IFO and read ifo_format */
+
/* To explicitly open the disc as DVD-Audio */
DVDREAD_API dvd_reader_t *DVDOpenAudio( void *, const dvd_logger_cb *, const char *);
DVDREAD_API dvd_reader_t *DVDOpenStreamAudio( void *, const dvd_logger_cb *, dvd_reader_stream_cb *);
@@ -204,13 +208,22 @@ DVDREAD_API void DVDClose( dvd_reader_t * );
typedef enum {
DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) */
DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) */
- DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) */
+ DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title).
+ A DVD-Audio disc has only two menu files.
+ Title 0 gives AUDIO_TS.VOB, holding the
+ album menu pages, and any other title gives
+ AUDIO_SV.VOB, holding the stills shown
+ while a track plays. */
DVD_READ_TITLE_VOBS, /**< VTS_XX_[1-9].VOB (title). All files in
the title set are opened and read as a
- single file. */
- DVD_READ_SAMG_INFO, /* for the AUDIO_PP.IFO */
- DVD_READ_ASVS_INFO, /* for the AUDIO_SV.IFO */
- DVD_READ_ASVS_INFO_BACKUP, /* for the AUDIO_SV.BUP */
+ single file.
+ On a DVD-Audio disc this gives the AOB files
+ of the title set. A title set with no AOB
+ files of its own plays the video files of
+ the video title set it points at instead. */
+ DVD_READ_SAMG_INFO, /**< AUDIO_PP.IFO, the simple audio manager */
+ DVD_READ_ASVS_INFO, /**< AUDIO_SV.IFO, the still picture set */
+ DVD_READ_ASVS_INFO_BACKUP, /**< AUDIO_SV.BUP */
} dvd_read_domain_t;
/**
=====================================
src/dvdread/ifo_types.h
=====================================
@@ -499,6 +499,21 @@ typedef struct {
#define DOWNMIX_COEFF_SIZE 18U
+/**
+ * DVD-Audio
+ *
+ * A disc holds one album. An album holds up to nine groups and each group
+ * holds up to ninety nine tracks. A group is stored as one audio title set,
+ * an ATS_XX_0.IFO file and the AOB files beside it. A track is one audio
+ * program inside that title set.
+ *
+ * A track may carry extra track numbers called track points. A track point
+ * marks a time inside its parent track, the start of a lyric page for
+ * example, and shows as its own track number without splitting the audio.
+ * A title using them holds more cells than programs. A track point may also
+ * carry a still of its own, and then the track and all of its points do.
+ */
+
/**
* SAMG
*
@@ -547,6 +562,30 @@ typedef struct {
* The following structures relate to the Audio Manager, exclusive to DVD-Audio discs
*/
+/**
+ * The album menu
+ *
+ * The menu pages are program chains in the table at amgm_pgci_ut_sa and their
+ * video sits in AUDIO_TS.VOB. A page addresses its cells from the start of
+ * that file, and the first sector of a cell holds the nav pack with the
+ * buttons, as on a DVD-Video menu.
+ *
+ * The top menu is the page with entry id 0x82. The rest carry no entry id and
+ * are reached only through buttons. A button plays a track, or moves to
+ * another page, the first page, or the page before or after.
+ *
+ * A page may name the button it starts on. When it does not, most players
+ * return to the button last left selected there.
+ *
+ * A top or playlist page only shows while nothing is playing. A page may
+ * instead be marked active and keep its buttons working while a track plays,
+ * and its track buttons then reach only that track's group. A page backed by
+ * video cannot be active, may loop, and shows its buttons late.
+ *
+ * The page names come from the text data manager at txtdt_mgi_sa when the
+ * disc has one.
+ */
+
/**
* Audio Manager Information Management Table.
*/
@@ -561,7 +600,8 @@ typedef struct {
uint16_t amg_this_volume_nr;
uint8_t disc_side;
uint8_t zero_3[4];
- uint8_t autoplay;
+ uint8_t autoplay; /* when zero the player shows the top menu once the
+ disc is in, otherwise it starts the first track */
uint32_t audio_sv_ifo_relative_p;
uint16_t unknown_1; /* some discs have a value here, undocumented in DVD-Audio specs */
uint8_t zero_4[8];
@@ -849,7 +889,8 @@ typedef struct {
/* 8f 44khz, 0f 48khz, 1f 96khz, 2f 192khz*/
/* otherwise if its 5.1 channels each nibble represents a channel group (G1, G2)*/
uint8_t sampling_frequency;
- /* 00 1 channel, 01 2 channels, 11 5.1 channels*/
+ /* the channel layout, not a count. 00 1 channel, 01 2 channels,
+ * 11 5.1 channels, and on up to 20 */
uint8_t nr_channels;
uint8_t unknown2;
uint8_t zero[10];
@@ -903,6 +944,10 @@ typedef struct {
} ATTRIBUTE_PACKED atsi_mat_t;
#define ATSI_MAT_SIZE 672U
+/* One entry per title. A title holding two audio streams of the same length,
+ * a surround and a stereo mix for example, gets a primary and a secondary
+ * entry with the same title number, one with the top bit set and one without.
+ * The listener picks between them on the player */
typedef struct {
uint8_t srp_index; /* 1-based, top bit set marks the primary entry and clear the secondary */
uint8_t srp_flags; /* varies per entry, purpose not established */
@@ -912,7 +957,11 @@ typedef struct {
} ATTRIBUTE_PACKED atsi_title_index_t;
#define ATSI_TITLE_INDEX_SIZE 8U
-/* one per audio program in the title (the ATS_PGI) */
+/* One per audio program in the title (the ATS_PGI).
+ *
+ * Start times do not run straight through a title. A program that raises the
+ * discontinuity bit starts a new timeline near zero, and one that does not
+ * carries on from the program before it and follows it with no gap. */
typedef struct {
uint8_t prog_alloc_flags; /* b7 the relation to the previous program, set
on the first; b6 an STC discontinuity;
@@ -1018,6 +1067,9 @@ typedef struct {
* An ASVU groups the still pictures (ASVs) that are loaded before the
* matching audio program plays. Each ASV is one still I-picture with
* optional sub-picture streams.
+ *
+ * A still belongs to a track and shows while it plays, either on a timer or
+ * stepped through by the listener.
*/
/* general information for one Audio Still Video Unit */
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/09530764823f3fb5b9ab32b80e4620438c1eed53...859008d961c365986fe1d9b40d0d5384b985a49d
--
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/09530764823f3fb5b9ab32b80e4620438c1eed53...859008d961c365986fe1d9b40d0d5384b985a49d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libdvdnav-devel
mailing list