All pastes #784563 Raw Edit

Mine

public diff v1 · immutable
·published 2007-11-19 19:14 UTC
rendered paste body
Index: test/test.c===================================================================--- test/test.c	(revision 1055)+++ test/test.c	(working copy)@@ -70,6 +70,7 @@ static int    preset        = 0; static char * preset_name   = 0; static int    vfr           = 0;+static int    mp4_optimize  = 0;  /* Exit cleanly on Ctrl-C */ static volatile int die = 0;@@ -856,6 +857,10 @@             {                 job->largeFileSize = 1;             }+            if ( mp4_optimize )+            {+                job->mp4_optimize = 1;+            }                          job->file = strdup( output ); @@ -1099,6 +1104,7 @@     "                            autodetected from file name)\n"     "    -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"     "\n" 	 	"### Picture Settings---------------------------------------------------------\n\n"@@ -1256,6 +1262,7 @@             { "input",       required_argument, NULL,    'i' },             { "output",      required_argument, NULL,    'o' },             { "large-file",  no_argument,       NULL,    '4' },+            { "optimize",    no_argument,       NULL,    'O' },                          { "title",       required_argument, NULL,    't' },             { "longest",     no_argument,       NULL,    'L' },@@ -1304,7 +1311,7 @@         int c;          c = getopt_long( argc, argv,-                         "hvuC:f:4i:o:t:Lc:ma:6:s:UFN:e:E:2d789gpP::w:l:n:b:q:S:B:r:R:Qx:TY:X:VZ:z",+                         "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",                          long_options, &option_index );         if( c < 0 )         {@@ -1346,6 +1353,10 @@             case '4':                 largeFileSize = 1;                 break;+            case 'O':+                mp4_optimize = 1;+                break;+             case 't':                 titleindex = atoi( optarg );                 break;Index: libhb/muxmp4.c===================================================================--- libhb/muxmp4.c	(revision 1055)+++ libhb/muxmp4.c	(working copy)@@ -323,6 +323,9 @@         /* Set the correct number of channels for this track */         reserved2[9] = (u_int8_t)HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->amixdown);         MP4SetTrackBytesProperty(m->file, mux_data->track, "mdia.minf.stbl.stsd.mp4a.reserved2", reserved2, sizeof(reserved2));++        /* If we ever upgrade mpeg4ip, the line above should be replaced with the line below.*/+//        MP4SetTrackIntegerProperty(m->file, mux_data->track, "mdia.minf.stbl.stsd.mp4a.channels",  (u_int16_t)HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->amixdown));                  /* store a reference to the first audio track,         so we can use it to feed the chapter text track's sample rate */@@ -464,11 +467,6 @@         free(sample);     }     -#if 0-    hb_job_t * job = m->job;-    char filename[1024]; memset( filename, 0, 1024 );-#endif-     if (job->areBframes)     /* Walk the entire video sample table and find the minumum ctts value. */     {@@ -499,13 +497,15 @@      MP4Close( m->file ); -#if 0-    hb_log( "muxmp4: optimizing file" );-    snprintf( filename, 1024, "%s.tmp", job->file );-    MP4Optimize( job->file, filename, MP4_DETAILS_ERROR );-    remove( job->file );-    rename( filename, job->file );-#endif+    if ( job->mp4_optimize )+    {+        hb_log( "muxmp4: optimizing file" );+        char filename[1024]; memset( filename, 0, 1024 );+        snprintf( filename, 1024, "%s.tmp", job->file );+        MP4Optimize( job->file, filename, MP4_DETAILS_ERROR );+        remove( job->file );+        rename( filename, job->file );+    }      return 0; }Index: libhb/common.h===================================================================--- libhb/common.h	(revision 1055)+++ libhb/common.h	(working copy)@@ -259,7 +259,7 @@      /* Allow MP4 files > 4 gigs */     int             largeFileSize;-    +    int             mp4_optimize;      int indepth_scan;     hb_subtitle_t ** select_subtitle;Index: contrib/patch-mpeg4ip-no_compressor_name.patch===================================================================--- contrib/patch-mpeg4ip-no_compressor_name.patch	(revision 0)+++ contrib/patch-mpeg4ip-no_compressor_name.patch	(revision 0)@@ -0,0 +1,11 @@+--- lib/mp4v2/atom_avc1.cpp.bak.cpp	2004-07-13 17:07:50.000000000 -0400++++ lib/mp4v2/atom_avc1.cpp	2007-11-19 13:44:21.000000000 -0500+@@ -41,7 +41,7 @@+ 	MP4StringProperty* pProp = + 		new MP4StringProperty("compressorName");+ 	pProp->SetFixedLength(32);+-	pProp->SetValue("AVC Coding");++	pProp->SetValue("");+ 	AddProperty(pProp); /* 6 */+ + 	AddReserved("reserved4", 4); /* 7 */Index: contrib/Jamfile===================================================================--- contrib/Jamfile	(revision 1055)+++ contrib/Jamfile	(working copy)@@ -221,7 +221,7 @@         cd `dirname $(>)` && CONTRIB=`pwd` &&         rm -rf mpeg4ip && (gzip -dc mpeg4ip.tar.gz | tar xf - ) &&          cd mpeg4ip &&-        $(PATCH) -p1 < ../patch-mpeg4ip.patch && $(PATCH) -p0 < ../patch-mpeg4ip-pascal-str.patch &&+        $(PATCH) -p1 < ../patch-mpeg4ip.patch  && $(PATCH) -p0 < ../patch-mpeg4ip-no_compressor_name.patch &&         ./bootstrap --cache-file=$CONTRIB/config.cache --disable-mp3lame --disable-faac --disable-x264 --disable-server --disable-player &&         $(MAKE) -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&         cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \@@ -236,7 +236,7 @@         cd `dirname $(>)` && CONTRIB=`pwd` &&         rm -rf mpeg4ip && (gzip -dc mpeg4ip.tar.gz | tar xf - ) &&          cd mpeg4ip &&-        $(PATCH) -p1 < ../patch-mpeg4ip.patch && $(PATCH) -p1 < ../patch_mpeg4ip_cygwin.patch && $(PATCH) -p0 < ../patch-mpeg4ip-pascal-str.patch &&+        $(PATCH) -p1 < ../patch-mpeg4ip.patch && $(PATCH) -p0 < ../patch-mpeg4ip-no_compressor_name.patch && $(PATCH) -p1 < ../patch_mpeg4ip_cygwin.patch &&         ./bootstrap --cache-file=$CONTRIB/config.cache --disable-mp3lame --disable-faac --disable-x264 --disable-server --disable-player &&         $(MAKE) -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&         cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \