From 981920783c91687707aa4131ed83073503f3cd74 Mon Sep 17 00:00:00 2001 From: titer Date: Thu, 20 Apr 2006 12:30:53 +0000 Subject: Use the DVD name for the output file git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@65 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/common.h | 1 + libhb/dvd.c | 6 ++++++ macosx/ExpressController.m | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libhb/common.h b/libhb/common.h index f5af73c03..866eb98b2 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -240,6 +240,7 @@ struct hb_subtitle_s struct hb_title_s { char dvd[1024]; + char name[1024]; int index; int vts; int ttn; diff --git a/libhb/dvd.c b/libhb/dvd.c index 7d19fae11..4c894a907 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -121,8 +121,14 @@ hb_title_t * hb_dvd_title_scan( hb_dvd_t * d, int t ) int c; uint64_t duration; float duration_correction; + unsigned char unused[1024]; title = hb_title_init( d->path, t ); + if( DVDUDFVolumeInfo( d->reader, title->name, sizeof( title->name ), + unused, sizeof( unused ) ) ) + { + goto fail; + } hb_log( "scan: scanning title %d", t ); diff --git a/macosx/ExpressController.m b/macosx/ExpressController.m index 5121f9173..9191bb7e6 100644 --- a/macosx/ExpressController.m +++ b/macosx/ExpressController.m @@ -284,8 +284,9 @@ } job->file = strdup( [[NSString stringWithFormat: - @"%@/%p - Title %d.mp4", fConvertFolderString, self, - title->index] UTF8String] ); + @"%@/%s - Title %d - %@.mp4", fConvertFolderString, + title->name, title->index, [fConvertFormatPopUp + titleOfSelectedItem]] UTF8String] ); hb_add( fHandle, job ); } -- cgit v1.2.3