diff options
author | titer <[email protected]> | 2006-04-19 20:25:37 +0000 |
---|---|---|
committer | titer <[email protected]> | 2006-04-19 20:25:37 +0000 |
commit | 1d4535870a4212535c56f79f784c30a018a3e646 (patch) | |
tree | 750fb15df400421474e393563ce2e4edda9c9b96 /libhb/dvd.c | |
parent | 72738ac78c91e391c1e03714f7142d325116d5a6 (diff) |
Show the name of the DVD instead of /dev/rdiskX
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@64 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/dvd.c')
-rw-r--r-- | libhb/dvd.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libhb/dvd.c b/libhb/dvd.c index f0cc521bc..7d19fae11 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -41,6 +41,29 @@ struct hb_dvd_s static void FindNextCell( hb_dvd_t * ); static int dvdtime2msec( dvd_time_t * ); +char * hb_dvd_name( char * path ) +{ + static char name[1024]; + unsigned char unused[1024]; + dvd_reader_t * reader; + + reader = DVDOpen( path ); + if( !reader ) + { + return NULL; + } + + if( DVDUDFVolumeInfo( reader, name, sizeof( name ), + unused, sizeof( unused ) ) ) + { + DVDClose( reader ); + return NULL; + } + + DVDClose( reader ); + return name; +} + /*********************************************************************** * hb_dvd_init *********************************************************************** |