summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-11-28 20:40:47 +0000
committerjbrjake <[email protected]>2007-11-28 20:40:47 +0000
commit1756f9b6ab9ead7effc6d8daaeb7fe90156ad3be (patch)
tree9f7eb373e2675a8f2bebb981694fa3222e9fb6bf
parent048267df5fff981e702edc5e44d7ac6115221d7d (diff)
Gives the CLI a separate option for adding the iPod UUID atom to mp4 files, instead of it just being a side-effect of using the x264b30 encoder. It's called with -I or --ipod-atom .
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1084 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/common.h1
-rw-r--r--libhb/muxmp4.c2
-rw-r--r--test/test.c14
3 files changed, 14 insertions, 3 deletions
diff --git a/libhb/common.h b/libhb/common.h
index 1f16366e8..988ea3d55 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -260,6 +260,7 @@ struct hb_job_s
/* Allow MP4 files > 4 gigs */
int largeFileSize;
int mp4_optimize;
+ int ipod_atom;
int indepth_scan;
hb_subtitle_t ** select_subtitle;
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index 0760aac64..13e2247a1 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -200,7 +200,7 @@ static int MP4Init( hb_mux_object_t * m )
MP4AddH264PictureParameterSet( m->file, mux_data->track,
job->config.h264.pps, job->config.h264.pps_length );
- if( job->h264_level == 30)
+ if( job->h264_level == 30 || job->ipod_atom)
{
hb_log("About to add iPod atom");
AddIPodUUID(m->file, mux_data->track);
diff --git a/test/test.c b/test/test.c
index 6cd70054d..2fb20dbc4 100644
--- a/test/test.c
+++ b/test/test.c
@@ -71,6 +71,7 @@ static int preset = 0;
static char * preset_name = 0;
static int vfr = 0;
static int mp4_optimize = 0;
+static int ipod_atom = 0;
/* Exit cleanly on Ctrl-C */
static volatile int die = 0;
@@ -853,6 +854,10 @@ static int HandleEvents( hb_handle_t * h )
{
job->mp4_optimize = 1;
}
+ if ( ipod_atom )
+ {
+ job->ipod_atom = 1;
+ }
job->file = strdup( output );
@@ -1095,6 +1100,7 @@ static void ShowHelp()
" -4, --large-file Use 64-bit mp4 files that can hold more than\n"
" 4 GB. Note: Breaks iPod, @TV, PS3 compatibility.\n"""
" -O, --optimize Optimize mp4 files for HTTP streaming\n"
+ " -I, --ipod-atom Mark mp4 files so iPods will accept them\n"
"\n"
"### Picture Settings---------------------------------------------------------\n\n"
@@ -1253,6 +1259,7 @@ static int ParseOptions( int argc, char ** argv )
{ "output", required_argument, NULL, 'o' },
{ "large-file", no_argument, NULL, '4' },
{ "optimize", no_argument, NULL, 'O' },
+ { "ipod-atom", no_argument, NULL, 'I' },
{ "title", required_argument, NULL, 't' },
{ "longest", no_argument, NULL, 'L' },
@@ -1301,7 +1308,7 @@ static int ParseOptions( int argc, char ** argv )
int c;
c = getopt_long( argc, argv,
- "hvuC:f:4i:o:t:Lc:ma:6:s:UFN:e:E:2d789gpOP::w:l:n:b:q:S:B:r:R:Qx:TY:X:VZ:z",
+ "hvuC:f:4i:Io:t:Lc:ma:6:s:UFN:e:E:2d789gpOP::w:l:n:b:q:S:B:r:R:Qx:TY:X:VZ:z",
long_options, &option_index );
if( c < 0 )
{
@@ -1346,7 +1353,10 @@ static int ParseOptions( int argc, char ** argv )
case 'O':
mp4_optimize = 1;
break;
-
+ case 'I':
+ ipod_atom = 1;
+ break;
+
case 't':
titleindex = atoi( optarg );
break;