/*****************************************************************************
* quicktime.c: a quicktime decoder that uses the QT library/dll
*****************************************************************************
- * Copyright (C) 2003 VideoLAN
- * $Id: quicktime.c,v 1.19 2003/11/23 22:18:08 hartman Exp $
+ * Copyright (C) 2003 the VideoLAN team
+ * $Id$
*
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
* Derk-Jan Hartman <thedj at users.sf.net>
#include <vlc/vout.h>
#include <vlc/decoder.h>
+#if !defined (SYS_DARWIN) && !defined(WIN32)
+# define LOADER 1
+#endif
+
#ifdef SYS_DARWIN
#include <QuickTime/QuickTimeComponents.h>
#include <QuickTime/Movies.h>
/* for windows do we require Quicktime compents header? */
#ifdef LOADER
-#include "w32dll/loader/qtx/qtxsdk/components.h"
-#include "w32dll/loader/wine/windef.h"
-#include "w32dll/loader/ldt_keeper.h"
+#include "qtx/qtxsdk/components.h"
+#include "wine/windef.h"
+#include "ldt_keeper.h"
HMODULE WINAPI LoadLibraryA(LPCSTR);
FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
vlc_module_begin();
set_description( _("QuickTime library decoder") );
set_capability( "decoder", 10 );
+ set_category( CAT_INPUT );
+ set_subcategory( SUBCAT_INPUT_VCODEC );
set_callbacks( Open, Close );
/* create a mutex */
unsigned int InFrameSize;
unsigned int OutFrameSize;
+#ifndef WIN32
/* Video */
Component (*FindNextComponent)
( Component prev, ComponentDescription* desc );
CodecDecompressParams decpar; /* for ImageCodecPreDecompress()*/
CodecCapabilities codeccap; /* for decpar */
-
+#endif
/* Output properties */
uint8_t * plane;
#ifndef SYS_DARWIN
if( ( i_error = p_sys->InitializeQTML( 6 + 16 ) ) )
{
- msg_Dbg( p_dec, "error while InitializeQTML = %d", i_error );
+ msg_Dbg( p_dec, "error on InitializeQTML = %d", i_error );
goto exit_error;
}
#endif
&p_sys->myConverter );
if( i_error )
{
- msg_Err( p_dec, "error while SoundConverterOpen = %d", i_error );
+ msg_Err( p_dec, "error on SoundConverterOpen = %d", i_error );
goto exit_error;
}
FCC( 'w', 'a', 'v', 'e' ),
((uint8_t*)p_dec->fmt_in.p_extra) + 36 + 8 );
- msg_Dbg( p_dec, "error while SoundConverterSetInfo = %d", i_error );
+ msg_Dbg( p_dec, "error on SoundConverterSetInfo = %d", i_error );
}
WantedBufferSize = p_sys->OutputFormatInfo.numChannels *
if( (i_error = p_sys->SoundConverterBeginConversion(p_sys->myConverter)) )
{
msg_Err( p_dec,
- "error while SoundConverterBeginConversion = %d", i_error );
+ "error on SoundConverterBeginConversion = %d", i_error );
goto exit_error;
}
vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock );
#endif
vlc_mutex_unlock( lockval.p_address );
+
+ free( p_sys );
return VLC_EGENERIC;
}
{
decoder_sys_t *p_sys = malloc( sizeof( decoder_sys_t ) );
+#ifndef WIN32
vlc_value_t lockval;
long i_result;
ComponentDescription desc;
#ifndef SYS_DARWIN
if( ( i_result = p_sys->InitializeQTML( 6 + 16 ) ) )
{
- msg_Dbg( p_dec, "error while InitializeQTML = %d", (int)i_result );
+ msg_Dbg( p_dec, "error on InitializeQTML = %d", (int)i_result );
goto exit_error;
}
#endif
Restore_LDT_Keeper( p_sys->ldt_fs );
#endif
vlc_mutex_unlock( lockval.p_address );
+
+#endif /* !WIN32 */
+
return VLC_EGENERIC;
}
+#ifndef WIN32
/*****************************************************************************
* DecodeVideo:
*****************************************************************************/
return p_pic;
}
+#endif /* !WIN32 */
/*****************************************************************************
* QTAudioInit:
if( p_sys->InitializeQTML == NULL )
{
- msg_Err( p_dec, "failed geting proc address InitializeQTML" );
+ msg_Err( p_dec, "failed getting proc address InitializeQTML" );
return VLC_EGENERIC;
}
if( p_sys->SoundConverterOpen == NULL ||
p_sys->SoundConverterEndConversion == NULL ||
p_sys->SoundConverterBeginConversion == NULL )
{
- msg_Err( p_dec, "failed geting proc address" );
+ msg_Err( p_dec, "failed getting proc address" );
return VLC_EGENERIC;
}
return VLC_SUCCESS;
}
-
+#ifndef WIN32
/*****************************************************************************
* QTVideoInit:
*****************************************************************************/
if( p_sys->InitializeQTML == NULL )
{
- msg_Dbg( p_dec, "failed geting proc address InitializeQTML" );
+ msg_Dbg( p_dec, "failed getting proc address InitializeQTML" );
return VLC_EGENERIC;
}
if( p_sys->FindNextComponent == NULL ||
p_sys->QTNewGWorldFromPtr == NULL ||
p_sys->NewHandleClear == NULL )
{
- msg_Err( p_dec, "failed geting proc address" );
+ msg_Err( p_dec, "failed getting proc address" );
return VLC_EGENERIC;
}
#endif /* SYS_DARWIN */
return VLC_SUCCESS;
}
-
-
+#endif /* !WIN32 */