/*****************************************************************************
* vout.m: MacOS X video output module
*****************************************************************************
- * Copyright (C) 2001-2004 VideoLAN
+ * Copyright (C) 2001-2004 the VideoLAN team
* $Id: vout.m 8351 2004-08-02 13:06:38Z hartman $
*
* Authors: Colin Delacroix <colin@zoy.org>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
struct vout_sys_t
{
NSAutoreleasePool *o_pool;
- VLCWindow * o_window;
VLCQTView * o_qtview;
+ VLCVoutView * o_vout_view;
vlc_bool_t b_saved_frame;
vlc_bool_t b_altivec;
p_vout->p_sys->b_embedded = VLC_FALSE;
p_vout->p_sys->b_altivec = p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC;
- msg_Dbg( p_vout, "We do%s have Altivec", p_vout->p_sys->b_altivec ? "" : "n't" );
+ msg_Dbg( p_vout, "we do%s have Altivec", p_vout->p_sys->b_altivec ? "" : "n't" );
/* Initialize QuickTime */
p_vout->p_sys->h_img_descr =
if( ( err = EnterMovies() ) != noErr )
{
- msg_Err( p_vout, "EnterMovies failed: %d", err );
+ msg_Err( p_vout, "QT initialization failed: EnterMovies failed: %d", err );
free( p_vout->p_sys->p_matrix );
DisposeHandle( (Handle)p_vout->p_sys->h_img_descr );
free( p_vout->p_sys );
}
else
{
- msg_Err( p_vout, "failed to find an appropriate codec" );
+ msg_Err( p_vout, "QT doesn't support any appropriate chroma" );
}
if( p_vout->p_sys->img_dc == 0 )
else
{
/* Spawn window */
- p_vout->p_sys->o_window = [[VLCWindow alloc]
- initWithVout: p_vout view: o_qtview frame: nil];
- if( !p_vout->p_sys->o_window )
+ p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout
+ subView: o_qtview frame: nil];
+ if( !p_vout->p_sys->o_vout_view )
{
return VLC_EGENERIC;
}
*****************************************************************************/
void E_(CloseVideoQT) ( vlc_object_t *p_this )
{
- NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
+ NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
vout_thread_t * p_vout = (vout_thread_t *)p_this;
if( !p_vout->p_sys->b_embedded )
- [p_vout->p_sys->o_window close];
+ [p_vout->p_sys->o_vout_view closeVout];
/* Clean Up Quicktime environment */
ExitMovies();
if( QTCreateSequence( p_vout ) )
{
- msg_Err( p_vout, "unable to create sequence" );
+ msg_Err( p_vout, "unable to initialize QT: QTCreateSequence failed" );
return( 1 );
}
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
}
- [p_vout->p_sys->o_window manage];
+ [p_vout->p_sys->o_vout_view manage];
return( 0 );
}
p_pic->p_sys->i_size,
codecFlagUseImageBuffer, &flags, NULL, NULL ) != noErr ) )
{
- msg_Warn( p_vout, "DecompressSequenceFrameWhen failed: %d", err );
+ msg_Warn( p_vout, "QT failed to display the frame sequence: %d", err );
}
else
{
{
case VOUT_SET_STAY_ON_TOP:
b_arg = va_arg( args, vlc_bool_t );
- [p_vout->p_sys->o_window setOnTop: b_arg];
+ [p_vout->p_sys->o_vout_view setOnTop: b_arg];
return VLC_SUCCESS;
case VOUT_CLOSE:
{
/* Save window size and position */
p_vout->p_sys->s_frame.size =
- [[p_vout->p_sys->o_window contentView] frame].size;
+ [p_vout->p_sys->o_vout_view frame].size;
p_vout->p_sys->s_frame.origin =
- [p_vout->p_sys->o_window frame].origin;
+ [[p_vout->p_sys->o_vout_view getWindow] frame].origin;
p_vout->p_sys->b_saved_frame = VLC_TRUE;
}
- [p_vout->p_sys->o_window close];
+ [p_vout->p_sys->o_vout_view closeVout];
p_vout->b_fullscreen = !p_vout->b_fullscreen;
if( p_vout->p_sys->b_saved_frame )
{
- p_vout->p_sys->o_window = [[VLCWindow alloc]
- initWithVout: p_vout view: o_qtview
+ p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout
+ subView: o_qtview
frame: &p_vout->p_sys->s_frame];
}
else
{
- p_vout->p_sys->o_window = [[VLCWindow alloc]
- initWithVout: p_vout view: o_qtview frame: nil];
+ p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout
+ subView: o_qtview frame: nil];
}
/* Retrieve the QuickDraw port */
if( QTCreateSequence( p_vout ) )
{
- msg_Err( p_vout, "unable to create sequence" );
+ msg_Err( p_vout, "unable to initialize QT: QTCreateSequence failed" );
return( 1 );
}
codecLosslessQuality,
bestSpeedCodec ) ) )
{
- msg_Err( p_vout, "DecompressSequenceBeginS failed: %d", err );
+ msg_Err( p_vout, "Failed to initialize QT: DecompressSequenceBeginS failed: %d", err );
return( 1 );
}
default:
/* Unknown chroma, tell the guy to get lost */
free( p_pic->p_sys );
- msg_Err( p_vout, "never heard of chroma 0x%.8x (%4.4s)",
+ msg_Err( p_vout, "Unknown chroma format 0x%.8x (%4.4s)",
p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma );
p_pic->i_planes = 0;
return( -1 );