* thread, and destroy a previously opened video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_output.h,v 1.87 2002/11/20 13:37:35 sam Exp $
+ * $Id: video_output.h,v 1.88 2002/11/28 17:34:59 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
/*****************************************************************************
* Prototypes
*****************************************************************************/
-#define vout_CreateThread(a,b,c,d,e) __vout_CreateThread(VLC_OBJECT(a),b,c,d,e)
-VLC_EXPORT( vout_thread_t *, __vout_CreateThread, ( vlc_object_t *, unsigned int, unsigned int, uint32_t, unsigned int ) );
-VLC_EXPORT( void, vout_DestroyThread, ( vout_thread_t * ) );
+#define vout_Request(a,b,c,d,e,f) __vout_Request(VLC_OBJECT(a),b,c,d,e,f)
+VLC_EXPORT( vout_thread_t *, __vout_Request, ( vlc_object_t *, vout_thread_t *, unsigned int, unsigned int, uint32_t, unsigned int ) );
+#define vout_Create(a,b,c,d,e) __vout_Create(VLC_OBJECT(a),b,c,d,e)
+VLC_EXPORT( vout_thread_t *, __vout_Create, ( vlc_object_t *, unsigned int, unsigned int, uint32_t, unsigned int ) );
+VLC_EXPORT( void, vout_Destroy, ( vout_thread_t * ) );
VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) );
* cinepak.c: cinepak video decoder
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: cinepak.c,v 1.8 2002/11/27 15:18:24 sam Exp $
+ * $Id: cinepak.c,v 1.9 2002/11/28 17:34:59 sam Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
}
}
-static int cinepak_CheckVout( vout_thread_t *p_vout,
- int i_width,
- int i_height )
-{
- if( !p_vout )
- {
- return( 0 );
- }
-
- if( ( p_vout->render.i_width != i_width )||
- ( p_vout->render.i_height != i_height )||
- ( p_vout->render.i_chroma != VLC_FOURCC('I','4','2','0') )||
- ( p_vout->render.i_aspect != VOUT_ASPECT_FACTOR * i_width / i_height) )
- {
- return( 0 );
- }
- else
- {
- return( 1 );
- }
-}
-
-/* Return a Vout */
-
-static vout_thread_t *cinepak_CreateVout( videodec_thread_t *p_vdec,
- int i_width,
- int i_height )
-{
- vout_thread_t *p_vout;
-
- if( (!i_width)||(!i_height) )
- {
- return( NULL ); /* Can't create a new vout without display size */
- }
-
- /* Spawn a video output if there is none. First we look for our children,
- * then we look for any other vout that might be available. */
- p_vout = vlc_object_find( p_vdec->p_fifo, VLC_OBJECT_VOUT,
- FIND_CHILD );
- if( !p_vout )
- {
- p_vout = vlc_object_find( p_vdec->p_fifo, VLC_OBJECT_VOUT,
- FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( !cinepak_CheckVout( p_vout, i_width, i_height ) )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_vdec->p_fifo );
- vlc_object_release( p_vout );
- }
- }
-
- if( p_vout == NULL )
- {
- msg_Dbg( p_vdec->p_fifo, "no vout present, spawning one" );
-
- p_vout = vout_CreateThread( p_vdec->p_fifo,
- i_width,
- i_height,
- VLC_FOURCC('I','4','2','0'),
- VOUT_ASPECT_FACTOR * i_width / i_height );
- }
-
- return( p_vout );
-}
void cinepak_LoadCodebook( cinepak_codebook_t *p_codebook,
u8 *p_data,
i_frame_size );
return;
}
-
- /* Check our vout */
- if( !cinepak_CheckVout( p_vdec->p_vout,
- p_vdec->p_context->i_width,
- p_vdec->p_context->i_height ) )
- {
- p_vdec->p_vout =
- cinepak_CreateVout( p_vdec,
- p_vdec->p_context->i_width,
- p_vdec->p_context->i_height );
- if( !p_vdec->p_vout )
- {
- msg_Err( p_vdec->p_fifo, "cannot create vout" );
- p_vdec->p_fifo->b_error = 1; /* abort */
- return;
- }
+ /* Check our vout */
+ p_vdec->p_vout = vout_Request( p_vdec->p_fifo, p_vdec->p_vout,
+ p_vdec->p_context->i_width,
+ p_vdec->p_context->i_height,
+ VLC_FOURCC('I','4','2','0'),
+ p_vdec->p_context->i_width
+ * VOUT_ASPECT_FACTOR
+ / p_vdec->p_context->i_height );
+
+ if( !p_vdec->p_vout )
+ {
+ msg_Err( p_vdec->p_fifo, "cannot create vout" );
+ p_vdec->p_fifo->b_error = VLC_TRUE; /* abort */
+ return;
}
/* Send decoded frame to vout */
static void EndThread( videodec_thread_t *p_vdec )
{
int i;
-
+
if( !p_vdec )
{
return;
{
FREE( p_vdec->p_context->p_pix[i] );
}
-
+
free( p_vdec->p_context );
-
- if( p_vdec->p_vout != NULL )
- {
- /* We are about to die. Reattach video output to p_vlc. */
- vlc_object_detach( p_vdec->p_vout );
- vlc_object_attach( p_vdec->p_vout, p_vdec->p_fifo->p_vlc );
- }
-
+
+ /* Get rid of our video output if we have one. */
+ vout_Request( p_vdec->p_fifo, p_vdec->p_vout, 0, 0, 0, 0 );
+
free( p_vdec );
}
* dv.c: a decoder for DV video
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: dv.c,v 1.2 2002/11/06 09:26:25 sam Exp $
+ * $Id: dv.c,v 1.3 2002/11/28 17:34:59 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 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
static int RunDecoder ( decoder_fifo_t * );
static int OpenDecoder ( vlc_object_t * );
-static u32 GetFourCC ( dv_sample_t );
+static vlc_fourcc_t GetFourCC ( dv_sample_t );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static int RunDecoder ( decoder_fifo_t *p_fifo )
{
- u8 *p_buffer;
+ uint8_t *p_buffer;
pes_packet_t *p_pes = NULL;
int i_data = 120000;
int i_aspect;
bit_stream_t bit_stream;
dv_decoder_t * p_decoder;
vout_thread_t * p_vout;
-
+
p_buffer = malloc( i_data );
if( !p_buffer )
{
{
p_buffer = realloc( p_buffer, p_decoder->frame_size );
}
-
+
/* Don't trust the sucker */
//p_decoder->quality = p_decoder->video->quality;
p_decoder->quality = DV_QUALITY_BEST;
/* Spawn a video output if there is none. First we look amongst our
* children, then we look for any other vout that might be available */
- p_vout = vlc_object_find( p_fifo, VLC_OBJECT_VOUT, FIND_CHILD );
- if( !p_vout )
- {
- p_vout = vlc_object_find( p_fifo, VLC_OBJECT_VOUT, FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( p_vout->render.i_width != p_decoder->width
- || p_vout->render.i_height != p_decoder->height
- || p_vout->render.i_chroma != GetFourCC( p_decoder->sampling )
- || p_vout->render.i_aspect != i_aspect )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_fifo );
- vlc_object_release( p_vout );
- }
- }
-
- if( !p_vout )
- {
- msg_Dbg( p_fifo, "no vout present, spawning one" );
-
- p_vout = vout_CreateThread( p_fifo,
- p_decoder->width, p_decoder->height,
- GetFourCC( p_decoder->sampling ),
- i_aspect );
- }
+ p_vout = vout_Request( p_fifo, NULL,
+ p_decoder->width, p_decoder->height,
+ GetFourCC( p_decoder->sampling ), i_aspect );
/* Main loop */
while( !p_fifo->b_die && !p_fifo->b_error )
|| dv_frame_changed( p_decoder ) ) )
{
picture_t *p_pic;
- u8 *pixels[3];
+ uint8_t *pixels[3];
int pitches[3], i;
while( !(p_pic = vout_CreatePicture( p_vout, 0, 0, 0 ) ) )
if( p_fifo->b_die || p_fifo->b_error )
{
break;
- }
+ }
msleep( VOUT_OUTMEM_SLEEP );
}
i_data = 0;
}
- if( p_vout )
- {
- vlc_object_detach( p_vout );
- vout_DestroyThread( p_vout );
- }
+ vout_Request( p_fifo, p_vout, 0, 0, 0, 0 );
}
if( p_pes )
return 0;
}
-static u32 GetFourCC( dv_sample_t x )
+static vlc_fourcc_t GetFourCC( dv_sample_t x )
{
switch( x )
{
* video.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.7 2002/11/28 16:44:05 fenrir Exp $
+ * $Id: video.c,v 1.8 2002/11/28 17:35:00 sam Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
}
}
-/* Check if we have a Vout with good parameters */
-static int ffmpeg_CheckVout( vout_thread_t *p_vout,
- int i_width,
- int i_height,
- int i_chroma )
-{
- if( !p_vout )
- {
- return( 0 );
- }
- if( !i_chroma )
- {
- /* we will try to make conversion */
- i_chroma = VLC_FOURCC('I','4','2','0');
- }
-
- if( ( p_vout->render.i_width != i_width )||
- ( p_vout->render.i_height != i_height )||
- ( p_vout->render.i_chroma != i_chroma ) )
- {
- return( 0 );
- }
- else
- {
- return( 1 );
- }
-}
-
/* Return a Vout */
static vout_thread_t *ffmpeg_CreateVout( vdec_thread_t *p_vdec,
AVCodecContext *p_context )
msg_Warn( p_vdec->p_fifo, "Internal chroma conversion (FIXME)");
/* It's mainly for I410 -> I420 conversion that I've made,
it's buggy and very slow */
- }
+ }
#if LIBAVCODEC_BUILD >= 4640
i_aspect = (int) ( VOUT_ASPECT_FACTOR * p_vdec->p_context->aspect_ratio );
#endif
/* Spawn a video output if there is none. First we look for our children,
* then we look for any other vout that might be available. */
- p_vout = vlc_object_find( p_vdec->p_fifo, VLC_OBJECT_VOUT,
- FIND_CHILD );
- if( !p_vout )
- {
- p_vout = vlc_object_find( p_vdec->p_fifo, VLC_OBJECT_VOUT,
- FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( !ffmpeg_CheckVout( p_vout, i_width, i_height, i_chroma ) )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_vdec->p_fifo );
- vlc_object_release( p_vout );
- }
- }
-
- if( p_vout == NULL )
- {
- msg_Dbg( p_vdec->p_fifo, "no vout present, spawning one" );
-
- p_vout = vout_CreateThread( p_vdec->p_fifo,
- i_width, i_height,
- i_chroma, i_aspect );
- }
+ p_vout = vout_Request( p_vdec->p_fifo, NULL,
+ i_width, i_height, i_chroma, i_aspect );
- return( p_vout );
+ return p_vout;
}
/* FIXME FIXME FIXME this is a big shit
if( !p_vdec->b_direct_rendering )
{
- /* Check our vout */
- if( !ffmpeg_CheckVout( p_vdec->p_vout,
- p_vdec->p_context->width,
- p_vdec->p_context->height,
- ffmpeg_PixFmtToChroma(p_vdec->p_context->pix_fmt)) )
+ p_vdec->p_vout = ffmpeg_CreateVout( p_vdec, p_vdec->p_context );
+ if( !p_vdec->p_vout )
{
- p_vdec->p_vout = ffmpeg_CreateVout( p_vdec, p_vdec->p_context );
- if( !p_vdec->p_vout )
- {
- msg_Err( p_vdec->p_fifo, "cannot create vout" );
- p_vdec->p_fifo->b_error = 1; /* abort */
- return;
- }
+ msg_Err( p_vdec->p_fifo, "cannot create vout" );
+ p_vdec->p_fifo->b_error = 1; /* abort */
+ return;
}
/* Get a new picture */
p_vdec->p_pp = NULL;
}
- if( p_vdec->p_vout != NULL )
- {
- /* We are about to die. Reattach video output to p_vlc. */
- vlc_object_detach( p_vdec->p_vout );
- vlc_object_attach( p_vdec->p_vout, p_vdec->p_fifo->p_vlc );
- }
+ /* We are about to die. Reattach video output to p_vlc. */
+ vout_Request( p_vdec->p_fifo, p_vdec->p_vout, 0, 0, 0, 0 );
}
/*****************************************************************************
picture_t *p_pic;
/* Check our vout */
- if( !ffmpeg_CheckVout( p_vdec->p_vout,
- p_vdec->p_context->width,
- p_vdec->p_context->height,
- ffmpeg_PixFmtToChroma(p_vdec->p_context->pix_fmt)) )
+ p_vdec->p_vout = ffmpeg_CreateVout( p_vdec, p_vdec->p_context );
+ if( !p_vdec->p_vout )
{
- p_vdec->p_vout = ffmpeg_CreateVout( p_vdec, p_vdec->p_context );
- if( !p_vdec->p_vout )
- {
- msg_Err( p_vdec->p_fifo, "cannot create vout" );
- p_vdec->p_fifo->b_error = 1; /* abort */
- return -1;
- }
+ msg_Err( p_vdec->p_fifo, "cannot create vout" );
+ p_vdec->p_fifo->b_error = 1; /* abort */
+ return -1;
}
/* Get a new picture */
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: headers.c,v 1.5 2002/11/20 13:37:35 sam Exp $
+ * $Id: headers.c,v 1.6 2002/11/28 17:35:00 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
int i_aspect;
- vout_thread_t *p_vout;
-
p_vpar->sequence.i_width = GetBits( &p_vpar->bit_stream, 12 );
p_vpar->sequence.i_height = GetBits( &p_vpar->bit_stream, 12 );
i_aspect = GetBits( &p_vpar->bit_stream, 4 );
/* Spawn a video output if there is none. First we look for our children,
* then we look for any other vout that might be available. */
- p_vout = vlc_object_find( p_vpar->p_fifo, VLC_OBJECT_VOUT, FIND_CHILD );
- if( p_vout == NULL )
- {
- p_vout = vlc_object_find( p_vpar->p_fifo, VLC_OBJECT_VOUT,
- FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( p_vout->render.i_width != p_vpar->sequence.i_width
- || p_vout->render.i_height != p_vpar->sequence.i_height
- || p_vout->render.i_chroma != ChromaToFourCC( p_vpar->sequence.i_chroma_format )
- || p_vout->render.i_aspect != p_vpar->sequence.i_aspect )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- if( p_vout != p_vpar->p_vout )
- {
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_vpar->p_fifo );
- }
- vlc_object_release( p_vout );
- }
- }
-
- p_vpar->p_vout = p_vout;
+ p_vpar->p_vout =
+ vout_Request( p_vpar->p_fifo, p_vpar->p_vout,
+ p_vpar->sequence.i_width, p_vpar->sequence.i_height,
+ ChromaToFourCC( p_vpar->sequence.i_chroma_format ),
+ p_vpar->sequence.i_aspect );
if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error )
{
if( p_vpar->p_vout == NULL )
{
- msg_Dbg( p_vpar->p_fifo, "no vout present, spawning one" );
-
- p_vpar->p_vout = vout_CreateThread( p_vpar->p_fifo,
- p_vpar->sequence.i_width,
- p_vpar->sequence.i_height,
- ChromaToFourCC( p_vpar->sequence.i_chroma_format ),
- p_vpar->sequence.i_aspect );
-
- /* Everything failed */
- if( p_vpar->p_vout == NULL )
- {
- msg_Err( p_vpar->p_fifo, "cannot open vout, aborting" );
- p_vpar->p_fifo->b_error = 1;
- return;
- }
+ msg_Err( p_vpar->p_fifo, "cannot open vout, aborting" );
+ p_vpar->p_fifo->b_error = 1;
+ return;
}
}
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: parser.c,v 1.7 2002/11/20 13:37:35 sam Exp $
+ * $Id: parser.c,v 1.8 2002/11/28 17:35:00 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
times( &cpu_usage );
#endif
- if( p_vpar->p_vout != NULL )
+ /* Release used video buffers. */
+ if( p_vpar->sequence.p_forward != NULL )
{
- /* Release used video buffers. */
- if( p_vpar->sequence.p_forward != NULL )
- {
- vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
- }
- if( p_vpar->sequence.p_backward != NULL )
- {
- vout_DatePicture( p_vpar->p_vout, p_vpar->sequence.p_backward,
- vpar_SynchroDate( p_vpar ) );
- vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_backward );
- }
- if( p_vpar->picture.p_picture != NULL )
- {
- vout_DestroyPicture( p_vpar->p_vout, p_vpar->picture.p_picture );
- }
-
- /* We are about to die. Reattach video output to p_vlc. */
- vlc_object_detach( p_vpar->p_vout );
- vlc_object_attach( p_vpar->p_vout, p_vpar->p_fifo->p_vlc );
+ vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
+ }
+ if( p_vpar->sequence.p_backward != NULL )
+ {
+ vout_DatePicture( p_vpar->p_vout, p_vpar->sequence.p_backward,
+ vpar_SynchroDate( p_vpar ) );
+ vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_backward );
}
+ if( p_vpar->picture.p_picture != NULL )
+ {
+ vout_DestroyPicture( p_vpar->p_vout, p_vpar->picture.p_picture );
+ }
+
+ vout_Request( p_vpar->p_fifo, p_vpar->p_vout, 0, 0, 0, 0 );
msg_Dbg( p_vpar->p_fifo, "%d loops among %d sequence(s)",
p_vpar->c_loops, p_vpar->c_sequences );
* tarkin.c: tarkin decoder module making use of libtarkin.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: tarkin.c,v 1.2 2002/11/20 14:09:57 gbazin Exp $
+ * $Id: tarkin.c,v 1.3 2002/11/28 17:34:59 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
static int GetOggPacket ( dec_thread_t *, ogg_packet *, mtime_t * );
static void tarkin_CopyPicture( dec_thread_t *, picture_t *, uint8_t * );
-static vout_thread_t *tarkin_SpawnVout( dec_thread_t *, int, int, int, int );
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
memset( p_dec, 0, sizeof(dec_thread_t) );
p_dec->p_fifo = p_fifo;
p_dec->p_pes = NULL;
+ p_dec->p_vout = NULL;
/* Take care of the initial Tarkin header */
p_dec->tarkin_stream = tarkin_stream_new();
break;
}
i_aspect = VOUT_ASPECT_FACTOR * i_width / i_height;
- p_dec->p_vout = tarkin_SpawnVout( p_dec, i_width, i_height,
- i_aspect, i_chroma );
+ p_dec->p_vout = vout_Request( p_dec->p_fifo, p_dec->p_vout,
+ i_width, i_height, i_aspect, i_chroma );
/* Get a new picture */
while( !(p_pic = vout_CreatePicture( p_dec->p_vout, 0, 0, 0 ) ) )
if( p_dec->p_pes )
input_DeletePES( p_dec->p_fifo->p_packets_mgt, p_dec->p_pes );
- if( p_dec->p_vout )
- {
- vlc_object_detach( p_dec->p_vout );
- vout_DestroyThread( p_dec->p_vout );
- }
+ vout_Request( p_dec, p_dec->p_vout, 0, 0, 0, 0 );
if( p_dec->tarkin_stream )
tarkin_stream_destroy( p_dec->tarkin_stream );
}
}
-/*****************************************************************************
- * tarkin_SpawnVout: creates a new video output
- *****************************************************************************/
-static vout_thread_t *tarkin_SpawnVout( dec_thread_t *p_dec,
- int i_width,
- int i_height,
- int i_aspect,
- int i_chroma )
-{
- vout_thread_t *p_vout;
-
- if( !i_width || !i_height )
- return NULL;
-
- if( !i_chroma )
- return NULL;
-
- /* Spawn a video output if there is none. First we look for our children,
- * then we look for any other vout that might be available. */
- p_vout = vlc_object_find( p_dec->p_fifo, VLC_OBJECT_VOUT,
- FIND_CHILD );
- if( !p_vout )
- {
- p_vout = vlc_object_find( p_dec->p_fifo, VLC_OBJECT_VOUT,
- FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( p_vout->render.i_width != i_width
- || p_vout->render.i_height != i_height
- || p_vout->render.i_chroma != i_chroma
- || p_vout->render.i_aspect != i_aspect )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_dec->p_fifo );
- vlc_object_release( p_vout );
- }
- }
-
- if( p_vout == NULL )
- {
- msg_Dbg( p_dec->p_fifo, "no vout present, spawning one" );
-
- p_vout = vout_CreateThread( p_dec->p_fifo,
- i_width, i_height,
- i_chroma, i_aspect );
- }
-
- return( p_vout );
-}
-
/*****************************************************************************
* tarkin_CopyPicture: copy a picture from tarkin internal buffers to a
* picture_t structure.
* theora.c: theora decoder module making use of libtheora.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: theora.c,v 1.1 2002/11/20 14:09:57 gbazin Exp $
+ * $Id: theora.c,v 1.2 2002/11/28 17:34:59 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
static int GetOggPacket ( dec_thread_t *, ogg_packet *, mtime_t * );
static void theora_CopyPicture( dec_thread_t *, picture_t *, yuv_buffer * );
-static vout_thread_t *theora_SpawnVout( dec_thread_t *, int, int, int, int );
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
memset( p_dec, 0, sizeof(dec_thread_t) );
p_dec->p_fifo = p_fifo;
p_dec->p_pes = NULL;
+ p_dec->p_vout = NULL;
/* Take care of the initial Theora header */
if( GetOggPacket( p_dec, &oggpacket, &i_pts ) != VLC_SUCCESS )
i_chroma = VLC_FOURCC('Y','V','1','2');
- p_dec->p_vout = theora_SpawnVout( p_dec, p_dec->ti.width, p_dec->ti.height,
- i_aspect, i_chroma );
+ p_dec->p_vout = vout_Request( p_dec->p_fifo, p_dec->p_vout,
+ p_dec->ti.width, p_dec->ti.height,
+ i_aspect, i_chroma );
/* theora decoder thread's main loop */
while( (!p_dec->p_fifo->b_die) && (!p_dec->p_fifo->b_error) )
if( p_dec->p_pes )
input_DeletePES( p_dec->p_fifo->p_packets_mgt, p_dec->p_pes );
- if( p_dec->p_vout )
- {
- vlc_object_detach( p_dec->p_vout );
- vout_DestroyThread( p_dec->p_vout );
- }
+ vout_Request( p_dec->p_fifo, p_dec->p_vout, 0, 0, 0, 0 );
free( p_dec );
}
}
-/*****************************************************************************
- * theora_SpawnVout: creates a new video output
- *****************************************************************************/
-static vout_thread_t *theora_SpawnVout( dec_thread_t *p_dec,
- int i_width,
- int i_height,
- int i_aspect,
- int i_chroma )
-{
- vout_thread_t *p_vout;
-
- if( !i_width || !i_height )
- return NULL;
-
- if( !i_chroma )
- return NULL;
-
- /* Spawn a video output if there is none. First we look for our children,
- * then we look for any other vout that might be available. */
- p_vout = vlc_object_find( p_dec->p_fifo, VLC_OBJECT_VOUT,
- FIND_CHILD );
- if( !p_vout )
- {
- p_vout = vlc_object_find( p_dec->p_fifo, VLC_OBJECT_VOUT,
- FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( p_vout->render.i_width != i_width
- || p_vout->render.i_height != i_height
- || p_vout->render.i_chroma != i_chroma
- || p_vout->render.i_aspect != i_aspect )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_dec->p_fifo );
- vlc_object_release( p_vout );
- }
- }
-
- if( p_vout == NULL )
- {
- msg_Dbg( p_dec->p_fifo, "no vout present, spawning one" );
-
- p_vout = vout_CreateThread( p_dec->p_fifo,
- i_width, i_height,
- i_chroma, i_aspect );
- }
-
- return( p_vout );
-}
-
/*****************************************************************************
* theora_CopyPicture: copy a picture from theora internal buffers to a
* picture_t structure.
* xvid.c: a decoder for libxvidcore, the Xvid video codec
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: xvid.c,v 1.2 2002/11/06 09:26:25 sam Exp $
+ * $Id: xvid.c,v 1.3 2002/11/28 17:34:59 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 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
set_description( _("Xvid video decoder") );
set_capability( "decoder", 50 );
set_callbacks( OpenDecoder, NULL );
- add_bool( "xvid-direct-render", 0, NULL, "direct rendering",
+ add_bool( "xvid-direct-render", 0, NULL, "direct rendering",
"Use libxvidcore's direct rendering feature." );
vlc_module_end();
/* Spawn a video output if there is none. First we look amongst our
* children, then we look for any other vout that might be available */
- p_vout = vlc_object_find( p_fifo, VLC_OBJECT_VOUT, FIND_CHILD );
- if( !p_vout )
- {
- p_vout = vlc_object_find( p_fifo, VLC_OBJECT_VOUT, FIND_ANYWHERE );
- }
-
- if( p_vout )
- {
- if( p_vout->render.i_width != i_width
- || p_vout->render.i_height != i_height
- || p_vout->render.i_chroma != i_chroma
- || p_vout->render.i_aspect != i_aspect )
- {
- /* We are not interested in this format, close this vout */
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
- p_vout = NULL;
- }
- else
- {
- /* This video output is cool! Hijack it. */
- vlc_object_detach( p_vout );
- vlc_object_attach( p_vout, p_fifo );
- vlc_object_release( p_vout );
- }
- }
+ p_vout = vout_Request( p_fifo, NULL,
+ i_width, i_height, i_chroma, i_aspect );
if( !p_vout )
{
- msg_Dbg( p_fifo, "no vout present, spawning one" );
-
- p_vout = vout_CreateThread( p_fifo,
- i_width, i_height,
- i_chroma, i_aspect );
- if( !p_vout )
- {
- msg_Err( p_fifo, "could not spawn vout" );
- p_fifo->b_error = VLC_TRUE;
- xvid_decore( p_xvid, XVID_DEC_DESTROY, NULL, NULL );
- free( p_buffer );
- CloseBitstream( &bit_stream );
- DecoderError( p_fifo );
- return VLC_EGENERIC;
- }
+ msg_Err( p_fifo, "could not spawn vout" );
+ p_fifo->b_error = VLC_TRUE;
+ xvid_decore( p_xvid, XVID_DEC_DESTROY, NULL, NULL );
+ free( p_buffer );
+ CloseBitstream( &bit_stream );
+ DecoderError( p_fifo );
+ return VLC_EGENERIC;
}
/* Main loop */
}
/* Clean up everything */
- vlc_object_detach( p_vout );
- vout_DestroyThread( p_vout );
+ vout_Request( p_fifo, p_vout, 0, 0, 0, 0 );
xvid_decore( p_xvid, XVID_DEC_DESTROY, NULL, NULL );
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: intf.m,v 1.4 2002/11/05 03:57:16 jlj Exp $
+ * $Id: intf.m,v 1.5 2002/11/28 17:35:01 sam Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
{
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
+ vout_Destroy( p_vout );
}
if( o_prefs != nil )
* adjust.c : Contrast/Hue/Saturation/Brightness video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: adjust.c,v 1.1 2002/11/23 00:11:17 garf Exp $
+ * $Id: adjust.c,v 1.2 2002/11/28 17:35:00 sam Exp $
*
* Authors: Simon Latapie <garf@via.ecp.fr>, Samuel Hocevar <sam@zoy.org>
*
/* Try to open the real video output */
msg_Dbg( p_vout, "spawning the real video output" );
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
- p_vout->render.i_width, p_vout->render.i_height,
- p_vout->render.i_chroma, p_vout->render.i_aspect );
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
+ p_vout->render.i_width, p_vout->render.i_height,
+ p_vout->render.i_chroma, p_vout->render.i_aspect );
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
* clone.c : Clone video plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: clone.c,v 1.2 2002/11/23 02:40:30 sam Exp $
+ * $Id: clone.c,v 1.3 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
for( i_vout = 0; i_vout < p_vout->p_sys->i_clones; i_vout++ )
{
- p_vout->p_sys->pp_vout[ i_vout ] =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->pp_vout[ i_vout ] = vout_Create( p_vout,
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
if( p_vout->p_sys->pp_vout[ i_vout ] == NULL )
while( p_vout->p_sys->i_clones )
{
--p_vout->p_sys->i_clones;
- vout_DestroyThread( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] );
+ vout_Destroy( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] );
}
}
* crop.c : Crop video plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: crop.c,v 1.3 2002/11/23 02:40:30 sam Exp $
+ * $Id: crop.c,v 1.4 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* p_vout->p_sys->i_width / p_vout->output.i_width;
/* Try to open the real video output */
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
p_vout->p_sys->i_width, p_vout->p_sys->i_height,
p_vout->render.i_chroma, p_vout->p_sys->i_aspect );
if( p_vout->p_sys->p_vout == NULL )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
return 0;
}
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
p_vout->p_sys->i_width, p_vout->p_sys->i_height,
p_vout->render.i_chroma, p_vout->p_sys->i_aspect );
if( p_vout->p_sys->p_vout == NULL )
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: deinterlace.c,v 1.4 2002/10/16 11:35:52 sam Exp $
+ * $Id: deinterlace.c,v 1.5 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
case DEINTERLACE_MEAN:
case DEINTERLACE_DISCARD:
p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ vout_Create( p_vout,
p_vout->output.i_width, p_vout->output.i_height / 2,
p_vout->output.i_chroma, p_vout->output.i_aspect );
break;
case DEINTERLACE_BLEND:
case DEINTERLACE_LINEAR:
p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ vout_Create( p_vout,
p_vout->output.i_width, p_vout->output.i_height,
p_vout->output.i_chroma, p_vout->output.i_aspect );
break;
case VLC_FOURCC('I','4','2','2'):
p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ vout_Create( p_vout,
p_vout->output.i_width, p_vout->output.i_height,
VLC_FOURCC('I','4','2','0'), p_vout->output.i_aspect );
break;
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
* distort.c : Misc video effects plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: distort.c,v 1.3 2002/11/23 02:40:30 sam Exp $
+ * $Id: distort.c,v 1.4 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/* Try to open the real video output */
msg_Dbg( p_vout, "spawning the real video output" );
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
return( 0 );
}
-
+
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
p_vout->p_sys->f_angle = 0.0;
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
* invert.c : Invert video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: invert.c,v 1.2 2002/11/23 02:40:30 sam Exp $
+ * $Id: invert.c,v 1.3 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/* Try to open the real video output */
msg_Dbg( p_vout, "spawning the real video output" );
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
* motion_blur.c : motion blur filter for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: motionblur.c,v 1.3 2002/11/23 02:40:30 sam Exp $
+ * $Id: motionblur.c,v 1.4 2002/11/28 17:35:00 sam Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
case VLC_FOURCC('I','4','2','0'):
case VLC_FOURCC('I','Y','U','V'):
case VLC_FOURCC('Y','V','1','2'):
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
- p_vout->output.i_width, p_vout->output.i_height,
- p_vout->output.i_chroma, p_vout->output.i_aspect );
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
+ p_vout->output.i_width, p_vout->output.i_height,
+ p_vout->output.i_chroma, p_vout->output.i_aspect );
break;
default:
break;
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
* transform.c : transform image plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: transform.c,v 1.3 2002/11/23 02:40:30 sam Exp $
+ * $Id: transform.c,v 1.4 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
if( p_vout->p_sys->b_rotation )
{
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
p_vout->render.i_height, p_vout->render.i_width,
p_vout->render.i_chroma,
(u64)VOUT_ASPECT_FACTOR * (u64)VOUT_ASPECT_FACTOR
}
else
{
- p_vout->p_sys->p_vout =
- vout_CreateThread( p_vout,
+ p_vout->p_sys->p_vout = vout_Create( p_vout,
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
}
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_DestroyThread( p_vout->p_sys->p_vout );
+ vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
}
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: wall.c,v 1.3 2002/11/23 02:40:30 sam Exp $
+ * $Id: wall.c,v 1.4 2002/11/28 17:35:00 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
}
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout =
- vout_CreateThread( p_vout, i_width, i_height,
- p_vout->render.i_chroma,
- p_vout->render.i_aspect
- * p_vout->render.i_height / i_height
- * i_width / p_vout->render.i_width );
+ vout_Create( p_vout, i_width, i_height,
+ p_vout->render.i_chroma,
+ p_vout->render.i_aspect
+ * p_vout->render.i_height / i_height
+ * i_width / p_vout->render.i_width );
if( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout == NULL )
{
msg_Err( p_vout, "failed to get %ix%i vout threads",
--p_vout->p_sys->i_vout;
if( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].b_active )
{
- vout_DestroyThread(
+ vout_Destroy(
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
}
}
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.c,v 1.47 2002/11/14 15:07:49 sigmunau Exp $
+ * $Id: libvlc.c,v 1.48 2002/11/28 17:35:00 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
{
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
- vout_DestroyThread( p_vout );
+ vout_Destroy( p_vout );
}
/*
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.201 2002/11/28 14:34:39 sam Exp $
+ * $Id: video_output.c,v 1.202 2002/11/28 17:35:00 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
static void InitWindowSize ( vout_thread_t *, int *, int * );
/*****************************************************************************
- * vout_CreateThread: creates a new video output thread
+ * vout_Request: find a video output thread, create one, or destroy one.
+ *****************************************************************************
+ * This function looks for a video output thread matching the current
+ * properties. If not found, it spawns a new one.
+ *****************************************************************************/
+vout_thread_t * __vout_Request ( vlc_object_t *p_this, vout_thread_t *p_vout,
+ unsigned int i_width, unsigned int i_height,
+ vlc_fourcc_t i_chroma, unsigned int i_aspect )
+{
+ if( !i_width || !i_height || !i_chroma )
+ {
+ /* Reattach video output to p_vlc before bailing out */
+ if( p_vout )
+ {
+ vlc_object_detach( p_vout );
+ vlc_object_attach( p_vout, p_this->p_vlc );
+ }
+
+ return NULL;
+ }
+
+ /* If a video output was provided, lock it, otherwise look for one. */
+ if( p_vout )
+ {
+ vlc_object_yield( p_vout );
+ }
+ else
+ {
+ p_vout = vlc_object_find( p_this, VLC_OBJECT_VOUT, FIND_CHILD );
+
+ if( !p_vout )
+ {
+ p_vout = vlc_object_find( p_this, VLC_OBJECT_VOUT, FIND_ANYWHERE );
+ }
+ }
+
+ /* If we now have a video output, check it has the right properties */
+ if( p_vout )
+ {
+ if( ( p_vout->render.i_width != i_width ) ||
+ ( p_vout->render.i_height != i_height ) ||
+ ( p_vout->render.i_chroma != i_chroma ) )
+ {
+ /* We are not interested in this format, close this vout */
+ vlc_object_detach( p_vout );
+ vlc_object_release( p_vout );
+ vout_Destroy( p_vout );
+ p_vout = NULL;
+ }
+ else
+ {
+ /* This video output is cool! Hijack it. */
+ vlc_object_detach( p_vout );
+ vlc_object_attach( p_vout, p_this );
+ vlc_object_release( p_vout );
+ }
+ }
+
+ if( !p_vout )
+ {
+ msg_Dbg( p_this, "no usable vout present, spawning one" );
+
+ p_vout = vout_Create( p_this, i_width, i_height, i_chroma, i_aspect );
+ }
+
+ return p_vout;
+}
+
+/*****************************************************************************
+ * vout_Create: creates a new video output thread
*****************************************************************************
* This function creates a new video output thread, and returns a pointer
* to its description. On error, it returns NULL.
*****************************************************************************/
-vout_thread_t * __vout_CreateThread ( vlc_object_t *p_parent,
- unsigned int i_width,
- unsigned int i_height,
- vlc_fourcc_t i_chroma,
- unsigned int i_aspect )
+vout_thread_t * __vout_Create( vlc_object_t *p_parent,
+ unsigned int i_width, unsigned int i_height,
+ vlc_fourcc_t i_chroma, unsigned int i_aspect )
{
vout_thread_t * p_vout; /* thread descriptor */
int i_index; /* loop variable */
}
/*****************************************************************************
- * vout_DestroyThread: destroys a previously created thread
+ * vout_Destroy: destroys a previously created video output
*****************************************************************************
* Destroy a terminated thread.
* The function will request a destruction of the specified thread. If pi_error
* is NULL, it will return once the thread is destroyed. Else, it will be
* update using one of the THREAD_* constants.
*****************************************************************************/
-void vout_DestroyThread( vout_thread_t *p_vout )
+void vout_Destroy( vout_thread_t *p_vout )
{
/* Request thread destruction */
- p_vout->b_die = 1;
+ p_vout->b_die = VLC_TRUE;
vlc_thread_join( p_vout );
/* Free structure */
msg_Dbg( p_vout, "got %i direct buffer(s)", I_OUTPUTPICTURES );
+#if 0
if( !p_vout->psz_filter_chain )
{
char *psz_aspect = config_GetPsz( p_vout, "pixel-ratio" );
}
}
}
+#endif
i_pgcd = ReduceHeight( p_vout->render.i_aspect );
msg_Dbg( p_vout,
* vout_pictures.h : picture management definitions
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: vout_pictures.h,v 1.2 2002/07/31 20:56:53 sam Exp $
+ * $Id: vout_pictures.h,v 1.3 2002/11/28 17:35:01 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/* Packed RGB for 16, 24, 32bpp */
#define FOURCC_BI_BITFIELDS 0x00000003
-/* Packed RGB 15bpp, 0x1f, 0x7e0, 0xf800 */
+/* Packed RGB 15bpp, usually 0x7c00, 0x03e0, 0x001f */
#define FOURCC_RV15 VLC_FOURCC('R','V','1','5')
-/* Packed RGB 16bpp, 0x1f, 0x3e0, 0x7c00 */
+/* Packed RGB 16bpp, usually 0xf800, 0x07e0, 0x001f */
#define FOURCC_RV16 VLC_FOURCC('R','V','1','6')
-/* Packed RGB 24bpp, 0xff, 0xff00, 0xff0000 */
+/* Packed RGB 24bpp, usually 0x00ff0000, 0x0000ff00, 0x000000ff */
#define FOURCC_RV24 VLC_FOURCC('R','V','2','4')
-/* Packed RGB 32bpp, 0xff, 0xff00, 0xff0000 */
+/* Packed RGB 32bpp, usually 0x00ff0000, 0x0000ff00, 0x000000ff */
#define FOURCC_RV32 VLC_FOURCC('R','V','3','2')
/* Planar YUV 4:2:0, Y:U:V */