Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/libdvdnav
  • thresh/libdvdnav
  • robUx4/libdvdnav
  • jsgh/libdvdnav
  • chouquette/libdvdnav
  • jbk/libdvdnav
  • martymac/libdvdnav
  • Mathias_Couder/libdvdnav
  • DimitriPapadopoulos/libdvdnav
  • hpi/libdvdnav
  • miguelborgesdefreitas/libdvdnav
  • dmahurin/libdvdnav
  • ATinySpaceMarine/libdvdnav
  • masstock/libdvdnav
14 results
Show changes
Commits on Source (2)
libdvdnav (next)
* add dvdnav_get_volid_string to obtain the volume id of the disc
* add dvdnav_get_number_of_streams API to list tracks
* add dvdnav_set_active_stream API to activate a stream
* add dvdnav_toggle_spu_stream API to enable/disable the current SPU stream
......
......@@ -955,6 +955,28 @@ dvdnav_status_t dvdnav_get_serial_string(dvdnav_t *this, const char **serial_str
return DVDNAV_STATUS_OK;
}
const char * dvdnav_get_volid_string(dvdnav_t *this) {
if (!this || !this->vm || !this->vm->dvd) {
printerr("Invalid state, vm or reader not available.");
return NULL;
}
char *volid_str = malloc(33);
if (volid_str == NULL) {
printerr("Insufficient memory available.");
return NULL;
}
if (DVDUDFVolumeInfo(this->vm->dvd, volid_str, 32, NULL, 0) == -1) {
if (DVDISOVolumeInfo(this->vm->dvd, volid_str, 33, NULL, 0) == -1) {
printerr("Failed to obtain volume id.");
free(volid_str);
return NULL;
}
}
return volid_str;
}
uint8_t dvdnav_get_video_aspect(dvdnav_t *this) {
uint8_t retval;
......
......@@ -588,7 +588,7 @@ dvdnav_status_t dvdnav_spu_language_select(dvdnav_t *self,
* this is a descriptive string such as `THE_MATRIX' but sometimes is singularly
* uninformative such as `PDVD-011421'. Some DVD authors even forget to set this,
* so you may also read the default of the authoring software they used, like
* `DVDVolume'.
* `DVDVolume' (see also dvdnav_get_volid_string).
*/
dvdnav_status_t dvdnav_get_title_string(dvdnav_t *self, const char **title_str);
......@@ -599,6 +599,19 @@ dvdnav_status_t dvdnav_get_title_string(dvdnav_t *self, const char **title_str);
*/
dvdnav_status_t dvdnav_get_serial_string(dvdnav_t *self, const char **serial_str);
/*
* Returns the VolumeIdentifier of the disc or NULL if it could
* not be obtained. The VolumeIdentifier might be latin-1 encoded
* (8bit unicode) null terminated and max 32 bytes (including '\0');
* or coded with '0-9','A-Z','_' null terminated and max 33 bytes
* (including '\0').
* See also dvdnav_get_title_string
*
* Note: The string is malloc'd so caller has to free() the returned
* string when done with it.
*/
const char * dvdnav_get_volid_string(dvdnav_t *self);
/*
* Get video aspect code.
* The aspect code does only change on VTS boundaries.
......