OSDN Git Service

Update 2006-01-10
authorroot <root@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 14 Jan 2006 13:48:48 +0000 (13:48 +0000)
committerroot <root@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 14 Jan 2006 13:48:48 +0000 (13:48 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@17 b64f7644-9d1e-0410-96f1-a4d463321fa5

contrib/version_mpeg2dec.txt
contrib/version_xvidcore.txt
libhb/dvd.c
libhb/internal.h
libhb/reader.c
libhb/scan.c
macosx/Controller.mm
macosx/main.mm
test/test.c

index 87a73c9..a1e4730 100644 (file)
@@ -1 +1 @@
-http://download.m0k.org/handbrake/contrib/mpeg2dec-20051019.tar.gz
+http://download.m0k.org/handbrake/contrib/mpeg2dec-20051112.tar.gz
index 573cd3c..28a7cff 100644 (file)
@@ -1 +1 @@
-http://download.m0k.org/handbrake/contrib/xvidcore-1.1.0-beta2.tar.gz
+http://download.m0k.org/handbrake/contrib/xvidcore-1.1.0.tar.gz
index 9b2aef1..3888f41 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: dvd.c,v 1.11 2005/11/04 15:30:47 titer Exp $
+/* $Id: dvd.c,v 1.12 2005/11/25 15:05:25 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -511,6 +511,25 @@ int hb_dvd_start( hb_dvd_t * d, int title, int chapter )
 }
 
 /***********************************************************************
+ * hb_dvd_stop
+ ***********************************************************************
+ *
+ **********************************************************************/
+void hb_dvd_stop( hb_dvd_t * d )
+{
+    if( d->ifo )
+    {
+        ifoClose( d->ifo );
+        d->ifo = NULL;
+    }
+    if( d->file )
+    {
+        DVDCloseFile( d->file );
+        d->file = NULL;
+    }
+}
+
+/***********************************************************************
  * hb_dvd_seek
  ***********************************************************************
  *
@@ -675,10 +694,14 @@ void hb_dvd_close( hb_dvd_t ** _d )
 {
     hb_dvd_t * d = *_d;
 
-    if( d->ifo )    ifoClose( d->ifo );
-    if( d->vmg )    ifoClose( d->vmg );
-    if( d->file )   DVDCloseFile( d->file );
-    if( d->reader ) DVDClose( d->reader );
+    if( d->vmg )
+    {
+        ifoClose( d->vmg );
+    }
+    if( d->reader )
+    {
+        DVDClose( d->reader );
+    }
 
     free( d );
     *_d = NULL;
index e22da82..02fb615 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: internal.h,v 1.40 2005/04/27 10:14:02 titer Exp $
+/* $Id: internal.h,v 1.41 2005/11/25 15:05:25 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -104,6 +104,7 @@ hb_dvd_t *   hb_dvd_init( char * path );
 int          hb_dvd_title_count( hb_dvd_t * );
 hb_title_t * hb_dvd_title_scan( hb_dvd_t *, int title );
 int          hb_dvd_start( hb_dvd_t *, int title, int chapter );
+void         hb_dvd_stop( hb_dvd_t * );
 int          hb_dvd_seek( hb_dvd_t *, float );
 int          hb_dvd_read( hb_dvd_t *, hb_buffer_t * );
 int          hb_dvd_chapter( hb_dvd_t * );
index e57467d..47ec9d5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: reader.c,v 1.20 2005/04/29 19:55:54 titer Exp $
+/* $Id: reader.c,v 1.21 2005/11/25 15:05:25 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -113,6 +113,7 @@ static void ReaderFunc( void * _r )
 
     hb_list_empty( &list );
     hb_buffer_close( &r->ps );
+    hb_dvd_stop( r->dvd );
     hb_dvd_close( &r->dvd );
 
     hb_log( "reader: done" );
index 812e840..f60392c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: scan.c,v 1.51 2005/04/27 21:05:24 titer Exp $
+/* $Id: scan.c,v 1.52 2005/11/25 15:05:25 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -397,6 +397,7 @@ cleanup:
         hb_buffer_close( &buf_raw );
     }
     hb_list_close( &list_raw );
+    hb_dvd_stop( data->dvd );
     return ret;
 }
 
index a4ba98a..7a4e9a7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Controller.mm,v 1.78 2005/11/04 13:09:41 titer Exp $
+/* $Id: Controller.mm,v 1.79 2005/11/04 19:41:32 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -884,17 +884,15 @@ static int FormatSettings[3][4] =
     int format = [fDstFormatPopUp indexOfSelectedItem];
     int codecs = [fDstCodecsPopUp indexOfSelectedItem];
 
-    /* Update the encoder popup if necessary */
-    if( ( FormatSettings[format][codecs] & HB_VCODEC_X264 ) &&
-        [fVidEncoderPopUp numberOfItems] > 1 )
+    /* Update the encoder popup */
+    if( ( FormatSettings[format][codecs] & HB_VCODEC_X264 ) )
     {
         /* MPEG-4 -> H.264 */
         [fVidEncoderPopUp removeAllItems];
         [fVidEncoderPopUp addItemWithTitle: @"x264 (Main profile)"];
         [fVidEncoderPopUp addItemWithTitle: @"x264 (Baseline profile)"];
     }
-    else if( ( FormatSettings[format][codecs] & HB_VCODEC_FFMPEG ) &&
-             [fVidEncoderPopUp numberOfItems] < 2 )
+    else if( ( FormatSettings[format][codecs] & HB_VCODEC_FFMPEG ) )
     {
         /* H.264 -> MPEG-4 */
         [fVidEncoderPopUp removeAllItems];
index 78f659e..b07c7f1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: main.mm,v 1.2 2004/10/26 20:49:41 titer Exp $
+/* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -6,7 +6,13 @@
 
 #include <Cocoa/Cocoa.h>
 
+void SigHandler( int signal )
+{
+    [NSApp terminate: NULL];
+} 
+
 int main( int argc, const char ** argv )
 {
+    signal( SIGINT, SigHandler );
     return NSApplicationMain( argc, argv );
 }
index 3f250bc..4fd8e57 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: test.c,v 1.81 2005/10/15 18:05:03 titer Exp $
+/* $Id: test.c,v 1.82 2005/11/19 08:25:54 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -20,6 +20,7 @@ static int    twoPass     = 0;
 static int    deinterlace = 0;
 static int    grayscale   = 0;
 static int    vcodec      = HB_VCODEC_FFMPEG;
+static int    h264_13     = 0;
 static char * audios      = NULL;
 static int    sub         = 0;
 static int    width       = 0;
@@ -338,6 +339,10 @@ static int HandleEvents( hb_handle_t * h )
             {
                 job->vcodec = vcodec;
             }
+            if( h264_13 ) 
+            { 
+                job->h264_13 = h264_13; 
+            } 
             if( vrate )
             {
                 job->vrate = 27000000;
@@ -499,8 +504,8 @@ static void ShowHelp()
     "                            audio, default: first one)\n"
     "\n"
     "    -s, --subtitle <number> Select subtitle (default: none)\n"
-    "    -e, --encoder <string>  Set video library encoder (ffmpeg/xvid/x264,\n"
-    "                            default: ffmpeg)\n"
+    "    -e, --encoder <string>  Set video library encoder (ffmpeg,xvid,\n"
+    "                            x264,x264b13, default: ffmpeg)\n"
     "    -E, --aencoder <string> Set audio encoder (faac/lame/vorbis/ac3, ac3\n"
     "                            meaning passthrough, default: guessed)\n"
     "    -2, --two-pass          Use two-pass mode\n"
@@ -663,6 +668,11 @@ static int ParseOptions( int argc, char ** argv )
                 {
                     vcodec = HB_VCODEC_X264;
                 }
+                else if( !strcasecmp( optarg, "x264b13" ) )
+                {
+                    vcodec = HB_VCODEC_X264;
+                    h264_13 = 1;
+                }
                 else
                 {
                     fprintf( stderr, "invalid codec (%s)\n", optarg );