Commit 98555255 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Remove QuickTime module

parent 840b2226
......@@ -219,6 +219,7 @@ Removed modules
* VCDX "extended" Video CD access module (use the normal VCD module)
* Mac OS X Dialog Provider (use VLCKit instead)
* iOS Dialog Provider (use MobileVLCKit / TVVLCKit instead)
* QuickTime decoder module (use native codecs)
Changes between 2.2.0 and 2.2.1:
......
......@@ -2649,21 +2649,6 @@ dnl fdk-aac encoder plugin
dnl
PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])
dnl
dnl QuickTime plugin
dnl
AC_ARG_ENABLE(quicktime,
[ --enable-quicktime QuickTime module (deprecated)])
if test "${enable_quicktime}" = "yes"; then
if test "${SYS}" = "mingw32"; then
VLC_ADD_PLUGIN([quicktime])
else
AC_CHECK_HEADERS(QuickTime/QuickTime.h,
[ VLC_ADD_PLUGIN([quicktime])
VLC_ADD_LIBS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
fi
fi
dnl
dnl A52/AC3 decoder plugin
......
......@@ -7,7 +7,6 @@ OPTIONS="
--enable-flac
--enable-theora
--enable-twolame
--enable-quicktime
--enable-avcodec --enable-merge-ffmpeg
--enable-dca
--enable-mpc
......
......@@ -310,7 +310,6 @@ $Id$
* qsv: QuickSyncVideo Encoder for Intel hardware
* qt: interface module using the cross-platform Qt widget library
* qtsound: Quicktime Audio Capture
* quicktime: Quicktime decoder that uses the QT library
* rar: RAR access and stream filter
* rawaud: raw audio input module for vlc
* rawdv: Raw DV demuxer
......
......@@ -543,12 +543,6 @@ libmft_plugin_la_LIBADD = -lole32 -luuid -lmfuuid -lmfplat
codec_LTLIBRARIES += libmft_plugin.la
endif
libquicktime_plugin_la_SOURCES = codec/quicktime.c
libquicktime_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
libquicktime_plugin_la_LIBADD = $(LIBM)
EXTRA_LTLIBRARIES += libquicktime_plugin.la
codec_LTLIBRARIES += $(LTLIBquicktime)
libgstdecode_plugin_la_SOURCES = codec/gstreamer/gstdecode.c \
codec/gstreamer/gstvlcpictureplaneallocator.c \
codec/gstreamer/gstvlcpictureplaneallocator.h \
......
/*****************************************************************************
* quicktime.c: a quicktime decoder that uses the QT library/dll
*****************************************************************************
* Copyright (C) 2003, 2008 - 2009 VLC authors and VideoLAN
* $Id$
*
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
* Derk-Jan Hartman <hartman at videolan.org>>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#if !defined (__APPLE__) && !defined(_WIN32)
# define LOADER 1
#endif
#ifdef __APPLE__
#include <QuickTime/QuickTimeComponents.h>
#include <QuickTime/Movies.h>
#include <QuickTime/ImageCodec.h>
#endif
/* for windows do we require Quicktime compents header? */
#ifdef LOADER
#include "qtx/qtxsdk/components.h"
#include "wine/windef.h"
#include "ldt_keeper.h"
HMODULE WINAPI LoadLibraryA(LPCSTR);
FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
int WINAPI FreeLibrary(HMODULE);
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
vlc_module_begin ()
set_description( N_("QuickTime library decoder") )
set_capability( "decoder", 0 )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_VCODEC )
set_callbacks( Open, Close )
vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int OpenAudio( decoder_t * );
static int OpenVideo( decoder_t * );
static block_t *DecodeAudio( decoder_t *, block_t ** );
#ifndef _WIN32
static picture_t *DecodeVideo( decoder_t *, block_t ** );
#endif
#define FCC( a, b , c, d ) \
((uint32_t)( ((a)<<24)|((b)<<16)|((c)<<8)|(d)))
#ifndef __APPLE__
typedef struct OpaqueSoundConverter* SoundConverter;
#ifndef LOADER
typedef long OSType;
typedef int OSErr;
#endif
typedef unsigned long UnsignedFixed;
typedef uint8_t Byte;
typedef struct SoundComponentData {
long flags;
OSType format;
short numChannels;
short sampleSize;
UnsignedFixed sampleRate;
long sampleCount;
Byte * buffer;
long reserved;
} SoundComponentData;
#endif /* __APPLE__ */
struct decoder_sys_t
{
/* library */
#ifndef __APPLE__
#ifdef LOADER
ldt_fs_t *ldt_fs;
#endif /* LOADER */
HMODULE qtml;
HINSTANCE qts;
OSErr (*InitializeQTML) ( long flags );
OSErr (*TerminateQTML) ( void );
#endif /* __APPLE__ */
/* Audio */
int (*SoundConverterOpen) ( const SoundComponentData *,
const SoundComponentData *,
SoundConverter* );
int (*SoundConverterClose) ( SoundConverter );
int (*SoundConverterSetInfo) ( SoundConverter , OSType, void * );
int (*SoundConverterGetBufferSizes) ( SoundConverter, unsigned long,
unsigned long*, unsigned long*,
unsigned long* );
int (*SoundConverterBeginConversion)( SoundConverter );
int (*SoundConverterEndConversion) ( SoundConverter, void *,
unsigned long *, unsigned long *);
int (*SoundConverterConvertBuffer) ( SoundConverter, const void *,
unsigned long, void *,
unsigned long *, unsigned long * );
SoundConverter myConverter;
SoundComponentData InputFormatInfo, OutputFormatInfo;
unsigned long FramesToGet;
unsigned int InFrameSize;
unsigned int OutFrameSize;
#ifndef _WIN32
/* Video */
Component (*FindNextComponent)
( Component prev, ComponentDescription* desc );
ComponentInstance (*OpenComponent)
( Component c );
ComponentResult (*ImageCodecInitialize)
( ComponentInstance ci, ImageSubCodecDecompressCapabilities * cap);
ComponentResult (*ImageCodecGetCodecInfo)
( ComponentInstance ci, CodecInfo *info );
ComponentResult (*ImageCodecPreDecompress)
( ComponentInstance ci, CodecDecompressParams * params );
ComponentResult (*ImageCodecBandDecompress)
( ComponentInstance ci, CodecDecompressParams * params );
PixMapHandle (*GetGWorldPixMap)
( GWorldPtr offscreenGWorld );
OSErr (*QTNewGWorldFromPtr)
( GWorldPtr *gw, OSType pixelFormat, const Rect *boundsRect,
CTabHandle cTable, /*GDHandle*/ void *aGDevice, /*unused*/
GWorldFlags flags, void *baseAddr, long rowBytes );
OSErr (*NewHandleClear)( Size byteCount );
ComponentInstance ci;
Rect OutBufferRect; /* the dimensions of our GWorld */
GWorldPtr OutBufferGWorld; /* a GWorld is some kind of
description for a drawing
environment */
ImageDescriptionHandle framedescHandle;
CodecDecompressParams decpar; /* for ImageCodecPreDecompress()*/
CodecCapabilities codeccap; /* for decpar */
#endif
/* Output properties */
uint8_t * plane;
mtime_t pts;
date_t date;
int i_late; /* video */
/* buffer */
unsigned int i_buffer;
unsigned int i_buffer_size;
uint8_t *p_buffer;
/* Audio only */
uint8_t out_buffer[1000000]; /* FIXME */
int i_out_frames;
int i_out;
};
static const int pi_channels_maps[6] =
{
0,
AOUT_CHAN_CENTER,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARLEFT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARLEFT
};
static int QTAudioInit( decoder_t * );
#ifndef _WIN32
static int QTVideoInit( decoder_t * );
#endif
/*****************************************************************************
* Open: probe the decoder and return score
*****************************************************************************
* Tries to launch a decoder and return score so that the interface is able
* to choose.
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t*)p_this;
#ifdef __APPLE__
OSErr err;
SInt32 qtVersion, macosversion;
err = Gestalt(gestaltQuickTimeVersion, &qtVersion);
err = Gestalt(gestaltSystemVersion, &macosversion);
#ifndef NDEBUG
msg_Dbg( p_this, "Mac OS version is %#lx", macosversion );
msg_Dbg( p_this, "Quicktime version is %#lx", qtVersion );
#endif
/* bail out. This plugin is soo Carbon, that it can't be used on 10.5 at all */
msg_Info( p_dec, "Your Mac OS version is too new to use this plugin for anything." );
return VLC_EGENERIC;
#endif
switch( p_dec->fmt_in.i_codec )
{
case VLC_CODEC_H264:
case VLC_CODEC_CINEPAK:
case VLC_FOURCC('I','V','4','1'): /* Indeo Video IV */
case VLC_FOURCC('i','v','4','1'): /* dto. */
#ifdef __APPLE__
case VLC_FOURCC('p','x','l','t'): /* Pixlet */
#endif
case VLC_CODEC_DV:
case VLC_CODEC_SVQ3: /* Sorenson v3 */
/* case VLC_CODEC_SVQ1: Sorenson v1
case VLC_FOURCC('Z','y','G','o'):
case VLC_FOURCC('V','P','3','1'):
case VLC_FOURCC('3','I','V','1'): */
case VLC_CODEC_QTRLE:
case VLC_CODEC_RPZA:
#ifdef LOADER
p_dec->p_sys = NULL;
p_dec->pf_decode_video = DecodeVideo;
p_dec->fmt_out.i_cat = VIDEO_ES;
return VLC_SUCCESS;
#else
return OpenVideo( p_dec );
#endif
#ifdef __APPLE__
case VLC_FOURCC('I','L','B','C'): /* iLBC */
if ((err != noErr) || (qtVersion < 0x07500000))
return VLC_EGENERIC;
case VLC_FOURCC('i','l','b','c'): /* iLBC */
if ((err != noErr) || (qtVersion < 0x07500000))
return VLC_EGENERIC;
#endif
case VLC_CODEC_AMR_NB: /* 3GPP AMR audio */
case VLC_FOURCC('s','a','m','b'): /* 3GPP AMR-WB audio */
case VLC_CODEC_MP4A: /* MPEG-4 audio */
case VLC_FOURCC('Q','D','M','C'): /* QDesign */
case VLC_CODEC_QDM2: /* QDesign* 2 */
case VLC_CODEC_QCELP: /* Qualcomm Purevoice Codec */
case VLC_FOURCC('Q','C','L','P'): /* Qualcomm Purevoice Codec */
case VLC_CODEC_MACE3: /* MACE3 audio decoder */
case VLC_CODEC_MACE6: /* MACE6 audio decoder */
case VLC_FOURCC('d','v','c','a'): /* DV Audio */
case VLC_FOURCC('s','o','w','t'): /* 16-bit Little Endian */
case VLC_FOURCC('t','w','o','s'): /* 16-bit Big Endian */
case VLC_CODEC_ALAW: /* ALaw 2:1 */
case VLC_FOURCC('u','l','a','w'): /* mu-Law 2:1 */
case VLC_FOURCC('r','a','w',' '): /* 8-bit offset binaries */
case VLC_CODEC_FL32: /* 32-bit Floating Point */
case VLC_CODEC_FL64: /* 64-bit Floating Point */
case VLC_FOURCC('i','n','2','4'): /* 24-bit Interger */
case VLC_FOURCC('i','n','3','2'): /* 32-bit Integer */
case 0x0011: /* DVI IMA */
case 0x6D730002: /* Microsoft ADPCM-ACM */
case 0x6D730011: /* DVI Intel IMAADPCM-ACM */
#ifdef LOADER
p_dec->p_sys = NULL;
p_dec->pf_decode_audio = DecodeAudio;
p_dec->fmt_out.i_cat = AUDIO_ES;
return VLC_SUCCESS;
#else
return OpenAudio( p_dec );
#endif
default:
return VLC_EGENERIC;
}
}
static vlc_mutex_t qt_mutex = VLC_STATIC_MUTEX;
/*****************************************************************************
* Close:
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys = p_dec->p_sys;
/* get lock, avoid segfault */
vlc_mutex_lock( &qt_mutex );
if( p_dec->fmt_out.i_cat == AUDIO_ES )
{
int i_error;
unsigned long ConvertedFrames=0;
unsigned long ConvertedBytes=0;
i_error = p_sys->SoundConverterEndConversion( p_sys->myConverter, NULL,
&ConvertedFrames,
&ConvertedBytes );
msg_Dbg( p_dec, "SoundConverterEndConversion => %d", i_error );
i_error = p_sys->SoundConverterClose( p_sys->myConverter );
msg_Dbg( p_dec, "SoundConverterClose => %d", i_error );
free( p_sys->p_buffer );
}
else if( p_dec->fmt_out.i_cat == VIDEO_ES )
{
free( p_sys->plane );
}
#ifndef __APPLE__
FreeLibrary( p_sys->qtml );
FreeLibrary( p_sys->qts );
msg_Dbg( p_dec, "FreeLibrary ok." );
#else
ExitMovies();
#endif
#if 0
/* Segfault */
#ifdef LOADER
Restore_LDT_Keeper( p_sys->ldt_fs );
msg_Dbg( p_dec, "Restore_LDT_Keeper" );
#endif
#endif
vlc_mutex_unlock( &qt_mutex );
free( p_sys );
}
/*****************************************************************************
* OpenAudio:
*****************************************************************************/
static int OpenAudio( decoder_t *p_dec )
{
decoder_sys_t *p_sys;
int i_error;
char fcc[4];
unsigned long WantedBufferSize;
unsigned long InputBufferSize = 0;
unsigned long OutputBufferSize = 0;
/* get lock, avoid segfault */
vlc_mutex_lock( &qt_mutex );
p_sys = calloc( 1, sizeof( decoder_sys_t ) );
p_dec->p_sys = p_sys;
p_dec->pf_decode_audio = DecodeAudio;
if( p_dec->fmt_in.i_original_fourcc )
memcpy( fcc, &p_dec->fmt_in.i_original_fourcc, 4 );
else
memcpy( fcc, &p_dec->fmt_in.i_codec, 4 );
#ifdef __APPLE__
EnterMovies();
#endif
if( QTAudioInit( p_dec ) )
{
msg_Err( p_dec, "cannot initialize QT");
goto exit_error;
}
#ifndef __APPLE__
if( ( i_error = p_sys->InitializeQTML( 6 + 16 ) ) )
{
msg_Dbg( p_dec, "error on InitializeQTML = %d", i_error );
goto exit_error;
}
#endif
/* input format settings */
p_sys->InputFormatInfo.flags = 0;
p_sys->InputFormatInfo.sampleCount = 0;
p_sys->InputFormatInfo.buffer = NULL;
p_sys->InputFormatInfo.reserved = 0;
p_sys->InputFormatInfo.numChannels = p_dec->fmt_in.audio.i_channels;
p_sys->InputFormatInfo.sampleSize = p_dec->fmt_in.audio.i_bitspersample;
p_sys->InputFormatInfo.sampleRate = p_dec->fmt_in.audio.i_rate;
p_sys->InputFormatInfo.format = FCC( fcc[0], fcc[1], fcc[2], fcc[3] );
/* output format settings */
p_sys->OutputFormatInfo.flags = 0;
p_sys->OutputFormatInfo.sampleCount = 0;
p_sys->OutputFormatInfo.buffer = NULL;
p_sys->OutputFormatInfo.reserved = 0;
p_sys->OutputFormatInfo.numChannels = p_dec->fmt_in.audio.i_channels;
p_sys->OutputFormatInfo.sampleSize = 16;
p_sys->OutputFormatInfo.sampleRate = p_dec->fmt_in.audio.i_rate;
p_sys->OutputFormatInfo.format = FCC( 'N', 'O', 'N', 'E' );
i_error = p_sys->SoundConverterOpen( &p_sys->InputFormatInfo,
&p_sys->OutputFormatInfo,
&p_sys->myConverter );
if( i_error )
{
msg_Err( p_dec, "error on SoundConverterOpen = %d", i_error );
goto exit_error;
}
#if 0
/* tell the sound converter we accept VBR formats */
i_error = SoundConverterSetInfo( p_dec->myConverter, siClientAcceptsVBR,
(void *)true );
#endif
if( p_dec->fmt_in.i_extra > 36 + 8 )
{
i_error = p_sys->SoundConverterSetInfo( p_sys->myConverter,
FCC( 'w', 'a', 'v', 'e' ),
((uint8_t*)p_dec->fmt_in.p_extra) + 36 + 8 );
msg_Dbg( p_dec, "error on SoundConverterSetInfo = %d", i_error );
}
WantedBufferSize = p_sys->OutputFormatInfo.numChannels *
p_sys->OutputFormatInfo.sampleRate * 2;
p_sys->FramesToGet = 0;
i_error = p_sys->SoundConverterGetBufferSizes( p_sys->myConverter,
WantedBufferSize,
&p_sys->FramesToGet,
&InputBufferSize,
&OutputBufferSize );
msg_Dbg( p_dec, "WantedBufferSize=%li InputBufferSize=%li "
"OutputBufferSize=%li FramesToGet=%li",
WantedBufferSize, InputBufferSize, OutputBufferSize,
p_sys->FramesToGet );
p_sys->InFrameSize = (InputBufferSize + p_sys->FramesToGet - 1 ) /
p_sys->FramesToGet;
p_sys->OutFrameSize = OutputBufferSize / p_sys->FramesToGet;
msg_Dbg( p_dec, "frame size %d -> %d",
p_sys->InFrameSize, p_sys->OutFrameSize );
if( (i_error = p_sys->SoundConverterBeginConversion(p_sys->myConverter)) )
{
msg_Err( p_dec,
"error on SoundConverterBeginConversion = %d", i_error );
goto exit_error;
}
es_format_Init( &p_dec->fmt_out, AUDIO_ES, VLC_CODEC_S16N );
p_dec->fmt_out.audio.i_rate = p_sys->OutputFormatInfo.sampleRate;
p_dec->fmt_out.audio.i_channels = p_sys->OutputFormatInfo.numChannels;
p_dec->fmt_out.audio.i_physical_channels =
p_dec->fmt_out.audio.i_original_channels =
pi_channels_maps[p_sys->OutputFormatInfo.numChannels];
date_Init( &p_sys->date, p_dec->fmt_out.audio.i_rate, 1 );
p_sys->i_buffer = 0;
p_sys->i_buffer_size = 100*1000;
p_sys->p_buffer = malloc( p_sys->i_buffer_size );
if( !p_sys->p_buffer )
goto exit_error;
p_sys->i_out = 0;
p_sys->i_out_frames = 0;
vlc_mutex_unlock( &qt_mutex );
return VLC_SUCCESS;
exit_error:
#ifdef LOADER
Restore_LDT_Keeper( p_sys->ldt_fs );
#endif
vlc_mutex_unlock( &qt_mutex );
free( p_sys );
return VLC_EGENERIC;
}
/*****************************************************************************
* DecodeAudio:
*****************************************************************************/
static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
{
decoder_sys_t *p_sys = p_dec->p_sys;
block_t *p_block;
int i_error;
#ifdef LOADER
/* We must do open and close in the same thread (unless we do
* Setup_LDT_Keeper in the main thread before all others */
if( p_sys == NULL )
{
if( OpenAudio( p_dec ) )
{
/* Fatal */
p_dec->b_error = true;
return NULL;
}
p_sys = p_dec->p_sys;
}
#endif
if( pp_block == NULL || *pp_block == NULL )
{
return NULL;
}
p_block = *pp_block;
if( p_sys->i_out_frames > 0 && p_sys->i_out >= p_sys->i_out_frames )
{
/* Ask new data */
p_sys->i_out = 0;
p_sys->i_out_frames = 0;
*pp_block = NULL;
return NULL;
}
if( p_sys->i_out_frames <= 0 )
{
p_sys->pts = p_block->i_pts;
mtime_t i_display_date = 0;
if( !(p_block->i_flags & BLOCK_FLAG_PREROLL) )
i_display_date = decoder_GetDisplayDate( p_dec, p_block->i_pts );
if( i_display_date > 0 && i_display_date < mdate() )
{
block_Release( p_block );
*pp_block = NULL;
return NULL;
}
/* Append data */
if( p_sys->i_buffer_size < p_sys->i_buffer + p_block->i_buffer )
{
p_sys->i_buffer_size = p_sys->i_buffer + p_block->i_buffer + 1024;
p_sys->p_buffer = xrealloc( p_sys->p_buffer, p_sys->i_buffer_size );
}
memcpy( &p_sys->p_buffer[p_sys->i_buffer], p_block->p_buffer,
p_block->i_buffer );
p_sys->i_buffer += p_block->i_buffer;
if( p_sys->i_buffer > p_sys->InFrameSize )
{
int i_frames = p_sys->i_buffer / p_sys->InFrameSize;
unsigned long i_out_frames, i_out_bytes;
vlc_mutex_lock( &qt_mutex );
i_error = p_sys->SoundConverterConvertBuffer( p_sys->myConverter,
p_sys->p_buffer,
i_frames,
p_sys->out_buffer,
&i_out_frames,
&i_out_bytes );
vlc_mutex_unlock( &qt_mutex );
/*
msg_Dbg( p_dec, "decoded %d frames -> %ld frames (error=%d)",
i_frames, i_out_frames, i_error );
msg_Dbg( p_dec, "decoded %ld frames = %ld bytes",
i_out_frames, i_out_bytes );
*/
p_sys->i_buffer -= i_frames * p_sys->InFrameSize;
if( p_sys->i_buffer > 0 )
{
memmove( &p_sys->p_buffer[0],
&p_sys->p_buffer[i_frames * p_sys->InFrameSize],
p_sys->i_buffer );
}
if( p_sys->pts > VLC_TS_INVALID &&
p_sys->pts != date_Get( &p_sys->date ) )
{
date_Set( &p_sys->date, p_sys->pts );
}
else if( !date_Get( &p_sys->date ) )
{
return NULL;
}
if( !i_error && i_out_frames > 0 )
{
/* we have others samples */
p_sys->i_out_frames = i_out_frames;
p_sys->i_out = 0;
}
}
}
if( p_sys->i_out < p_sys->i_out_frames )
{
block_t *p_out;
int i_frames = __MIN( p_sys->i_out_frames - p_sys->i_out, 1000 );
p_out = decoder_NewAudioBuffer( p_dec, i_frames );
if( p_out )
{
p_out->i_pts = date_Get( &p_sys->date );
p_out->i_length = date_Increment( &p_sys->date, i_frames )
- p_out->i_pts;
memcpy( p_out->p_buffer,
&p_sys->out_buffer[2 * p_sys->i_out * p_dec->fmt_out.audio.i_channels],
p_out->i_buffer );
p_sys->i_out += i_frames;
}
return p_out;
}
return NULL;
}
/*****************************************************************************
* OpenVideo:
*****************************************************************************/
static int OpenVideo( decoder_t *p_dec )
{
#ifndef _WIN32
decoder_sys_t *p_sys = malloc( sizeof( decoder_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
long i_result;
ComponentDescription desc;
Component prev;
ComponentResult cres;