Commit 848637d0 authored by Christophe Massiot's avatar Christophe Massiot

* MacOS X port :

- New creator ID : VLC#
- Borders in fullscreen mode are now black and the movie is centered
  (jlj P0\/\/3r)
- A/V sync should be much more precise
parent eb1ec4a4
......@@ -456,7 +456,7 @@ package-macosx:
# Copy relevant files
cp -R vlc.app tmp/
cp AUTHORS COPYING ChangeLog README FAQ TODO tmp/
cp AUTHORS COPYING ChangeLog README README\ -\ Mac\ OS\ X.rtf FAQ TODO tmp/
# Create disk image
./macosx-dmg 0 "vlc-${VERSION}" tmp/*
......
......@@ -213,11 +213,37 @@
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mpg</string>
<string>mpeg</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vlc.icns</string>
<key>CFBundleTypeName</key>
<string>MPEG file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>avi</string>
<string>asf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vlc.icns</string>
<key>CFBundleTypeName</key>
<string>DivX</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>vlc</string>
<key>CFBundleGetInfoString</key>
<string>VideoLan Client</string>
<string>VideoLAN Client</string>
<key>CFBundleIconFile</key>
<string>vlc.icns</string>
<key>CFBundleIdentifier</key>
......@@ -229,9 +255,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>vlc 0.2.90</string>
<string>vlc 0.3.1</string>
<key>CFBundleSignature</key>
<string>VLC#</string>
<key>CFBundleVersion</key>
<string>0.2.90</string>
<string>0.3.1</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
......
......@@ -2,7 +2,7 @@
* aout_macosx.c : CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: aout_macosx.c,v 1.17 2002/03/27 22:15:40 massiot Exp $
* $Id: aout_macosx.c,v 1.18 2002/04/25 23:07:23 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -38,6 +38,7 @@
#include <Carbon/Carbon.h>
#include <CoreAudio/AudioHardware.h>
#include <CoreAudio/HostTime.h>
#include <AudioToolbox/AudioConverter.h>
/*****************************************************************************
......@@ -60,6 +61,7 @@ typedef struct aout_sys_s
boolean_t b_buffer_data; // available buffer data?
vlc_mutex_t mutex_lock; // pthread locks for sync of
vlc_cond_t cond_sync; // aout_Play and callback
mtime_t clock_diff; // diff between system clock & audio
} aout_sys_t;
/*****************************************************************************
......@@ -145,6 +147,7 @@ static int aout_Open( aout_thread_t *p_aout )
intf_ErrMsg( "aout error: failed to get device buffer size: %d", err );
return( -1 );
}
p_aout->i_latency = p_aout->p_sys->ui_buffer_size;
/* get a description of the data format used by the device */
ui_param_size = sizeof( p_aout->p_sys->s_dst_stream_format );
......@@ -322,7 +325,15 @@ static OSStatus CAIOCallback( AudioDeviceID inDevice,
const AudioTimeStamp *inOutputTime,
void *threadGlobals )
{
aout_sys_t *p_sys = (aout_sys_t *)threadGlobals;
aout_thread_t *p_aout = (aout_thread_t *)threadGlobals;
aout_sys_t *p_sys = p_aout->p_sys;
#if 0
AudioTimeStamp host_time;
host_time.mFlags = kAudioTimeStampHostTimeValid;
AudioDeviceTranslateTime( inDevice, inOutputTime, &host_time );
intf_Msg( "%lld", AudioConvertHostTimeToNanos(host_time.mHostTime) / 1000 + p_aout->p_sys->clock_diff - p_aout->date );
#endif
/* see aout_Play below */
vlc_mutex_lock( &p_sys->mutex_lock );
......@@ -445,7 +456,7 @@ static int CABeginFormat( aout_thread_t *p_aout )
/* add callback */
err = AudioDeviceAddIOProc( p_aout->p_sys->device,
(AudioDeviceIOProc)CAIOCallback,
(void *)p_aout->p_sys );
(void *)p_aout );
if( err != noErr )
{
......@@ -467,6 +478,10 @@ static int CABeginFormat( aout_thread_t *p_aout )
return( 1 );
}
/* Let's pray for the following operation to be atomic... */
p_aout->p_sys->clock_diff = mdate()
- AudioConvertHostTimeToNanos(AudioGetCurrentHostTime()) / 1000;
p_aout->p_sys->b_format = 1;
return( 0 );
......
......@@ -2,7 +2,7 @@
* macosx.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: macosx.h,v 1.6 2002/04/17 23:03:35 massiot Exp $
* $Id: macosx.h,v 1.7 2002/04/25 23:07:23 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
......@@ -57,7 +57,6 @@ typedef struct vout_sys_s
CGrafPtr p_qdport;
ImageSequence i_seq;
MatrixRecordPtr p_matrix;
Rect display_rect;
DecompressorComponent img_dc;
ImageDescriptionHandle h_img_descr;
} vout_sys_t;
......
......@@ -513,8 +513,8 @@ static int CoToggleFullscreen( vout_thread_t *p_vout )
static void QTScaleMatrix( vout_thread_t *p_vout )
{
Rect s_rect;
Fixed factor_x;
Fixed factor_y;
Fixed factor_x, factor_y;
Fixed offset_x, offset_y;
GetPortBounds( p_vout->p_sys->p_qdport, &s_rect );
......@@ -526,13 +526,11 @@ static void QTScaleMatrix( vout_thread_t *p_vout )
Long2Fix( p_vout->output.i_width ) );
factor_y = FixDiv( Long2Fix( s_rect.bottom - s_rect.top ),
Long2Fix( p_vout->output.i_height ) );
#if 0
p_vout->p_sys->display_rect.top = 0;
p_vout->p_sys->display_rect.bottom = s_rect.bottom - s_rect.top;
p_vout->p_sys->display_rect.left = 12;
p_vout->p_sys->display_rect.right = 12 + (s_rect.bottom - s_rect.top)
* p_vout->output.i_aspect / VOUT_ASPECT_FACTOR;
#endif
offset_x = FixDiv( Long2Fix( s_rect.right - s_rect.left
- (s_rect.bottom - s_rect.top)
* p_vout->output.i_aspect / VOUT_ASPECT_FACTOR ),
Long2Fix( 2 ) );
offset_y = Long2Fix( 0 );
}
else
{
......@@ -541,19 +539,18 @@ static void QTScaleMatrix( vout_thread_t *p_vout )
factor_y = FixDiv( Long2Fix( (s_rect.right - s_rect.left)
* VOUT_ASPECT_FACTOR / p_vout->output.i_aspect ),
Long2Fix( p_vout->output.i_height ) );
#if 0
p_vout->p_sys->display_rect.top = 12;
p_vout->p_sys->display_rect.bottom = 12 + (s_rect.right - s_rect.left)
* VOUT_ASPECT_FACTOR / p_vout->output.i_aspect;
p_vout->p_sys->display_rect.left = 0;
p_vout->p_sys->display_rect.right = s_rect.right - s_rect.left;
#endif
offset_x = Long2Fix( 0 );
offset_y = FixDiv( Long2Fix( s_rect.bottom - s_rect.top
- (s_rect.right - s_rect.left)
* VOUT_ASPECT_FACTOR / p_vout->output.i_aspect ),
Long2Fix( 2 ) );
}
SetIdentityMatrix( p_vout->p_sys->p_matrix );
ScaleMatrix( p_vout->p_sys->p_matrix,
factor_x, factor_y,
Long2Fix(0), Long2Fix(0) );
TranslateMatrix( p_vout->p_sys->p_matrix, offset_x, offset_y );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* vout_qdview.c: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_qdview.c,v 1.2 2002/03/19 03:33:52 jlj Exp $
* $Id: vout_qdview.c,v 1.3 2002/04/25 23:07:23 massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -49,6 +49,8 @@
{
[super drawRect: rect];
[o_wrapper voutDidResize: p_vout];
[[NSColor blackColor] set];
NSRectFill(rect);
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment