OSDN Git Service

Gives the CLI a separate option for adding the iPod UUID atom to mp4 files, instead...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 28 Nov 2007 20:40:47 +0000 (20:40 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 28 Nov 2007 20:40:47 +0000 (20:40 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@1084 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.h
libhb/muxmp4.c
test/test.c

index 1f16366..988ea3d 100644 (file)
@@ -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;
index 0760aac..13e2247 100644 (file)
@@ -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);
index 6cd7005..2fb20db 100644 (file)
@@ -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;