add dvdnav_get_number_of_audio_streams
dvdnav_get_number_of_audio_streams provides a way of getting the number of audio streams in vts titles or dvd menus
Similar to !32 (comment 311038) it allows to obtain the audio stream count without using the private VM. In Kodi the usage is pretty similar, we get the the audio stream count [1] [2] and then obtain the audio stream info via dvdnav_get_audio_attr [3].
Refs:
Merge request reports
Activity
Is it worth it to duplicate the code, and not make it common with !32 (closed) ?
Yeah I thought about this but it seems to be common practice in the lib so, I thought it was intentional. For instance, the vm state checks are pretty much everywhere. I can replace both methods with a common one, something like:
int8_t dvdnav_get_number_of_streams(dvdnav_t *self, int32_t mode);
Where the mode value would be audio, subs, etc. What do you think? Let me know if you envision some other alternative
Edited by Miguel Borges de Freitas
mentioned in merge request !34 (merged)
superseeded by !34 (merged)