X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test%2Ftest.c;h=4cd8c5c42e73d4c9119ce820a95f7f8ffbd00455;hb=38411ed3d2e33bd434f7f255279924eba7c55e46;hp=bb0637eb7230e1ccf9aa184cc0b1cbd68b8da53e;hpb=4ffeefe0c4a7cc5119ef04bcf907377d144f57f4;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/test/test.c b/test/test.c index bb0637eb..4cd8c5c4 100644 --- a/test/test.c +++ b/test/test.c @@ -37,6 +37,7 @@ static char * input = NULL; static char * output = NULL; static char * format = NULL; static int titleindex = 1; +static int titlescan = 0; static int longest_title = 0; static char * native_language = NULL; static int native_dub = 0; @@ -213,6 +214,7 @@ int main( int argc, char ** argv ) "date.\n" ); } hb_close( &h ); + hb_global_close(); return 0; } @@ -324,6 +326,7 @@ int main( int argc, char ** argv ) /* Clean up */ hb_close( &h ); + hb_global_close(); if( input ) free( input ); if( output ) free( output ); if( format ) free( format ); @@ -480,7 +483,7 @@ static int HandleEvents( hb_handle_t * h ) case HB_STATE_SCANNING: /* Show what title is currently being scanned */ fprintf( stderr, "Scanning title %d", p.title_cur ); - if( !titleindex ) + if( !titleindex || titlescan ) fprintf( stderr, " of %d", p.title_count ); fprintf( stderr, "...\n" ); break; @@ -549,7 +552,7 @@ static int HandleEvents( hb_handle_t * h ) title = hb_list_item( list, 0 ); } - if( !titleindex ) + if( !titleindex || titlescan ) { /* Scan-only mode, print infos and exit */ int i; @@ -1134,7 +1137,7 @@ static int HandleEvents( hb_handle_t * h ) if (modulus) { - job->anamorphic.modulus = modulus; + job->modulus = modulus; } if( itu_par ) @@ -1159,7 +1162,7 @@ static int HandleEvents( hb_handle_t * h ) if (modulus) { - job->anamorphic.modulus = modulus; + job->modulus = modulus; } if( itu_par ) @@ -2197,8 +2200,9 @@ static void ShowHelp() "### Source Options-----------------------------------------------------------\n\n" " -i, --input Set input device\n" - " -t, --title Select a title to encode (0 to scan only,\n" + " -t, --title Select a title to encode (0 to scan all titles only,\n" " default: 1)\n" + " --scan Scan selected title only.\n" " -L, --longest Select the longest title\n" " -c, --chapters Select chapters (e.g. \"1-3\" for chapters\n" " 1 to 3, or \"3\" for chapter 3 only,\n" @@ -2327,8 +2331,8 @@ static void ShowHelp() " --itu-par Use wider, ITU pixel aspect values for loose and\n" " custom anamorphic, useful with underscanned sources\n" " --modulus Set the number you want the scaled pixel dimensions\n" - " to divide cleanly by, for loose and custom\n" - " anamorphic modes (default: 16)\n" + " to divide cleanly by. Does not affect strict\n" + " anamorphic mode, which is always mod 2 (default: 16)\n" " -M --color-matrix Set the color space signaled by the output\n" " <601 or 709> (Bt.601 is mostly for SD content, Bt.709 for HD,\n" " default: set by resolution)\n" @@ -2530,6 +2534,7 @@ static int ParseOptions( int argc, char ** argv ) #define SRT_LANG 273 #define SRT_DEFAULT 274 #define ROTATE_FILTER 275 + #define SCAN_ONLY 276 for( ;; ) { @@ -2549,6 +2554,7 @@ static int ParseOptions( int argc, char ** argv ) { "ipod-atom", no_argument, NULL, 'I' }, { "title", required_argument, NULL, 't' }, + { "scan", no_argument, NULL, SCAN_ONLY }, { "longest", no_argument, NULL, 'L' }, { "chapters", required_argument, NULL, 'c' }, { "angle", required_argument, NULL, ANGLE }, @@ -2696,6 +2702,9 @@ static int ParseOptions( int argc, char ** argv ) case 't': titleindex = atoi( optarg ); break; + case SCAN_ONLY: + titlescan = 1; + break; case 'L': longest_title = 1; break; @@ -3094,7 +3103,7 @@ static int CheckOptions( int argc, char ** argv ) } /* Parse format */ - if( titleindex > 0 ) + if( titleindex > 0 && !titlescan ) { if( output == NULL || *output == '\0' ) {