[DVDnav-discuss] Trying to get volume id of dvd. But not sure how?

Steve Dibb beandog at gentoo.org
Sat Apr 12 07:03:17 CEST 2014


pauline martin <321eniluap at ...> writes:

> 
> Hi,
> 
> I am trying to fix a broken application and I am having trouble with
> figuring out how to fix it's method of getting the name of the dvd.  It
> used to use hal for this, but I would like to switch it to depending on
> libdvdnav/libdvdread for it.
> 
> The best that I can figure out is that I am supposed to use
> this->vm->dvd_name to get it, but I am not sure exactly on how to 
implement
> it in the C++ code.
> 
> I have also seen some stuff that goes somthing like: info->tt_srpt but I
> can not find anything that gives me the answer I am looking for.  I can 
get
> the number of titles and stuff like that but nothing that even remotely
> comes close to giving me the volume id of the dvd.  Is this possible?
> 

There's a couple of ways to get unique identifiers from a DVD, but I'm going 
to assume you mean the title, which is a 32-character string.

dvdnav has a function, dvdnav_get_title_string().  http://git.videolan.org/?
p=libdvdnav.git;a=blob;f=src/dvdnav.c;h=bd579dc3977908719e28f4788a89afa077ed
5d8e;hb=HEAD#l878

lsdvd just grabs the bytes directly from the volume: 
https://github.com/thierer/lsdvd/blob/master/lsdvd-0.16/lsdvd.c#L125-L156

'volname' would do the same thing -- used to ship with util-linux, I think.  
I haven't seen it in a while.

Finally, I've got a little C program I wrote on my own that just grabs the 
title.  https://github.com/beandog/dvd_info/blob/master/dvd_title.c

hth

Steve



More information about the DVDnav-discuss mailing list