Commit 6e8f9504 authored by Sam Hocevar's avatar Sam Hocevar

* ./src/misc/objects.c: two big changes in the object API: now objects can

    only have one parent, because I don't want to deal with cycles, and each
    created object is indexed in a global array. This feature is unused yet,
    but it will speed up vlc_object_find(FIND_ANYWHERE).
  * ./debian/rules: activated the faad codec.
  * ./doc/fortunes.txt: new fortune cookies.
  * ./modules/codec/mpeg_video/headers.c: reduced the use of attach/detach.
  * ./modules/audio_output/oss.c: fixed two compilation warnings.
parent 2e448ef8
...@@ -7108,7 +7108,7 @@ echo "configure:7097: checking for libfaad.a in ${with_faad_tree}" >&5 ...@@ -7108,7 +7108,7 @@ echo "configure:7097: checking for libfaad.a in ${with_faad_tree}" >&5
faad_CFLAGS="${faad_CFLAGS} -I${real_faad_tree}/include" faad_CFLAGS="${faad_CFLAGS} -I${real_faad_tree}/include"
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
{ echo "configure: error: cannot find ${real_faad_tree}/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}" 1>&2; exit 1; } { echo "configure: error: cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}" 1>&2; exit 1; }
fi fi
else else
CFLAGS="${save_CFLAGS} ${faad_CFLAGS}" CFLAGS="${save_CFLAGS} ${faad_CFLAGS}"
......
...@@ -1095,7 +1095,7 @@ then ...@@ -1095,7 +1095,7 @@ then
else else
dnl The given libfaad wasn't built dnl The given libfaad wasn't built
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_faad_tree}/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}]) AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
fi fi
else else
CFLAGS="${save_CFLAGS} ${faad_CFLAGS}" CFLAGS="${save_CFLAGS} ${faad_CFLAGS}"
......
...@@ -10,7 +10,8 @@ export DH_COMPAT=3 ...@@ -10,7 +10,8 @@ export DH_COMPAT=3
# Compilation options # Compilation options
export FFMPEG_VERSION=cvs export FFMPEG_VERSION=cvs
export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-ffmpeg --with-ffmpeg-tree=ffmpeg-$(FFMPEG_VERSION) --enable-mp4 --enable-dvb --enable-dv" export FAAD_VERSION=cvs
export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-ffmpeg --with-ffmpeg-tree=ffmpeg-$(FFMPEG_VERSION) --enable-mp4 --enable-dvb --enable-dv --enable-faad --with-faad-tree=faad-$(FAAD_VERSION)"
# Remove --without-dvdcss here in non-totalitarian countries # Remove --without-dvdcss here in non-totalitarian countries
export DVDCSS_FLAGS="--enable-dvd --without-dvdcss" export DVDCSS_FLAGS="--enable-dvd --without-dvdcss"
......
...@@ -197,3 +197,20 @@ the Boston strangler is to the woman home alone. ...@@ -197,3 +197,20 @@ the Boston strangler is to the woman home alone.
-- #videolan -- #videolan
% %
<ali> by the way i've never learnt the way to make figlets lool ...
<lool> /exec -o figlet -f small 'ali is so stupid !'
<sam> I'm not absolutely positive it was a good idea to teach her
<sam> it's like handing a rocket launcher to a 6yr old ...
-- #videolan
%
<|sF|Vengance|> do u have any videos of porn u can send me?
-- #videolan
%
-+- Ourumov [www-data@brahma.via.ecp.fr] has joined #videolan
<Ourumov> hey anybody here know videolan ?
-*- SignOff: Ourumov (Client Quit)
-- #videolan
%
.TH LIBVLC 1 "8 August 2002" Version 0.5.0
.SH NAME
vlc-config - script to get information about the installed version of libvlc
.SH SYNOPSIS
.B vlc-config
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
.SH DESCRIPTION
.PP
\fIvlc-config\fP is a tool that is used to configure to determine
the compiler and linker flags that should be used to compile
and link programs that use \fIlibvlc\fP.
.
.SH OPTIONS
.l
\fIvlc-config\fP accepts the following options:
.TP 8
.B \-\-version
Print the currently installed version of \fIlibvlc\fP on the standard output.
.TP 8
.B \-\-libs
Print the linker flags that are necessary to link a \fIlibvlc\fP program.
.TP 8
.B \-\-cflags
Print the compiler flags that are necessary to compile a \fIlibvlc\fP program.
.TP 8
.B \-\-prefix=PREFIX
If specified, use PREFIX instead of the installation prefix that \fIlibvlc\fP
was built with when computing the output for the \-\-cflags and
\-\-libs options. This option is also used for the exec prefix
if \-\-exec\-prefix was not specified. This option must be specified
before any \-\-libs or \-\-cflags options.
.TP 8
.B \-\-exec\-prefix=PREFIX
If specified, use PREFIX instead of the installation exec prefix that
\fIlibvlc\fP was built with when computing the output for the \-\-cflags
and \-\-libs options. This option must be specified before any
\-\-libs or \-\-cflags options.
.SH SEE ALSO
.BR vlc (1),
.SH COPYRIGHT
Copyright \(co 2002 Owen Taylor, modified by Sam Hocevar
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Declaration and extern access to global program object. * Declaration and extern access to global program object.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: main.h,v 1.43 2002/08/09 16:39:08 sam Exp $ * $Id: main.h,v 1.44 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -58,21 +58,24 @@ struct vlc_t ...@@ -58,21 +58,24 @@ struct vlc_t
void* ( *pf_memset ) ( void *, int, size_t ); void* ( *pf_memset ) ( void *, int, size_t );
/* The module bank */ /* The module bank */
module_bank_t * p_module_bank; module_bank_t * p_module_bank;
/* The message bank */ /* The message bank */
msg_bank_t msg_bank; msg_bank_t msg_bank;
/* Shared data - these structures are accessed directly from p_vlc by /* Shared data - these structures are accessed directly from p_vlc by
* several modules */ * several modules */
intf_msg_t * p_msg; /* messages interface data */
input_channel_t * p_channel; /* channel library data */ input_channel_t * p_channel; /* channel library data */
/* Locks */ /* Locks */
vlc_mutex_t config_lock; /* lock for the config file */ vlc_mutex_t config_lock; /* lock for the config file */
vlc_mutex_t structure_lock; /* lock for the p_vlc tree */ vlc_mutex_t structure_lock; /* lock for the p_vlc tree */
/* Object structure data */
int i_unique; /* p_vlc occurence # */ int i_unique; /* p_vlc occurence # */
int i_counter; /* object counter */ int i_counter; /* object counter */
int i_objects; /* Attached objects count */
vlc_object_t ** pp_objects; /* Array of all objects */
/* Pointer to the big, evil global lock */ /* Pointer to the big, evil global lock */
vlc_mutex_t * p_global_lock; vlc_mutex_t * p_global_lock;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.17 2002/08/10 19:23:06 sam Exp $ * $Id: vlc_common.h,v 1.18 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -245,12 +245,12 @@ typedef struct iso639_lang_t iso639_lang_t; ...@@ -245,12 +245,12 @@ typedef struct iso639_lang_t iso639_lang_t;
volatile vlc_bool_t b_error; /* set by the object */ \ volatile vlc_bool_t b_error; /* set by the object */ \
volatile vlc_bool_t b_die; /* set by the outside */ \ volatile vlc_bool_t b_die; /* set by the outside */ \
volatile vlc_bool_t b_dead; /* set by the object */ \ volatile vlc_bool_t b_dead; /* set by the object */ \
volatile vlc_bool_t b_attached; /* set by the object */ \
\ \
vlc_t * p_vlc; /* root of all evil */ \ vlc_t * p_vlc; /* root of all evil */ \
\ \
volatile int i_refcount; \ volatile int i_refcount; /* usage count */ \
vlc_object_t ** pp_parents; /* our parents */ \ vlc_object_t * p_parent; /* our parent */ \
volatile int i_parents; \
vlc_object_t ** pp_children; /* our children */ \ vlc_object_t ** pp_children; /* our children */ \
volatile int i_children; \ volatile int i_children; \
\ \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc_objects.h: vlc_object_t definition. * vlc_objects.h: vlc_object_t definition.
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlc_objects.h,v 1.5 2002/07/31 20:56:50 sam Exp $ * $Id: vlc_objects.h,v 1.6 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -51,8 +51,7 @@ VLC_EXPORT( void, __vlc_object_destroy, ( vlc_object_t * ) ); ...@@ -51,8 +51,7 @@ VLC_EXPORT( void, __vlc_object_destroy, ( vlc_object_t * ) );
VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) ); VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) ); VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) ); VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_detach, ( vlc_object_t *, vlc_object_t * ) ); VLC_EXPORT( void, __vlc_object_detach, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_detach_all, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) ); VLC_EXPORT( void, __vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) );
#if 0 #if 0
//VLC_EXPORT( void, __vlc_object_setchild, ( vlc_object_t *, vlc_object_t * ) ); //VLC_EXPORT( void, __vlc_object_setchild, ( vlc_object_t *, vlc_object_t * ) );
...@@ -76,11 +75,8 @@ VLC_EXPORT( void, __vlc_dumpstructure, ( vlc_object_t * ) ); ...@@ -76,11 +75,8 @@ VLC_EXPORT( void, __vlc_dumpstructure, ( vlc_object_t * ) );
#define vlc_object_release(a) \ #define vlc_object_release(a) \
__vlc_object_release( VLC_OBJECT(a) ) __vlc_object_release( VLC_OBJECT(a) )
#define vlc_object_detach(a,b) \ #define vlc_object_detach(a) \
__vlc_object_detach( VLC_OBJECT(a), VLC_OBJECT(b) ) __vlc_object_detach( VLC_OBJECT(a) )
#define vlc_object_detach_all(a) \
__vlc_object_detach_all( VLC_OBJECT(a) )
#define vlc_object_attach(a,b) \ #define vlc_object_attach(a,b) \
__vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) ) __vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) )
......
...@@ -93,8 +93,7 @@ struct module_symbols_t ...@@ -93,8 +93,7 @@ struct module_symbols_t
void (* __vlc_dumpstructure_inner) ( vlc_object_t * ) ; void (* __vlc_dumpstructure_inner) ( vlc_object_t * ) ;
void (* __vlc_object_attach_inner) ( vlc_object_t *, vlc_object_t * ) ; void (* __vlc_object_attach_inner) ( vlc_object_t *, vlc_object_t * ) ;
void (* __vlc_object_destroy_inner) ( vlc_object_t * ) ; void (* __vlc_object_destroy_inner) ( vlc_object_t * ) ;
void (* __vlc_object_detach_all_inner) ( vlc_object_t * ) ; void (* __vlc_object_detach_inner) ( vlc_object_t * ) ;
void (* __vlc_object_detach_inner) ( vlc_object_t *, vlc_object_t * ) ;
void (* __vlc_object_release_inner) ( vlc_object_t * ) ; void (* __vlc_object_release_inner) ( vlc_object_t * ) ;
void (* __vlc_object_yield_inner) ( vlc_object_t * ) ; void (* __vlc_object_yield_inner) ( vlc_object_t * ) ;
void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ; void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ;
...@@ -191,7 +190,6 @@ struct module_symbols_t ...@@ -191,7 +190,6 @@ struct module_symbols_t
# define __vlc_object_create p_symbols->__vlc_object_create_inner # define __vlc_object_create p_symbols->__vlc_object_create_inner
# define __vlc_object_destroy p_symbols->__vlc_object_destroy_inner # define __vlc_object_destroy p_symbols->__vlc_object_destroy_inner
# define __vlc_object_detach p_symbols->__vlc_object_detach_inner # define __vlc_object_detach p_symbols->__vlc_object_detach_inner
# define __vlc_object_detach_all p_symbols->__vlc_object_detach_all_inner
# define __vlc_object_find p_symbols->__vlc_object_find_inner # define __vlc_object_find p_symbols->__vlc_object_find_inner
# define __vlc_object_release p_symbols->__vlc_object_release_inner # define __vlc_object_release p_symbols->__vlc_object_release_inner
# define __vlc_object_yield p_symbols->__vlc_object_yield_inner # define __vlc_object_yield p_symbols->__vlc_object_yield_inner
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demux.c: demux functions for dvdplay. * demux.c: demux functions for dvdplay.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: demux.c,v 1.2 2002/08/07 00:29:36 sam Exp $ * $Id: demux.c,v 1.3 2002/08/12 09:34:15 sam Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -132,7 +132,7 @@ void E_(EndDVD) ( vlc_object_t *p_this ) ...@@ -132,7 +132,7 @@ void E_(EndDVD) ( vlc_object_t *p_this )
if( p_intf != NULL ) if( p_intf != NULL )
{ {
intf_StopThread( p_intf ); intf_StopThread( p_intf );
vlc_object_detach_all( p_intf ); vlc_object_detach( p_intf );
vlc_object_release( p_intf ); vlc_object_release( p_intf );
intf_Destroy( p_intf ); intf_Destroy( p_intf );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc * oss.c : OSS /dev/dsp module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2002 VideoLAN * Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.6 2002/08/11 22:36:35 massiot Exp $ * $Id: oss.c,v 1.7 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -293,9 +293,8 @@ static int OSSThread( aout_instance_t * p_aout ) ...@@ -293,9 +293,8 @@ static int OSSThread( aout_instance_t * p_aout )
while ( !p_sys->b_die ) while ( !p_sys->b_die )
{ {
int i_bytes_per_sample;
aout_buffer_t * p_buffer; aout_buffer_t * p_buffer;
mtime_t next_date; mtime_t next_date = 0;
int i_tmp, i_size; int i_tmp, i_size;
byte_t * p_bytes; byte_t * p_bytes;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cinepak.c: cinepak video decoder * cinepak.c: cinepak video decoder
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: cinepak.c,v 1.2 2002/08/04 18:39:41 sam Exp $ * $Id: cinepak.c,v 1.3 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -300,7 +300,7 @@ static vout_thread_t *cinepak_CreateVout( videodec_thread_t *p_vdec, ...@@ -300,7 +300,7 @@ static vout_thread_t *cinepak_CreateVout( videodec_thread_t *p_vdec,
if( !cinepak_CheckVout( p_vout, i_width, i_height ) ) if( !cinepak_CheckVout( p_vout, i_width, i_height ) )
{ {
/* We are not interested in this format, close this vout */ /* We are not interested in this format, close this vout */
vlc_object_detach_all( p_vout ); vlc_object_detach( p_vout );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
vout_DestroyThread( p_vout ); vout_DestroyThread( p_vout );
p_vout = NULL; p_vout = NULL;
...@@ -308,7 +308,7 @@ static vout_thread_t *cinepak_CreateVout( videodec_thread_t *p_vdec, ...@@ -308,7 +308,7 @@ static vout_thread_t *cinepak_CreateVout( videodec_thread_t *p_vdec,
else else
{ {
/* This video output is cool! Hijack it. */ /* This video output is cool! Hijack it. */
vlc_object_detach_all( p_vout ); vlc_object_detach( p_vout );
vlc_object_attach( p_vout, p_vdec->p_fifo ); vlc_object_attach( p_vout, p_vdec->p_fifo );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
} }
...@@ -955,7 +955,7 @@ static void EndThread( videodec_thread_t *p_vdec ) ...@@ -955,7 +955,7 @@ static void EndThread( videodec_thread_t *p_vdec )
if( p_vdec->p_vout != NULL ) if( p_vdec->p_vout != NULL )
{ {
/* We are about to die. Reattach video output to p_vlc. */ /* We are about to die. Reattach video output to p_vlc. */
vlc_object_detach( p_vdec->p_vout, p_vdec->p_fifo ); vlc_object_detach( p_vdec->p_vout );
vlc_object_attach( p_vdec->p_vout, p_vdec->p_fifo->p_vlc ); vlc_object_attach( p_vdec->p_vout, p_vdec->p_fifo->p_vlc );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dv.c: a decoder for DV video * dv.c: a decoder for DV video
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: dv.c,v 1.1 2002/08/05 15:16:18 sam Exp $ * $Id: dv.c,v 1.2 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -162,7 +162,7 @@ static int RunDecoder ( decoder_fifo_t *p_fifo ) ...@@ -162,7 +162,7 @@ static int RunDecoder ( decoder_fifo_t *p_fifo )
|| p_vout->render.i_aspect != i_aspect ) || p_vout->render.i_aspect != i_aspect )
{ {
/* We are not interested in this format, close this vout */ /* We are not interested in this format, close this vout */
vlc_object_detach_all( p_vout ); vlc_object_detach( p_vout );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
vout_DestroyThread( p_vout ); vout_DestroyThread( p_vout );
p_vout = NULL; p_vout = NULL;
...@@ -170,7 +170,7 @@ static int RunDecoder ( decoder_fifo_t *p_fifo ) ...@@ -170,7 +170,7 @@ static int RunDecoder ( decoder_fifo_t *p_fifo )
else else
{ {
/* This video output is cool! Hijack it. */ /* This video output is cool! Hijack it. */
vlc_object_detach_all( p_vout ); vlc_object_detach( p_vout );
vlc_object_attach( p_vout, p_fifo ); vlc_object_attach( p_vout, p_fifo );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library * ffmpeg.c: video decoder using ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.4 2002/08/10 20:05:21 fenrir Exp $ * $Id: ffmpeg.c,v 1.5 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -413,7 +413,7 @@ static vout_thread_t *ffmpeg_CreateVout( videodec_thread_t *p_vdec, ...@@ -413,7 +413,7 @@ static vout_thread_t *ffmpeg_CreateVout( videodec_thread_t *p_vdec,
i_width, i_height, i_aspect,i_chroma ) ) i_width, i_height, i_aspect,i_chroma ) )
{ {
/* We are not interested in this format, close this vout */ /* We are not interested in this format, close this vout */
vlc_object_detach_all( p_vout ); vlc_object_detach( p_vout );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
vout_DestroyThread( p_vout ); vout_DestroyThread( p_vout );
p_vout = NULL; p_vout = NULL;
...@@ -421,7 +421,7 @@ static vout_thread_t *ffmpeg_CreateVout( videodec_thread_t *p_vdec, ...@@ -421,7 +421,7 @@ static vout_thread_t *ffmpeg_CreateVout( videodec_thread_t *p_vdec,
else else
{ {
/* This video output is cool! Hijack it. */ /* This video output is cool! Hijack it. */
vlc_object_detach_all( p_vout ); vlc_object_detach( p_vout );
vlc_object_attach( p_vout, p_vdec->p_fifo ); vlc_object_attach( p_vout, p_vdec->p_fifo );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
} }
...@@ -971,7 +971,7 @@ static void EndThread( videodec_thread_t *p_vdec ) ...@@ -971,7 +971,7 @@ static void EndThread( videodec_thread_t *p_vdec )
if( p_vdec->p_vout != NULL ) if( p_vdec->p_vout != NULL )
{ {
/* We are about to die. Reattach video output to p_vlc. */ /* We are about to die. Reattach video output to p_vlc. */
vlc_object_detach( p_vdec->p_vout, p_vdec->p_fifo ); vlc_object_detach( p_vdec->p_vout );
vlc_object_attach( p_vdec->p_vout, p_vdec->p_fifo->p_vlc ); vlc_object_attach( p_vdec->p_vout, p_vdec->p_fifo->p_vlc );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing * vpar_headers.c : headers parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: headers.c,v 1.2 2002/08/04 18:39:41 sam Exp $ * $Id: headers.c,v 1.3 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -311,6 +311,8 @@ static void SequenceHeader( vpar_thread_t * p_vpar ) ...@@ -311,6 +311,8 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
int i_height_save, i_width_save, i_aspect; int i_height_save, i_width_save, i_aspect;
vout_thread_t *p_vout;
i_height_save = p_vpar->sequence.i_height; i_height_save = p_vpar->sequence.i_height;
i_width_save = p_vpar->sequence.i_width; i_width_save = p_vpar->sequence.i_width;
...@@ -488,36 +490,40 @@ static void SequenceHeader( vpar_thread_t * p_vpar ) ...@@ -488,36 +490,40 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
/* Spawn a video output if there is none. First we look for our children, /* 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. */ * then we look for any other vout that might be available. */
p_vpar->p_vout = vlc_object_find( p_vpar->p_fifo, VLC_OBJECT_VOUT, p_vout = vlc_object_find( p_vpar->p_fifo, VLC_OBJECT_VOUT, FIND_CHILD );
FIND_CHILD ); if( p_vout == NULL )
if( p_vpar->p_vout == NULL )
{ {
p_vpar->p_vout = vlc_object_find( p_vpar->p_fifo, VLC_OBJECT_VOUT, p_vout = vlc_object_find( p_vpar->p_fifo, VLC_OBJECT_VOUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
} }
if( p_vpar->p_vout ) if( p_vout )
{ {
if( p_vpar->p_vout->render.i_width != p_vpar->sequence.i_width if( p_vout->render.i_width != p_vpar->sequence.i_width
|| p_vpar->p_vout->render.i_height != p_vpar->sequence.i_height || p_vout->render.i_height != p_vpar->sequence.i_height
|| p_vpar->p_vout->render.i_chroma != ChromaToFourCC( p_vpar->sequence.i_chroma_format ) || p_vout->render.i_chroma != ChromaToFourCC( p_vpar->sequence.i_chroma_format )
|| p_vpar->p_vout->render.i_aspect != p_vpar->sequence.i_aspect ) || p_vout->render.i_aspect != p_vpar->sequence.i_aspect )
{ {
/* We are not interested in this format, close this vout */ /* We are not interested in this format, close this vout */
vlc_object_detach_all( p_vpar->p_vout ); vlc_object_detach( p_vout );
vlc_object_release( p_vpar->p_vout ); vlc_object_release( p_vout );
vout_DestroyThread( p_vpar->p_vout ); vout_DestroyThread( p_vout );
p_vpar->p_vout = NULL; p_vout = NULL;
} }
else else
{ {
/* This video output is cool! Hijack it. */ /* This video output is cool! Hijack it. */
vlc_object_detach_all( p_vpar->p_vout ); if( p_vout != p_vpar->p_vout )
vlc_object_attach( p_vpar->p_vout, p_vpar->p_fifo ); {
vlc_object_release( 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;
if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error ) if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error )
{ {
return; return;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_parser.c : video parser thread * video_parser.c : video parser thread
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: parser.c,v 1.3 2002/08/04 20:04:11 sam Exp $ * $Id: parser.c,v 1.4 2002/08/12 09:34:15 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -315,7 +315,7 @@ static void EndThread( vpar_thread_t *p_vpar ) ...@@ -315,7 +315,7 @@ static void EndThread( vpar_thread_t *p_vpar )
} }
/* We are about to die. Reattach video output to p_vlc. */ /* We are about to die. Reattach video output to p_vlc. */
vlc_object_detach( p_vpar->p_vout, p_vpar->p_fifo ); vlc_object_detach( p_vpar->p_vout );
vlc_object_attach( p_vpar->p_vout, p_vpar->p_fifo->p_vlc ); vlc_object_attach( p_vpar->p_vout, p_vpar->p_fifo->p_vlc );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@