OSDN Git Service

HandBrake 0.6.0-test2
authorroot <root@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 14 Jan 2006 13:24:23 +0000 (13:24 +0000)
committerroot <root@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 14 Jan 2006 13:24:23 +0000 (13:24 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@11 b64f7644-9d1e-0410-96f1-a4d463321fa5

28 files changed:
AUTHORS
CREDITS
Jamrules
NEWS
THANKS [new file with mode: 0644]
TODO
core/AviMux.c
core/DVDRead.c
core/FfmpegEnc.c
core/Fifo.c
core/Fifo.h
core/Mp4Mux.c
core/Thread.c
core/Thread.h
core/XvidEnc.c
doc/faq.html [new file with mode: 0644]
doc/faq.txt [new file with mode: 0644]
doc/genhtml.sh [new file with mode: 0755]
macosx/English.lproj/InfoPlist.strings
macosx/English.lproj/MainMenu.nib/info.nib
macosx/English.lproj/MainMenu.nib/objects.nib
macosx/HandBrake.xcode/project.pbxproj
macosx/PictureGLView.mm
macosx/i18n/French.strings
macosx/i18n/German.strings
macosx/i18n/it.strings [new file with mode: 0644]
macosx/i18n/pl.strings [new file with mode: 0644]
macosx/i18n/ru.strings [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index 4939f8e..3604777 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,6 @@
-$Id: AUTHORS,v 1.1 2003/12/26 20:19:38 titer Exp $
+$Id: AUTHORS,v 1.2 2004/03/01 19:09:38 titer Exp $
+
+AUTHORS file for HandBrake <http://handbrake.m0k.org/>
 
 Eric Petit <titer@m0k.org>
  + Core (construct, multithreading, BeOS/OS X/Linux ports)
@@ -10,6 +12,7 @@ Eric Petit <titer@m0k.org>
  + MP4 muxer (w/ libmp4v2)
  + BeOS interface
  + OS X interface
+ + French translation
 
 Laurent Aimar <fenrir@via.ecp.fr>
  + H264 and Vorbis encoders (w/ libx264/libvorbis)
diff --git a/CREDITS b/CREDITS
index 75bc7b3..9843cb1 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1,5 +1,9 @@
-HandBrake uses a lot of cool libraries from the GNU/Linux world. Thank
-their authors!
+$Id: CREDITS,v 1.5 2004/03/01 19:09:38 titer Exp $
+
+CREDITS file for HandBrake <http://handbrake.m0k.org/>
+
+HandBrake uses many cool libraries from the GNU/Linux world.
+Thank their authors!
 
 liba52 authors:
   Aaron Holtzman
index 9fdd02f..6e4da0b 100644 (file)
--- a/Jamrules
+++ b/Jamrules
@@ -8,7 +8,7 @@ LINK     = g++ ;
 OPTIM    = -O3 -funroll-loops ;
 
 # HandBrake defines
-HB_VERSION = 0.6.0-test1 ;
+HB_VERSION = 0.6.0-test2 ;
 DEFINES    = HB_$(OS) HB_VERSION=\\\"$(HB_VERSION)\\\" ;
 #DEFINES   += HB_NOMMX ;
 
@@ -100,10 +100,10 @@ rule OSXApp
 }
 actions BuildOSXApp
 {
-    $(RM) $(1) ;
-    ( cd macosx && xcodebuild ) && \
+    $(RM) $(1) && \
+      ( cd macosx && xcodebuild ) && \
       cp -r macosx/build/HandBrake.app $(1) && \
-      for i in French German; do \
+      for i in French German it pl ru; do \
         ( cd $(1)/Contents/Resources && \
           cp -r English.lproj $i.lproj && \
           cp ../../../macosx/i18n/$i.strings \
@@ -118,8 +118,13 @@ actions BuildOSXPackage
 {                 
     rm -rf $(1) "HandBrake $(HB_VERSION)" && \
       mkdir "HandBrake $(HB_VERSION)" && \
-      cp -r AUTHORS COPYING CREDITS HandBrake.app \
-        "HandBrake $(HB_VERSION)" && \
+      cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
+      cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
+      cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
+      cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
+      ( cd doc && ./genhtml.sh ) && \
+      cp doc/faq.html "HandBrake $(HB_VERSION)/FAQ.html" && \
+      cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \
       zip -9 -r $(1) "HandBrake $(HB_VERSION)" && \
       rm -rf "HandBrake $(HB_VERSION)"
 }
diff --git a/NEWS b/NEWS
index b198d09..6e8e9b7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,14 @@
-$Id: NEWS,v 1.9 2004/02/18 17:21:00 titer Exp $
+$Id: NEWS,v 1.11 2004/03/01 21:36:36 titer Exp $
 
-This is the NEWS file for HandBrake <http://handbrake.m0k.org/>
+NEWS file for HandBrake <http://handbrake.m0k.org/>
 
 Changes between 0.5.2 and 0.6.0
- + .mp4 and .ogm output
- + aac and vorbis encoding
- + experimental h264 encoding
- + gtk2 linux interface
- + autocrop
+ + MP4 and OGM output
+ + AAC and Vorbis encoding
+ + Experimental H264 encoding
+ + Autocrop
+ + GTK2 linux interface
+ + OS X interface localization
 
 Changes between 0.5.1 and 0.5.2
  + Bugfixes
diff --git a/THANKS b/THANKS
new file mode 100644 (file)
index 0000000..dc70cfe
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,21 @@
+$Id: THANKS,v 1.6 2004/03/01 19:09:38 titer Exp $
+
+THANKS file for HandBrake <http://handbrake.m0k.org/>
+
+Omar Ahmad Bhatti
+ + Intensive beta testing, suggestions
+
+Hanna Bauer
+Adrien Marquette
+ + German translation
+
+Paul Bénéchet
+Luidgi Esposito
+Andrea Gianarro
+ + Italian translation
+
+Adam
+ + Polish translation
+
+Nik Roby
+ + Russian translation
diff --git a/TODO b/TODO
index 8248aba..f9ae1e4 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,7 @@
-$Id: TODO,v 1.22 2004/02/13 13:45:50 titer Exp $
+$Id: TODO,v 1.29 2004/03/01 21:36:36 titer Exp $
+
+TODO file for HandBrake <http://handbrake.m0k.org/>
 
-This is the TODO list for HandBrake <http://handbrake.m0k.org/>
 Features to be added are written in no particular order.
 
 - Core
@@ -8,25 +9,29 @@ Features to be added are written in no particular order.
   + Should be able to boost or normalize the audio volume
   + Allow the intf to preview the latest encoded picture
   + Finish and test the MPEG audio decoder
+  + PCM
   + More encoding options: B-frames, type of estimation etc etc
   + Subtitle support
   + Allow the user to split the file in x parts
   + AC3 pass-through
-  + mkv muxing support
-  + manual aspect ratio
-  + rotate the movie
-  + rip only a few chapters
-  + network shared processing (using RendezVous?)
-  + do some DVD buffering so the drive can rest most of the time
-  + custom framerate
-  + homemade resampler
-  + VCD output
+  + MKV muxing support
+  + Manual aspect ratio
+  + Rotate the movie
+  + Rip only a few chapters, or rip X seconds from a given starting
+    point
+  + Network shared processing (using RendezVous?)
+  + Do some DVD buffering so the drive can rest most of the time
+  + Custom framerate
+  + Homemade resampler
+  + VCD/DVD-R output
+  + Better remaining time calculation
+  + Theora encoding
 
 - All interfaces
   + Use the DVD name in popup and for the name of the created file
-  + nice 'About...' box with link to homepage & faq
+  + Nice 'About...' box with link to homepage & faq
   + Add a 'Cancel' button in the crop & scale panel
-  + nicer, more user-friendly "Open" intf
+  + Allow to launch rips of several titles
 
 - BeOS interface
   + Redo the picture panel (liblayout?)
@@ -34,10 +39,11 @@ Features to be added are written in no particular order.
   + i18n
 
 - Mac OS X interface
-  + Allow to quit HandBrake when the crop & scale sheet is opened
   + Warning when the user quit the app while encoding
   + Progress bar in the dock icon
   + Send a mail when rip is done
+  + Turn the computer off when done
+  + Collapse interface when rip starts
 
 - Bugs
   + OSX - crash when trying to encode a DVD from mounted toast image
index 7123842..e106f83 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: AviMux.c,v 1.15 2004/02/18 17:07:20 titer Exp $
+/* $Id: AviMux.c,v 1.16 2004/02/18 19:36:35 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -162,15 +162,20 @@ void HBAviMuxClose( HBAviMux ** _a )
     HBThreadClose( &a->thread );
 
     file = fopen( a->title->file, "r" );
-    fseek( file, 0, SEEK_END );
-    size = ftell( file );
-    fclose( file );
-
-    HBLog( "HBAviMux: videoFrames=%lld, %lld bytes", videoFrames, videoBytes );
-    HBLog( "HBAviMux: audioFrames=%lld, %lld bytes", audioFrames, audioBytes );
-    HBLog( "HBAviMux: overhead=%.2f bytes / frame",
-            ( (float) size - videoBytes - audioBytes ) /
-            ( videoFrames + audioFrames ) );
+    if( file )
+    {
+        fseek( file, 0, SEEK_END );
+        size = ftell( file );
+        fclose( file );
+
+        HBLog( "HBAviMux: videoFrames=%lld, %lld bytes",
+               videoFrames, videoBytes );
+        HBLog( "HBAviMux: audioFrames=%lld, %lld bytes",
+               audioFrames, audioBytes );
+        HBLog( "HBAviMux: overhead=%.2f bytes / frame",
+               ( (float) size - videoBytes - audioBytes ) /
+               ( videoFrames + audioFrames ) );
+    }
 
     free( a );
 
index f906609..08e5139 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: DVDRead.c,v 1.9 2004/01/16 19:04:03 titer Exp $
+/* $Id: DVDRead.c,v 1.10 2004/02/29 11:21:34 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -89,7 +89,6 @@ static void DVDReadThread( void * _d )
     HBDVDRead * d     = (HBDVDRead*) _d;
     HBTitle   * title = d->title;
 
-    uint8_t dummy[DVD_VIDEO_LB_LEN];
     int i;
 
     /* Open the device */
@@ -107,15 +106,12 @@ static void DVDReadThread( void * _d )
     d->endPosition   = dvdplay_title_end( d->vmg );
 
     HBLog( "HBDVDRead: starting, blocks: %d to %d",
-         d->beginPosition, d->endPosition );
-
-    /* Lalala */
-    dvdplay_read( d->vmg, dummy, 1 );
+           d->beginPosition, d->endPosition );
 
     /* Do the job */
     for( i = 0; i < ( title->twoPass ? 2 : 1 ); i++ )
     {
-        dvdplay_seek( d->vmg, 0 );
+        dvdplay_start( d->vmg, title->index );
 
         HBLog( "HBDVDRead: starting pass %d of %d", i + 1,
                title->twoPass ? 2 : 1 );
index 4028dc5..7d909a7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: FfmpegEnc.c,v 1.18 2004/01/21 17:59:33 titer Exp $
+/* $Id: FfmpegEnc.c,v 1.19 2004/03/01 21:36:36 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -275,6 +275,7 @@ static void CloseAvcodec( HBFfmpegEnc * f )
     if( f->title->esConfig )
     {
         free( f->title->esConfig );
+        f->title->esConfig       = NULL;
         f->title->esConfigLength = 0;
     }
 }
index af6d90c..06aed08 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Fifo.c,v 1.8 2004/01/16 19:04:03 titer Exp $
+/* $Id: Fifo.c,v 1.9 2004/02/24 21:55:53 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -18,12 +18,25 @@ HBBuffer * HBBufferInit( int size )
     b->alloc = size;
     b->size  = size;
 
-    if( !( b->data = malloc( size ) ) )
+#if defined( HB_BEOS ) || defined( HB_LINUX )
+    if( !( b->data = memalign( 16, size ) ) )
     {
         HBLog( "HBBufferInit: malloc() failed, gonna crash" );
         free( b );
         return NULL;
     }
+#elif defined( HB_MACOSX )
+    if( !( b->dataOrig = malloc( size + 15 ) ) )
+    {
+        HBLog( "HBBufferInit: malloc() failed, gonna crash" );
+        free( b );
+        return NULL;
+    }
+    b->data  = b->dataOrig + 15;
+    b->data -= (long) b->data & 15;
+#elif defined( HB_CYGWIN )
+    /* TODO */
+#endif
 
     b->position = 0.0;
 
@@ -33,7 +46,14 @@ HBBuffer * HBBufferInit( int size )
 void HBBufferReAlloc( HBBuffer * b, int size )
 {
     b->alloc = size;
+#if defined( HB_BEOS ) || defined( HB_LINUX )
     b->data  = realloc( b->data, size );
+#elif defined( HB_MACOSX )
+    b->dataOrig = realloc( b->dataOrig, size );
+    b->data     = b->dataOrig;
+#elif defined( HB_CYGWIN )
+    /* TODO */
+#endif
 
     if( !b->data )
     {
@@ -45,7 +65,13 @@ void HBBufferClose( HBBuffer ** _b )
 {
     HBBuffer * b = *_b;
 
+#if defined( HB_BEOS ) || defined( HB_LINUX )
     free( b->data );
+#elif defined( HB_MACOSX )
+    free( b->dataOrig );
+#elif defined( HB_CYGWIN )
+    /* TODO */
+#endif
     free( b );
 
     *_b = NULL;
index d9240fb..daca41d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Fifo.h,v 1.10 2004/01/16 19:04:04 titer Exp $
+/* $Id: Fifo.h,v 1.11 2004/02/24 21:55:53 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -16,6 +16,9 @@ struct HBBuffer
     int       alloc;
     int       size;
     uint8_t * data;
+#if defined( HB_MACOSX )
+    uint8_t * dataOrig;
+#endif
     float     position;
     int       pass;
 
index f780cab..e1b8e9e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Mp4Mux.c,v 1.22 2004/02/18 17:07:20 titer Exp $
+/* $Id: Mp4Mux.c,v 1.23 2004/02/18 19:36:35 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -59,15 +59,20 @@ void HBMp4MuxClose( HBMp4Mux ** _m )
     HBThreadClose( &m->thread );
 
     file = fopen( m->title->file, "r" );
-    fseek( file, 0, SEEK_END );
-    size = ftell( file );
-    fclose( file );
-
-    HBLog( "HBMp4Mux: videoFrames=%lld, %lld bytes", videoFrames, videoBytes );
-    HBLog( "HBMp4Mux: audioFrames=%lld, %lld bytes", audioFrames, audioBytes );
-    HBLog( "HBMp4Mux: overhead=%.2f bytes / frame",
-            ( (float) size - videoBytes - audioBytes ) /
-            ( videoFrames + audioFrames ) );
+    if( file )
+    {
+        fseek( file, 0, SEEK_END );
+        size = ftell( file );
+        fclose( file );
+
+        HBLog( "HBMp4Mux: videoFrames=%lld, %lld bytes",
+               videoFrames, videoBytes );
+        HBLog( "HBMp4Mux: audioFrames=%lld, %lld bytes",
+               audioFrames, audioBytes );
+        HBLog( "HBMp4Mux: overhead=%.2f bytes / frame",
+                ( (float) size - videoBytes - audioBytes ) /
+                ( videoFrames + audioFrames ) );
+    }
 
     free( m );
 
index 01af1b0..413ff8b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Thread.c,v 1.10 2004/01/14 21:37:25 titer Exp $
+/* $Id: Thread.c,v 1.11 2004/02/19 17:59:13 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -6,13 +6,22 @@
 
 #include "Thread.h"
 
+/**********************************************************************
+ * HBThread implementation
+ **********************************************************************/
 struct HBThread
 {
+    /* User-friendly name */
     char    * name;
+
+    /* HB_(LOW|NORMAL)_PRIORITY */
     int       priority;
+
+    /* Thread function and argument */
     void      (*function) ( void * );
     void    * arg;
 
+    /* OS-specific thread id */
 #if defined( HB_BEOS )
     int       thread;
 #elif defined( HB_MACOSX ) || defined( HB_LINUX )
@@ -22,23 +31,45 @@ struct HBThread
 #endif
 };
 
-static void ThreadFunc( void * t );
+/* HBThreadInit actually starts this routine because
+   pthread_setschedparam() might fail if called from an external
+   thread (typically, because the thread exited immediatly. This isn't
+   really necessary, but I find it nicer that way */
+static void ThreadFunc( void * _t )
+{
+    HBThread * t = (HBThread*) _t;
+
+#if defined( HB_MACOSX )
+    /* Set the thread priority */
+    struct sched_param param;
+    memset( &param, 0, sizeof( struct sched_param ) );
+    param.sched_priority = t->priority;
+    if( pthread_setschedparam( pthread_self(), SCHED_OTHER, &param ) )
+    {
+        HBLog( "HBThreadInit: couldn't set thread priority" );
+    }
+#endif
+
+    /* Start the real routine */
+    t->function( t->arg );
+}
 
 HBThread * HBThreadInit( char * name, void (* function)(void *),
                          void * arg, int priority )
 {
+    /* Initializations */
     HBThread * t;
     if( !( t = malloc( sizeof( HBThread ) ) ) )
     {
         HBLog( "HBThreadInit: malloc() failed, gonna crash" );
         return NULL;
     }
-
     t->name     = strdup( name );
     t->priority = priority;
     t->function = function;
     t->arg      = arg;
 
+    /* Create and start the thread */
 #if defined( HB_BEOS )
     t->thread = spawn_thread( (int32 (*)( void * )) ThreadFunc,
                               name, priority, t );
@@ -57,27 +88,11 @@ HBThread * HBThreadInit( char * name, void (* function)(void *),
     return t;
 }
 
-static void ThreadFunc( void * _t )
-{
-    HBThread * t = (HBThread*) _t;
-
-#if defined( HB_MACOSX )
-    struct sched_param param;
-    memset( &param, 0, sizeof( struct sched_param ) );
-    param.sched_priority = t->priority;
-    if( pthread_setschedparam( pthread_self(), SCHED_OTHER, &param ) )
-    {
-        HBLog( "HBThreadInit: couldn't set thread priority" );
-    }
-#endif
-
-    t->function( t->arg );
-}
-
 void HBThreadClose( HBThread ** _t )
 {
     HBThread * t = *_t;
 
+    /* Join the thread */
 #if defined( HB_BEOS )
     long exitValue;
     wait_for_thread( t->thread, &exitValue );
@@ -90,11 +105,16 @@ void HBThreadClose( HBThread ** _t )
     HBLog( "HBThreadClose: thread %d stopped (\"%s\")",
            t->thread, t->name );
 
+    /* Clean up */
     free( t->name );
     free( t );
     *_t = NULL;
 }
 
+
+/**********************************************************************
+ * HBLock implementation
+ **********************************************************************/
 HBLock * HBLockInit()
 {
     HBLock * l;
@@ -131,6 +151,10 @@ void HBLockClose( HBLock ** _l )
     *_l = NULL;
 }
 
+
+/**********************************************************************
+ * HBCond implementation
+ **********************************************************************/
 HBCond * HBCondInit()
 {
     HBCond * c = malloc( sizeof( HBCond ) );
index 4d6288e..7f975d8 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Thread.h,v 1.8 2004/01/14 21:37:25 titer Exp $
+/* $Id: Thread.h,v 1.9 2004/02/19 17:59:13 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
 #  define HB_NORMAL_PRIORITY 0
 #endif
 
-/* Functions declarations */
-HBThread * HBThreadInit( char * name, void (* function)(void *),
-                         void * arg, int priority );
-void       HBThreadClose( HBThread ** );
+/**********************************************************************
+ * HBThread/HBLock/HBCond declarations
+ **********************************************************************/
+HBThread *           HBThreadInit( char * name,
+                                   void (* function)(void *),
+                                   void * arg, int priority );
+void                 HBThreadClose( HBThread ** );
 
 HBLock             * HBLockInit();
 static inline void   HBLockLock( HBLock * );
@@ -46,7 +49,10 @@ static inline void   HBCondWait( HBCond *, HBLock * );
 static inline void   HBCondSignal( HBCond * );
 void                 HBCondClose( HBCond ** );
 
-/* Inlined stuff */
+
+/**********************************************************************
+ * HBLock implementation (inline functions)
+ **********************************************************************/
 struct HBLock
 {
 #if defined( HB_BEOS )
@@ -80,6 +86,10 @@ static inline void HBLockUnlock( HBLock * l )
 #endif
 }
 
+
+/**********************************************************************
+ * HBCond implementation (inline functions)
+ **********************************************************************/
 struct HBCond
 {
 #if defined( HB_BEOS )
index fe9e8dd..8bf841f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: XvidEnc.c,v 1.18 2004/01/08 22:02:29 titer Exp $
+/* $Id: XvidEnc.c,v 1.20 2004/03/01 21:36:36 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
@@ -65,6 +65,12 @@ void HBXvidEncClose( HBWork ** _x )
                 x->pass );
         xvid_encore( x->xvid, XVID_ENC_DESTROY, NULL, NULL);
     }
+    if( x->title->esConfig )
+    {
+        free( x->title->esConfig );
+        x->title->esConfig       = NULL;
+        x->title->esConfigLength = 0;
+    }
     if( x->frames )
     {
         float bitrate = (float) x->bytes * x->title->rate / x->frames /
@@ -138,11 +144,10 @@ static int XvidEncWork( HBWork * w )
         {
             HBLog( "HBXvidEnc: closing libxvidcore (pass %d)",
                     x->pass );
-
             xvid_encore( x->xvid, XVID_ENC_DESTROY, NULL, NULL);
         }
 
-        x->pass = scaledBuffer->pass;;
+        x->pass = scaledBuffer->pass;
         HBLog( "HBXvidEnc: opening libxvidcore (pass %d)", x->pass );
 
         memset( &xvid_gbl_init, 0, sizeof( xvid_gbl_init ) );
@@ -242,10 +247,33 @@ static int XvidEncWork( HBWork * w )
     {
         if( !title->esConfig )
         {
-            /* KLUDGE */
-            title->esConfig = malloc( 15 );
-            title->esConfigLength = 15;
-            memcpy( title->esConfig, mpeg4Buffer->data + 4, 15 );
+            int volStart, vopStart;
+            for( volStart = 0; ; volStart++ )
+            {
+                if( mpeg4Buffer->data[volStart]   == 0x0 &&
+                    mpeg4Buffer->data[volStart+1] == 0x0 &&
+                    mpeg4Buffer->data[volStart+2] == 0x1 &&
+                    mpeg4Buffer->data[volStart+3] == 0x20 )
+                {
+                    break;
+                }
+            }
+            for( vopStart = volStart + 4; ; vopStart++ )
+            {
+                if( mpeg4Buffer->data[vopStart]   == 0x0 &&
+                    mpeg4Buffer->data[vopStart+1] == 0x0 &&
+                    mpeg4Buffer->data[vopStart+2] == 0x1 &&
+                    mpeg4Buffer->data[vopStart+3] == 0xB6 )
+                {
+                    break;
+                }
+            }
+
+            HBLog( "XvidEnc: VOL size is %d bytes", vopStart - volStart );
+            title->esConfig = malloc( vopStart - volStart );
+            title->esConfigLength = vopStart - volStart;
+            memcpy( title->esConfig, mpeg4Buffer->data + volStart,
+                    vopStart - volStart );
         }
         x->frames++;
         x->bytes       += mpeg4Buffer->size;
diff --git a/doc/faq.html b/doc/faq.html
new file mode 100644 (file)
index 0000000..2c1961b
--- /dev/null
@@ -0,0 +1,180 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>HandBrake FAQ</title>
+<style type="text/css">
+body,p,th,td  { font-family: Verdana,Arial,Helvetica,sans-serif;
+                font-size: 8pt;
+                font-weight: normal;
+                color: #000000; }
+body          { margin-left: 10;
+                margin-top: 10;
+                margin-right: 10;
+                margin-bottom: 10;
+                background-color: #FFFFFF; }
+a             { color: #000000;
+                text-decoration: underline; }
+a:hover       { color: #888888; }
+</style>
+</head>
+<body bgcolor="#ffffff">
+
+<p>
+Last updated: 2004/03/01 19:09:38<br>
+The latest version of this FAQ can be found <a
+href="http://handbrake.m0k.org/faq.php">here</a>.
+</p>
+
+<h2>HandBrake FAQ</h2>
+
+<h4>1. Troubleshooting</h4>
+<p><a href="#A001001">1.1. Encoding seemed to work fine, but I don't
+get any sound</a></p>
+<p><a href="#A001002">1.2. Not every title of the DVD shows up in
+HandBrake</a></p>
+<p><a href="#A001003">1.3. Rip exits after a while with a AC3 error.
+What does that mean?</a></p>
+<p><a href="#A001004">1.4. Why does HandBrake get stucked at
+100%?</a></p>
+
+<h4>2. Features</h4>
+<p><a href="#A002001">2.1 I want to convert a movie so I can burn it on
+a VCD or a DVD-R. Is HandBrake the right application to do this?</a></p>
+<p><a href="#A002002">2.2. I want to to convert a movie so I can edit it
+in iMovie. Is HandBrake the right application to do this?</a></p>
+<p><a href="#A002003">2.3. I wish HandBrake could support subtitles, rip
+a 30 seconds sample, [...]</a></p>
+<p><a href="#A002004">2.4. Any plan to include 3ivx / DivX 5
+encoding?</a></p>
+
+<h4>3. Technical</h4>
+<p><a href="#A003001">3.1 What's the difference between Ffmpeg and
+XviD?</a></p>
+<p><a href="#A003002">3.2 What is 2-pass encoding?</a></p>
+
+<h4>4. Misc</h4>
+<p><a href="#A004001">4.1. How do I donate for HandBrake?</a></p>
+<p><a href="#A004002">4.2. Where do this stupid name / icon come
+from?</a></p>
+
+<hr>
+
+<h3>1. Troubleshooting</h3>
+
+<a name="A001001"></a>
+<h4>1.1 Encoding seemed to work fine, but I don't get any sound</h4>
+<p>I guess you are trying to read an AVI file with OS X
+/ Quicktime. Try installing the latest DivX codec from
+<a href="http://www.divx.com/divx/mac/">DivX.com</a>,
+or use <a href="http://videolan.org/vlc/">VLC</a>.</p>
+
+<a name="A001002"></a>
+<h4>1.2. Not every title of the DVD shows up in HandBrake</h4>
+<p>There are 3 reasons why HandBrake might not show a title: it is a
+menu, it has no audio track HandBrake can handle (only AC3 is supported)
+or there was a problem when trying to decode data from it (e.g. a
+decryption problem). There is no way to workaround this, these titles
+don't show up just because you can't rip them. You might check HandBrake
+logs in a terminal to know what's happening on your particular DVD.</p>
+
+<a name="A001003"></a>
+<h4>1.3. Rip exits after a while with a AC3 error. What does that
+mean?</h4>
+<p>It means HandBrake had to deal with corrupted data. It usually
+happens when your DVD drive is over-heating after a X-hours long rip.
+Though it is handy to directly rip from the DVD, I recommend that you
+copy it first to the hard drive whenever possible (for example with
+OSEx, using the "DVD Folders" fmt) then you can open the folder with
+HandBrake. You have to keep the DVD folder organization (multiple VOB
+and IFO files), HandBrake won't open single VOB files.</p>
+
+<a name="A001004"></a>
+<h4>1.4. Why does HandBrake get stucked at 100%?</h4>
+<p>When ripping to an mp4 file, HandBrake (actually libmp4v2) optimizes
+the file and makes it compliant at the end of the rip. This might take
+some time with big files. Also, make sure you have enough space
+available on your hard drive before you start (twice the asked size) or
+you might end with an unreadable file.</p>
+
+<h3>2. Features</h3>
+
+<a name="A002001"></a>
+<h4>2.1 I want to convert a movie so I can burn it on a VCD or a DVD-R.
+Is HandBrake the right application to do this?</h4>
+<p>No. HandBrake only outputs MPEG-4, no MPEG-1 or MPEG-2. If you are
+using OS X, have a look at <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/18193">
+forty-two</a>, <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/15473">
+ffmpegX</a>, <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/20778">
+DVDRemaster</a> or <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/19238">
+DVD2oneX</a>. This will save you time and quality.</p>
+
+<a name="A002002"></a>
+<h4>2.2 I want to to convert a movie so I can edit it in iMovie. Is
+HandBrake the right application to do this?</h4>
+<p>No. MPEG-4 isn't a good format for editing, you'd better find a way
+to extract it as MJPEG or something, or edit the MPEG-2 directly.</p>
+
+<a name="A002003"></a>
+<h4>2.3. I wish HandBrake could support subtitles, rip a 30 seconds
+sample, [...]</h4>
+<p>Check the <a href="http://handbrake.m0k.org/TODO">TODO</a> list to
+see what's on the roadmap. If you wish to see a feature which isn't
+already in it, mail me and, if I think I can do it someday, I'll add
+it to the list.</p>
+
+<a name="A002004"></a>
+<h4>2.4 Any plan to include 3ivx / DivX 5 encoding?</h4>
+<p>No. 3ivx/DivX aren't free software and have no multi-platform
+API.</p>
+
+<h3>3. Technical</h3>
+
+<a name="A003001"></a>
+<h4>3.1 What's the difference between Ffmpeg and XviD?</h4>
+<p>Both are MPEG-4 compliant encoders, so you may choose whichever you
+want. However, I would recommend Ffmpeg as it is pretty faster on BeOS
+and OS X.</p>
+
+<a name="A003002"></a>
+<h4>3.2 What is 2-pass encoding?</h4>
+<p>It performs a slower but better compression - basically it makes
+sure you'll get a constant quality so you won't see blocks in fast
+motion scenes. Though it's disabled by default, I would strongly
+recommend to use it except if you really care about time.</p>
+
+<h3>4. Misc</h3>
+
+<a name="A004001"></a>
+<h4>4.1. How do I donate for HandBrake?</h4>
+
+<p>I'm working on HandBrake for fun, therefore I haven't set up a
+paypal account or anything (and I won't). Thanks anyway to people who
+wanted to give me money ;p<br>
+There are still two ways to make me happy:</p>
+<ul>
+<li>Send me a friendly email</li>
+<li>You may send me a DVD (for example, a DVD HandBrake has problems
+with so I can work it out). Sending a DVD through the world isn't really
+handy though (the cheapest way is probably to order it online in a
+french store with my address for shipping), so if it's a problem, you
+can just fall back on the friendly mail ;)<br>
+<br>
+Here's the address:<br>
+Eric Petit<br>
+Résidence ECP - H211<br>
+2 avenue Sully Prudhomme<br>
+92290 Chatenay Malabry<br>
+France<br>
+</li>
+</ul>
+
+<a name="A004002"></a>
+<h4>4.2 Where do this stupid name / icon come from?</h4>
+<p>Don't ask.</p>
+
+</body>
+</html>
diff --git a/doc/faq.txt b/doc/faq.txt
new file mode 100644 (file)
index 0000000..1e0ddec
--- /dev/null
@@ -0,0 +1,153 @@
+$Id: faq.txt,v 1.10 2004/03/01 19:09:38 titer Exp $
+
+<h2>HandBrake FAQ</h2>
+
+<h4>1. Troubleshooting</h4>
+<p><a href="#A001001">1.1. Encoding seemed to work fine, but I don't
+get any sound</a></p>
+<p><a href="#A001002">1.2. Not every title of the DVD shows up in
+HandBrake</a></p>
+<p><a href="#A001003">1.3. Rip exits after a while with a AC3 error.
+What does that mean?</a></p>
+<p><a href="#A001004">1.4. Why does HandBrake get stucked at
+100%?</a></p>
+
+<h4>2. Features</h4>
+<p><a href="#A002001">2.1 I want to convert a movie so I can burn it on
+a VCD or a DVD-R. Is HandBrake the right application to do this?</a></p>
+<p><a href="#A002002">2.2. I want to to convert a movie so I can edit it
+in iMovie. Is HandBrake the right application to do this?</a></p>
+<p><a href="#A002003">2.3. I wish HandBrake could support subtitles, rip
+a 30 seconds sample, [...]</a></p>
+<p><a href="#A002004">2.4. Any plan to include 3ivx / DivX 5
+encoding?</a></p>
+
+<h4>3. Technical</h4>
+<p><a href="#A003001">3.1 What's the difference between Ffmpeg and
+XviD?</a></p>
+<p><a href="#A003002">3.2 What is 2-pass encoding?</a></p>
+
+<h4>4. Misc</h4>
+<p><a href="#A004001">4.1. How do I donate for HandBrake?</a></p>
+<p><a href="#A004002">4.2. Where do this stupid name / icon come
+from?</a></p>
+
+<hr>
+
+<h3>1. Troubleshooting</h3>
+
+<a name="A001001"></a>
+<h4>1.1 Encoding seemed to work fine, but I don't get any sound</h4>
+<p>I guess you are trying to read an AVI file with OS X
+/ Quicktime. Try installing the latest DivX codec from
+<a href="http://www.divx.com/divx/mac/">DivX.com</a>,
+or use <a href="http://videolan.org/vlc/">VLC</a>.</p>
+
+<a name="A001002"></a>
+<h4>1.2. Not every title of the DVD shows up in HandBrake</h4>
+<p>There are 3 reasons why HandBrake might not show a title: it is a
+menu, it has no audio track HandBrake can handle (only AC3 is supported)
+or there was a problem when trying to decode data from it (e.g. a
+decryption problem). There is no way to workaround this, these titles
+don't show up just because you can't rip them. You might check HandBrake
+logs in a terminal to know what's happening on your particular DVD.</p>
+
+<a name="A001003"></a>
+<h4>1.3. Rip exits after a while with a AC3 error. What does that
+mean?</h4>
+<p>It means HandBrake had to deal with corrupted data. It usually
+happens when your DVD drive is over-heating after a X-hours long rip.
+Though it is handy to directly rip from the DVD, I recommend that you
+copy it first to the hard drive whenever possible (for example with
+OSEx, using the "DVD Folders" fmt) then you can open the folder with
+HandBrake. You have to keep the DVD folder organization (multiple VOB
+and IFO files), HandBrake won't open single VOB files.</p>
+
+<a name="A001004"></a>
+<h4>1.4. Why does HandBrake get stucked at 100%?</h4>
+<p>When ripping to an mp4 file, HandBrake (actually libmp4v2) optimizes
+the file and makes it compliant at the end of the rip. This might take
+some time with big files. Also, make sure you have enough space
+available on your hard drive before you start (twice the asked size) or
+you might end with an unreadable file.</p>
+
+<h3>2. Features</h3>
+
+<a name="A002001"></a>
+<h4>2.1 I want to convert a movie so I can burn it on a VCD or a DVD-R.
+Is HandBrake the right application to do this?</h4>
+<p>No. HandBrake only outputs MPEG-4, no MPEG-1 or MPEG-2. If you are
+using OS X, have a look at <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/18193">
+forty-two</a>, <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/15473">
+ffmpegX</a>, <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/20778">
+DVDRemaster</a> or <a
+href="http://www.versiontracker.com/dyn/moreinfo/macosx/19238">
+DVD2oneX</a>. This will save you time and quality.</p>
+
+<a name="A002002"></a>
+<h4>2.2 I want to to convert a movie so I can edit it in iMovie. Is
+HandBrake the right application to do this?</h4>
+<p>No. MPEG-4 isn't a good format for editing, you'd better find a way
+to extract it as MJPEG or something, or edit the MPEG-2 directly.</p>
+
+<a name="A002003"></a>
+<h4>2.3. I wish HandBrake could support subtitles, rip a 30 seconds
+sample, [...]</h4>
+<p>Check the <a href="http://handbrake.m0k.org/TODO">TODO</a> list to
+see what's on the roadmap. If you wish to see a feature which isn't
+already in it, mail me and, if I think I can do it someday, I'll add
+it to the list.</p>
+
+<a name="A002004"></a>
+<h4>2.4 Any plan to include 3ivx / DivX 5 encoding?</h4>
+<p>No. 3ivx/DivX aren't free software and have no multi-platform
+API.</p>
+
+<h3>3. Technical</h3>
+
+<a name="A003001"></a>
+<h4>3.1 What's the difference between Ffmpeg and XviD?</h4>
+<p>Both are MPEG-4 compliant encoders, so you may choose whichever you
+want. However, I would recommend Ffmpeg as it is pretty faster on BeOS
+and OS X.</p>
+
+<a name="A003002"></a>
+<h4>3.2 What is 2-pass encoding?</h4>
+<p>It performs a slower but better compression - basically it makes
+sure you'll get a constant quality so you won't see blocks in fast
+motion scenes. Though it's disabled by default, I would strongly
+recommend to use it except if you really care about time.</p>
+
+<h3>4. Misc</h3>
+
+<a name="A004001"></a>
+<h4>4.1. How do I donate for HandBrake?</h4>
+
+<p>I'm working on HandBrake for fun, therefore I haven't set up a
+paypal account or anything (and I won't). Thanks anyway to people who
+wanted to give me money ;p<br>
+There are still two ways to make me happy:</p>
+<ul>
+<li>Send me a friendly email</li>
+<li>You may send me a DVD (for example, a DVD HandBrake has problems
+with so I can work it out). Sending a DVD through the world isn't really
+handy though (the cheapest way is probably to order it online in a
+french store with my address for shipping), so if it's a problem, you
+can just fall back on the friendly mail ;)<br>
+<br>
+Here's the address:<br>
+Eric Petit<br>
+Résidence ECP - H211<br>
+2 avenue Sully Prudhomme<br>
+92290 Chatenay Malabry<br>
+France<br>
+</li>
+</ul>
+
+<a name="A004002"></a>
+<h4>4.2 Where do this stupid name / icon come from?</h4>
+<p>Don't ask.</p>
+
diff --git a/doc/genhtml.sh b/doc/genhtml.sh
new file mode 100755 (executable)
index 0000000..a88d414
--- /dev/null
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+rm -f faq.html
+
+DATE=$( grep "^\$Id" faq.txt | awk '{ print $4 " " $5; }' )
+
+cat > faq.html << EOF
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>HandBrake FAQ</title>
+<style type="text/css">
+body,p,th,td  { font-family: Verdana,Arial,Helvetica,sans-serif;
+                font-size: 8pt;
+                font-weight: normal;
+                color: #000000; }
+body          { margin-left: 10;
+                margin-top: 10;
+                margin-right: 10;
+                margin-bottom: 10;
+                background-color: #FFFFFF; }
+a             { color: #000000;
+                text-decoration: underline; }
+a:hover       { color: #888888; }
+</style>
+</head>
+<body bgcolor="#ffffff">
+
+<p>
+Last updated: ${DATE}<br>
+The latest version of this FAQ can be found <a
+href="http://handbrake.m0k.org/faq.php">here</a>.
+</p>
+EOF
+
+cat faq.txt | grep -v "^\$Id" >> faq.html
+
+cat >> faq.html << EOF
+</body>
+</html>
+EOF
+
index 714d974..6454060 100644 (file)
Binary files a/macosx/English.lproj/InfoPlist.strings and b/macosx/English.lproj/InfoPlist.strings differ
index 80f27b8..c578cde 100644 (file)
@@ -9,9 +9,9 @@
                <key>29</key>
                <string>297 654 165 44 0 0 1440 878 </string>
                <key>556</key>
-               <string>513 432 417 306 0 0 1440 878 </string>
+               <string>309 129 417 306 0 0 1440 878 </string>
                <key>583</key>
-               <string>573 493 144 171 0 0 1440 878 </string>
+               <string>650 499 144 171 0 0 1440 878 </string>
                <key>689</key>
                <string>513 258 418 610 0 0 1440 878 </string>
        </dict>
        <string>349.0</string>
        <key>IBOpenObjects</key>
        <array>
-               <integer>689</integer>
+               <integer>434</integer>
                <integer>365</integer>
                <integer>583</integer>
-               <integer>29</integer>
-               <integer>556</integer>
-               <integer>434</integer>
                <integer>21</integer>
+               <integer>689</integer>
+               <integer>29</integer>
        </array>
        <key>IBSystem Version</key>
        <string>7D24</string>
index b088624..7990b4e 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/objects.nib and b/macosx/English.lproj/MainMenu.nib/objects.nib differ
index 6416e2c..1ecef47 100644 (file)
        <key>CFBundleExecutable</key>
        <string>HandBrake</string>
        <key>CFBundleGetInfoString</key>
-       <string>HandBrake 0.5.2+ - By Eric Petit &lt;titer@m0k.org&gt;</string>
+       <string>HandBrake 0.6.0-test1+ - By Eric Petit &lt;titer@m0k.org&gt;</string>
        <key>CFBundleIconFile</key>
        <string>HandBrake.icns</string>
        <key>CFBundleIdentifier</key>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.5.2+</string>
+       <string>0.6.0-test1+</string>
        <key>CFBundleSignature</key>
        <string>HB##</string>
        <key>CFBundleVersion</key>
-       <string>0.5.2+</string>
+       <string>0.6.0-test1+</string>
        <key>NSMainNibFile</key>
        <string>MainMenu</string>
        <key>NSPrincipalClass</key>
index 8df1990..de755cb 100644 (file)
@@ -1,9 +1,10 @@
-/* $Id: PictureGLView.mm,v 1.3 2003/11/03 22:01:13 titer Exp $
+/* $Id: PictureGLView.mm,v 1.4 2004/02/23 18:08:41 titer Exp $
 
    This file is part of the HandBrake source code.
    Homepage: <http://handbrake.m0k.org/>.
    It may be used under the terms of the GNU General Public License. */
 
+#include <OpenGL/OpenGL.h>
 #include <OpenGL/gl.h>
 #include <math.h>
 
@@ -112,7 +113,8 @@ uint8_t * truc;
     glDepthFunc( GL_LEQUAL );
     glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
 
-#define ANIMATION_TIME  500000
+#define ANIMATION_TIME 1000000
+#define FRAME_PER_SEC  30
 
     rotation = 0.0;
     float w = ( how == HB_ANIMATE_LEFT ) ? 1.0 : -1.0;
@@ -126,7 +128,7 @@ uint8_t * truc;
 
         [self drawAnimation: how];
 
-        rotation += w;
+        rotation += w * 90 * 1000000 / ANIMATION_TIME / FRAME_PER_SEC;
         if( w * rotation >= 90.0 )
         {
             break;
@@ -176,6 +178,7 @@ uint8_t * truc;
     [[self openGLContext] makeCurrentContext];
     [self reshape];
 
+
     glGenTextures( 2, texture );
     truc = (uint8_t*) malloc( 1024*1024*4 );
 
@@ -197,62 +200,69 @@ uint8_t * truc;
 
 - (void) drawAnimation: (int) how
 {
-   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-   glMatrixMode( GL_PROJECTION );
-   glLoadIdentity();
-   glFrustum( -1.0, 1.0, -1.0, 1.0, PROUT, 20.0 );
-   glMatrixMode( GL_MODELVIEW );
-   glLoadIdentity();
-   glTranslatef( 0.0, 0.0, translation );
-   glRotatef( rotation, 0.0, 1.0, 0.0 );
-
-   glEnable( GL_POLYGON_SMOOTH );
-   glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
-
-   glBindTexture( GL_TEXTURE_2D, texture[0] );
-
-   glBegin( GL_QUADS );
-   glTexCoord2f( 0.0, 0.0 );
-   glVertex3f( -1.0, -1.0,  1.0 );
-   glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024, 0.0 );
-   glVertex3f(  1.0, -1.0,  1.0 );
-   glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024,
-                 ( 2.0 + fTitle->outHeightMax ) / 1024 );
-   glVertex3f(  1.0,  1.0,  1.0 );
-   glTexCoord2f( 0.0, ( 2.0 + fTitle->outHeightMax ) / 1024 );
-   glVertex3f( -1.0,  1.0,  1.0 );
-   glEnd();
-
-   glBindTexture( GL_TEXTURE_2D, texture[1] );
-
-   glBegin( GL_QUADS );
-   if( how == HB_ANIMATE_RIGHT )
-   {
-       glTexCoord2f( 0.0, 0.0 );
-       glVertex3f(  1.0, -1.0,  1.0 );
-       glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024, 0.0 );
-       glVertex3f(  1.0, -1.0,  -1.0 );
-       glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024,
-                     ( 2.0 + fTitle->outHeightMax ) / 1024 );
-       glVertex3f(  1.0,  1.0,  -1.0 );
-       glTexCoord2f( 0.0, ( 2.0 + fTitle->outHeightMax ) / 1024 );
-       glVertex3f(  1.0,  1.0,  1.0 );
-   }
-   else
-   {
-       glTexCoord2f( 0.0, 0.0 );
-       glVertex3f(  -1.0, -1.0, -1.0 );
-       glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024, 0.0 );
-       glVertex3f(  -1.0, -1.0, 1.0 );
-       glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024,
-                     ( 2.0 + fTitle->outHeightMax ) / 1024 );
-       glVertex3f(  -1.0,  1.0, 1.0 );
-       glTexCoord2f( 0.0, ( 2.0 + fTitle->outHeightMax ) / 1024 );
-       glVertex3f(  -1.0,  1.0, -1.0 );
-   }
-   glEnd();
-
-   [[self openGLContext] flushBuffer];
+    /* Swap buffers only during the vertical retrace of the monitor.
+       http://developer.apple.com/documentation/GraphicsImaging/
+       Conceptual/OpenGL/chap5/chapter_5_section_44.html */
+    long params[] = { 1 };
+    CGLSetParameter( CGLGetCurrentContext(), kCGLCPSwapInterval,
+                     params );
+
+    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+    glMatrixMode( GL_PROJECTION );
+    glLoadIdentity();
+    glFrustum( -1.0, 1.0, -1.0, 1.0, PROUT, 20.0 );
+    glMatrixMode( GL_MODELVIEW );
+    glLoadIdentity();
+    glTranslatef( 0.0, 0.0, translation );
+    glRotatef( rotation, 0.0, 1.0, 0.0 );
+    glEnable( GL_POLYGON_SMOOTH );
+    glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
+    glBindTexture( GL_TEXTURE_2D, texture[0] );
+    glBegin( GL_QUADS );
+    glTexCoord2f( 0.0, 0.0 );
+    glVertex3f( -1.0, -1.0,  1.0 );
+    glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024, 0.0 );
+    glVertex3f(  1.0, -1.0,  1.0 );
+    glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024,
+                  ( 2.0 + fTitle->outHeightMax ) / 1024 );
+    glVertex3f(  1.0,  1.0,  1.0 );
+    glTexCoord2f( 0.0, ( 2.0 + fTitle->outHeightMax ) / 1024 );
+    glVertex3f( -1.0,  1.0,  1.0 );
+    glEnd();
+    glBindTexture( GL_TEXTURE_2D, texture[1] );
+    glBegin( GL_QUADS );
+    if( how == HB_ANIMATE_RIGHT )
+    {
+        glTexCoord2f( 0.0, 0.0 );
+        glVertex3f(  1.0, -1.0,  1.0 );
+        glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024, 0.0 );
+        glVertex3f(  1.0, -1.0,  -1.0 );
+        glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024,
+                      ( 2.0 + fTitle->outHeightMax ) / 1024 );
+        glVertex3f(  1.0,  1.0,  -1.0 );
+        glTexCoord2f( 0.0, ( 2.0 + fTitle->outHeightMax ) / 1024 );
+        glVertex3f(  1.0,  1.0,  1.0 );
+    }
+    else
+    {
+        glTexCoord2f( 0.0, 0.0 );
+        glVertex3f(  -1.0, -1.0, -1.0 );
+        glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024, 0.0 );
+        glVertex3f(  -1.0, -1.0, 1.0 );
+        glTexCoord2f( ( 2.0 + fTitle->outWidthMax ) / 1024,
+                      ( 2.0 + fTitle->outHeightMax ) / 1024 );
+        glVertex3f(  -1.0,  1.0, 1.0 );
+        glTexCoord2f( 0.0, ( 2.0 + fTitle->outHeightMax ) / 1024 );
+        glVertex3f(  -1.0,  1.0, -1.0 );
+    }
+    glEnd();
+    [[self openGLContext] flushBuffer];
 }
 
 - (void) drawRect: (NSRect) rect
index a81b4ad..c1218f2 100644 (file)
Binary files a/macosx/i18n/French.strings and b/macosx/i18n/French.strings differ
index 99220c2..7ab1757 100644 (file)
Binary files a/macosx/i18n/German.strings and b/macosx/i18n/German.strings differ
diff --git a/macosx/i18n/it.strings b/macosx/i18n/it.strings
new file mode 100644 (file)
index 0000000..26587fa
Binary files /dev/null and b/macosx/i18n/it.strings differ
diff --git a/macosx/i18n/pl.strings b/macosx/i18n/pl.strings
new file mode 100644 (file)
index 0000000..8713a36
Binary files /dev/null and b/macosx/i18n/pl.strings differ
diff --git a/macosx/i18n/ru.strings b/macosx/i18n/ru.strings
new file mode 100644 (file)
index 0000000..cc6080f
Binary files /dev/null and b/macosx/i18n/ru.strings differ