summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortiter <[email protected]>2006-04-20 12:30:53 +0000
committertiter <[email protected]>2006-04-20 12:30:53 +0000
commit981920783c91687707aa4131ed83073503f3cd74 (patch)
tree6b04c5ee62a22292d8fe0850fc50443600f9e556
parent1d4535870a4212535c56f79f784c30a018a3e646 (diff)
Use the DVD name for the output file
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@65 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/common.h1
-rw-r--r--libhb/dvd.c6
-rw-r--r--macosx/ExpressController.m5
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 );
}