Commit 1e053ea0 authored by Sam Hocevar's avatar Sam Hocevar

  * ./plugins/mga/mga.c: removed the mgammx module and put the code in
    the chroma_i420_ymga module instead. This introduces a slight
    performance issue as we now need to memcpy() the Y plane, but I have
    some vout4 enhancements on their way which make this point moot.
  * ./debian/changelog: imported official Debian changelog.
  * ./debian/control: activated the vlc-mad and vlc-arts packages; package
    builds should now work again.
  * ./plugins/dvd/dvd.c: solved a symbol resolution issue when vlc was
    compiled without libdvdcss which overflowed the return stack.
  * ./plugins/ggi/ggi.c: ported the GGI plugin to vout4.
  * ./plugins/glide/glide.c: ported the Glide plugin to vout4 (untested).
  * ./src/input/input.c: prepared everything for multi-input mode; since
    no interface is yet prepared to handle this, I changed them so that
    they just use the first available input for now. This may break other
    things, but I promise I'll eventually repair everything :-)
parent ebd16b8d
......@@ -61,6 +61,8 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
chroma/chroma_i420_yuy2_mmx \
chroma/chroma_i422_yuy2 \
chroma/chroma_i422_yuy2_mmx \
chroma/chroma_i420_ymga \
chroma/chroma_i420_ymga_mmx \
directx/directx \
dsp/dsp \
dummy/dummy \
......@@ -98,7 +100,6 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
memcpy/memcpymmxext \
memcpy/memcpy3dn \
mga/mga \
mga/mgammx \
motion/motion \
motion/motionmmx \
motion/motionmmxext \
......
This diff is collapsed.
......@@ -307,13 +307,13 @@ esac
dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort"
dnl
dnl Accelerated modules
dnl
MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx"
MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
SSE_MODULES="imdctsse downmixsse"
......@@ -949,9 +949,6 @@ AC_ARG_ENABLE(mga,
[ if test x$enable_mga = xyes
then
PLUGINS="${PLUGINS} mga"
if test x"$ac_cv_mmx_inline" != x"no"; then
PLUGINS="${PLUGINS} mgammx"
fi
fi ])
dnl
......
vlc (0.2.92-UNSTABLE) unstable; urgency=low
vlc (0.2.92cvs-1) unstable; urgency=low
* Development branch.
-- Christophe Massiot <massiot@via.ecp.fr> Fri, 7 Dec 2001 20:18:56 +0100
vlc (0.2.91-2) unstable; urgency=low
vlc (0.2.92-8) unstable; urgency=high
* Only link with libXv.a if libXv_pic.a wasn't found, which fixes
package builds on sid.
* Added -ffunction-sections to the compilation of mpeg_vdec.a when
the architecture is hppa.
-- Samuel Hocevar <sam@zoy.org> Sun, 6 Jan 2002 06:56:08 +0100
vlc (0.2.92-7) unstable; urgency=high
* Fixed configure.in so that it doesn't fail on hppa.
* Fixed a symbol resolution issue that made vlc crash when libdvdcss
was installed.
-- Samuel Hocevar <sam@zoy.org> Sat, 5 Jan 2002 03:46:23 +0100
vlc (0.2.92-6) unstable; urgency=high
* Attempt to fix IA64 and hppa builds.
-- Samuel Hocevar <sam@zoy.org> Fri, 4 Jan 2002 14:11:02 +0100
vlc (0.2.92-5) unstable; urgency=high
* Many fixes imported from the 0.2.92 upstream release (VCD input,
buffer management, decoder error management).
* Removed a stupid dependency on libc6 which prevented the package
from being built on alpha.
-- Samuel Hocevar <sam@zoy.org> Wed, 2 Jan 2002 04:16:44 +0100
vlc (0.2.92-4) unstable; urgency=high
* Put debian/control and debian/rules in sync again (Closes: #126697).
* Replaced the 48x48 XPM icons with 32x32 icons to comply with policy
(Closes: #126939).
* Don't spawn the Gtk+ or the Gnome interface if no $DISPLAY variable is
present, which fixes the framebuffer output (Closes: #101753).
-- Samuel Hocevar <sam@zoy.org> Sun, 30 Dec 2001 02:59:01 +0100
vlc (0.2.92-3) unstable; urgency=high
* Removed references to vlc-mad (Closes: #126194).
-- Samuel Hocevar <sam@zoy.org> Sat, 22 Dec 2001 21:04:27 +0100
vlc (0.2.92-2) unstable; urgency=high
* Bumped urgency to high to get this stable version into testing; all
reported critical bugs were fixed.
* Bumped Standards-Version to 3.5.6.
* Fixed a PowerPC compilation issue.
* Fixed a crash in the VCD input.
-- Samuel Hocevar <sam@zoy.org> Thu, 20 Dec 2001 23:24:21 +0100
vlc (0.2.92-1) unstable; urgency=low
* Using the stable 0.2.92 CVS branch, has lots of stability fixes.
* Disabled broken ALSA audio output (Closes: #110869, #119846).
* Changed configure.in so that vlc is linked against libXv.a,
not xvideo.so and sdl.so (Closes: #111790).
* Added versioned build-dep to libasound2-dev (Closes: #121057).
-- Samuel Hocevar <sam@zoy.org> Wed, 19 Dec 2001 17:06:44 +0100
vlc (0.2.91-2) unstable; urgency=low
* Added "Video" menu hints (Closes: #121036).
-- Samuel Hocevar <sam@zoy.org> Sun, 25 Nov 2001 02:25:34 +0100
......
......@@ -115,8 +115,9 @@ Description: MAD plugin for vlc
VideoLAN is a free MPEG, MPEG2 and DVD software solution.
.
This plugin adds support for libmad, the MPEG audio decoder library, to
the VideoLAN Client. MAD is 100% fixed-point based.Package: vlc-mad
the VideoLAN Client. MAD is 100% fixed-point based.
Package: vlc-arts
Architecture: any
Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
Description: aRts plugin for vlc
......
......@@ -59,11 +59,11 @@ install: build
# make symlinks for packages and install plugins
case $(DEB_BUILD_ARCH) in \
i386) \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts alsa glide" ;; \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa glide" ;; \
alpha|ia64|m68k|powerpc) \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts alsa" ;; \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa" ;; \
*) \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts" ;; \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad" ;; \
esac ;\
for alias in $$ARCH_ALIASES ; do \
ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.65 2002/01/05 02:22:02 sam Exp $
* $Id: common.h,v 1.66 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -439,8 +439,9 @@ typedef __int64 off_t;
typedef struct module_symbols_s
{
struct main_s* p_main;
struct aout_bank_s* p_aout_bank;
struct vout_bank_s* p_vout_bank;
struct input_bank_s* p_input_bank;
struct aout_bank_s* p_aout_bank;
struct vout_bank_s* p_vout_bank;
int ( * main_GetIntVariable ) ( char *, int );
char * ( * main_GetPszVariable ) ( char *, char * );
......
......@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.55 2001/12/30 07:09:54 sam Exp $
* $Id: input_ext-intf.h,v 1.56 2002/01/07 02:12:29 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -34,15 +34,33 @@
#define OFFSETTOTIME_MAX_SIZE 10
/*****************************************************************************
* input_bank_t, p_input_bank (global variable)
*****************************************************************************
* This global variable is accessed by any function using the input.
*****************************************************************************/
typedef struct input_bank_s
{
/* Array to all the input threads */
struct input_thread_s *pp_input[ INPUT_MAX_THREADS ];
int i_count;
vlc_mutex_t lock; /* Global lock */
} input_bank_t;
#ifndef PLUGIN
extern input_bank_t *p_input_bank;
#else
# define p_input_bank (p_symbols->p_input_bank)
#endif
/*****************************************************************************
* es_descriptor_t: elementary stream descriptor
*****************************************************************************
* Describes an elementary stream, and includes fields required to handle and
* demultiplex this elementary stream.
*****************************************************************************/
struct decoder_fifo_s; /* defined in input_ext-dec.h */
struct pgrm_descriptor_s;
typedef struct es_descriptor_s
{
u16 i_id; /* stream ID for PS, PID for TS */
......@@ -234,9 +252,6 @@ typedef struct stream_descriptor_s
*****************************************************************************
* This structure includes all the local static variables of an input thread
*****************************************************************************/
struct vout_thread_s;
struct bit_stream_s;
typedef struct input_thread_s
{
/* Thread properties and locks */
......@@ -323,6 +338,9 @@ typedef struct input_thread_s
* Prototypes
*****************************************************************************/
#ifndef PLUGIN
void input_InitBank ( void );
void input_EndBank ( void );
struct input_thread_s * input_CreateThread ( struct playlist_item_s *,
int *pi_status );
void input_DestroyThread ( struct input_thread_s *, int *pi_status );
......
......@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: interface.h,v 1.25 2001/12/30 07:09:54 sam Exp $
* $Id: interface.h,v 1.26 2002/01/07 02:12:29 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -46,9 +46,6 @@ typedef struct intf_thread_s
/* Interface callback */
void ( *pf_manage ) ( struct intf_thread_s * );
/* Input thread - NULL if not active */
p_input_thread_t p_input;
/* XXX: new message passing stuff will go here */
vlc_mutex_t change_lock;
boolean_t b_menu_change;
......
/*****************************************************************************
* stream_control.h: structures of the input exported verywhere
* stream_control.h: structures of the input exported everywhere
* This header provides a structure so that everybody knows the state
* of the reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: stream_control.h,v 1.6 2001/07/18 14:21:00 massiot Exp $
* $Id: stream_control.h,v 1.7 2002/01/07 02:12:29 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......
......@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.40 2002/01/05 02:22:03 sam Exp $
* $Id: video.h,v 1.41 2002/01/07 02:12:29 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -161,6 +161,7 @@ typedef struct picture_heap_s
#define FOURCC_Y211 0x31313259 /* Packed 2:1:1, Y:U:Y:V */
/* Custom formats which we use but which don't exist in the fourcc database */
#define FOURCC_YMGA 0x41474d59 /* Planar Y, packed UV, from Matrox */
#define FOURCC_I422 0x32323449 /* Planar 4:2:2, Y:U:V */
#define FOURCC_I444 0x34343449 /* Planar 4:4:4, Y:U:V */
......
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.35 2001/12/30 07:09:54 sam Exp $
* $Id: intf_beos.cpp,v 1.36 2002/01/07 02:12:29 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -156,9 +156,10 @@ static void intf_Run( intf_thread_t *p_intf )
p_intf->pf_manage( p_intf );
/* Manage the slider */
if( p_intf->p_input != NULL && p_intf->p_sys->p_window != NULL)
if( p_input_bank->pp_input[0] != NULL
&& p_intf->p_sys->p_window != NULL)
{
p_intf->p_sys->p_window->updateInterface();
p_intf->p_sys->p_window->updateInterface();
}
/* Wait a bit */
......
......@@ -4,3 +4,5 @@ chroma_i420_yuy2_SOURCES = i420_yuy2.c
chroma_i420_yuy2_mmx_SOURCES = i420_yuy2.c
chroma_i422_yuy2_SOURCES = i422_yuy2.c
chroma_i422_yuy2_mmx_SOURCES = i422_yuy2.c
chroma_i420_ymga_SOURCES = i420_ymga.c
chroma_i420_ymga_mmx_SOURCES = i420_ymga.c
/*****************************************************************************
* i420_ymga.c : YUV to YUV conversion module for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: i420_ymga.c,v 1.1 2002/01/07 02:12:29 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
* GNU General Public License for more details.
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <math.h> /* exp(), pow() */
#include <errno.h> /* ENOMEM */
#include <string.h> /* strerror() */
#include <stdlib.h> /* malloc(), free() */
#include <videolan/vlc.h>
#include "video.h"
#include "video_output.h"
#define SRC_FOURCC "I420/IYUV/YV12"
#define DEST_FOURCC "YMGA"
/*****************************************************************************
* Local and extern prototypes.
*****************************************************************************/
static void chroma_getfunctions ( function_list_t * p_function_list );
static int chroma_Probe ( probedata_t *p_data );
static int chroma_Init ( vout_thread_t *p_vout );
static void chroma_End ( vout_thread_t *p_vout );
static void I420_YMGA ( vout_thread_t *, picture_t *, picture_t * );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
MODULE_CONFIG_STOP
MODULE_INIT_START
#if defined (MODULE_NAME_IS_chroma_i420_ymga)
SET_DESCRIPTION( "conversions from " SRC_FOURCC " to " DEST_FOURCC )
ADD_CAPABILITY( CHROMA, 80 )
#elif defined (MODULE_NAME_IS_chroma_i420_ymga_mmx)
SET_DESCRIPTION( "MMX conversions from " SRC_FOURCC " to " DEST_FOURCC )
ADD_CAPABILITY( CHROMA, 100 )
ADD_REQUIREMENT( MMX )
#endif
MODULE_INIT_STOP
MODULE_ACTIVATE_START
chroma_getfunctions( &p_module->p_functions->chroma );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void chroma_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = chroma_Probe;
p_function_list->functions.chroma.pf_init = chroma_Init;
p_function_list->functions.chroma.pf_end = chroma_End;
}
/*****************************************************************************
* chroma_Probe: return a score
*****************************************************************************
* This function checks that we can handle the required data
*****************************************************************************/
static int chroma_Probe( probedata_t *p_data )
{
if( p_data->chroma.p_render->i_width & 1
|| p_data->chroma.p_render->i_height & 1 )
{
return 0;
}
switch( p_data->chroma.p_render->i_chroma )
{
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
switch( p_data->chroma.p_output->i_chroma )
{
case FOURCC_YMGA:
break;
default:
return 0;
}
break;
default:
return 0;
}
return 100;
}
/*****************************************************************************
* chroma_Init: allocate a chroma function
*****************************************************************************
* This function allocates and initializes a chroma function
*****************************************************************************/
static int chroma_Init( vout_thread_t *p_vout )
{
if( p_vout->render.i_width & 1 || p_vout->render.i_height & 1 )
{
return -1;
}
switch( p_vout->render.i_chroma )
{
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
switch( p_vout->output.i_chroma )
{
case FOURCC_YMGA:
p_vout->chroma.pf_convert = I420_YMGA;
break;
default:
return -1;
}
break;
default:
return -1;
}
return 0;
}
/*****************************************************************************
* chroma_End: free the chroma function
*****************************************************************************
* This function frees the previously allocated chroma function
*****************************************************************************/
static void chroma_End( vout_thread_t *p_vout )
{
;
}
/* Following functions are local */
/*****************************************************************************
* I420_YMGA: planar YUV 4:2:0 to Matrox's planar/packed YUV 4:2:0
*****************************************************************************/
static void I420_YMGA( vout_thread_t *p_vout, picture_t *p_source,
picture_t *p_dest )
{
u8 *p_uv = p_dest->U_PIXELS;
u8 *p_u = p_source->U_PIXELS;
u8 *p_v = p_source->V_PIXELS;
int i_x;
/* Copy the Y part */
FAST_MEMCPY( p_dest->Y_PIXELS, p_source->Y_PIXELS,
p_dest->p[Y_PLANE].i_pitch * p_dest->p[Y_PLANE].i_lines );
/* Copy the U:V part */
for( i_x = p_dest->p[U_PLANE].i_pitch * p_dest->p[U_PLANE].i_lines / 64;
i_x--; )
{
#if defined (MODULE_NAME_IS_chroma_i420_ymga)
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
*p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
#else
__asm__( ".align 32 \n\
movd (%0), %%mm0 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd 4(%0), %%mm2 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd 8(%0), %%mm4 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd 12(%0), %%mm6 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd (%1), %%mm1 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
movd 4(%1), %%mm3 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
movd 8(%1), %%mm5 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
movd 12(%1), %%mm7 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
punpcklbw %%mm1, %%mm0 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
punpcklbw %%mm3, %%mm2 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
punpcklbw %%mm5, %%mm4 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
punpcklbw %%mm7, %%mm6 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
movq %%mm0, (%2) # Store CrCb \n\
movq %%mm2, 8(%2) # Store CrCb \n\
movq %%mm4, 16(%2) # Store CrCb \n\
movq %%mm6, 24(%2) # Store CrCb"
: : "r" (p_v), "r" (p_u), "r" (p_uv) );
p_v += 16; p_u += 16; p_uv += 32;
#endif
}
}
......@@ -2,7 +2,7 @@
* dummy_dvdcss.h: Dummy libdvdcss header.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: dummy_dvdcss.h,v 1.5 2001/12/19 18:14:23 sam Exp $
* $Id: dummy_dvdcss.h,v 1.6 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -51,11 +51,19 @@ char * dummy_dvdcss_error ( dvdcss_handle );
* Pointers which will be filled either with dummy_dvdcss functions or
* with the dlopen()ed ones.
*****************************************************************************/
dvdcss_handle (* dvdcss_open ) ( char * );
int (* dvdcss_close ) ( dvdcss_handle );
int (* dvdcss_title ) ( dvdcss_handle, int );
int (* dvdcss_seek ) ( dvdcss_handle, int, int );
int (* dvdcss_read ) ( dvdcss_handle, void *, int, int );
int (* dvdcss_readv ) ( dvdcss_handle, void *, int, int );
char * (* dvdcss_error ) ( dvdcss_handle );
dvdcss_handle (* ____dvdcss_open ) ( char * );
int (* ____dvdcss_close ) ( dvdcss_handle );
int (* ____dvdcss_title ) ( dvdcss_handle, int );
int (* ____dvdcss_seek ) ( dvdcss_handle, int, int );
int (* ____dvdcss_read ) ( dvdcss_handle, void *, int, int );
int (* ____dvdcss_readv ) ( dvdcss_handle, void *, int, int );
char * (* ____dvdcss_error ) ( dvdcss_handle );
#define ____dvdcss_open dvdcss_open
#define ____dvdcss_close dvdcss_close
#define ____dvdcss_title dvdcss_title
#define ____dvdcss_seek dvdcss_seek
#define ____dvdcss_read dvdcss_read
#define ____dvdcss_readv dvdcss_readv
#define ____dvdcss_error dvdcss_error
......@@ -2,7 +2,7 @@
* dvd.c : DVD input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dvd.c,v 1.17 2001/12/30 07:09:55 sam Exp $
* $Id: dvd.c,v 1.18 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -118,18 +118,18 @@ static void ProbeLibDVDCSS( void )
}
else
{
dvdcss_open = dlsym( p_libdvdcss, "dvdcss_open" );
dvdcss_close = dlsym( p_libdvdcss, "dvdcss_close" );
dvdcss_title = dlsym( p_libdvdcss, "dvdcss_title" );
dvdcss_seek = dlsym( p_libdvdcss, "dvdcss_seek" );
dvdcss_read = dlsym( p_libdvdcss, "dvdcss_read" );
dvdcss_readv = dlsym( p_libdvdcss, "dvdcss_readv" );
dvdcss_error = dlsym( p_libdvdcss, "dvdcss_error" );
if( dvdcss_open == NULL || dvdcss_close == NULL
|| dvdcss_title == NULL || dvdcss_seek == NULL
|| dvdcss_read == NULL || dvdcss_readv == NULL
|| dvdcss_error == NULL )
____dvdcss_open = dlsym( p_libdvdcss, "dvdcss_open" );
____dvdcss_close = dlsym( p_libdvdcss, "dvdcss_close" );
____dvdcss_title = dlsym( p_libdvdcss, "dvdcss_title" );
____dvdcss_seek = dlsym( p_libdvdcss, "dvdcss_seek" );
____dvdcss_read = dlsym( p_libdvdcss, "dvdcss_read" );
____dvdcss_readv = dlsym( p_libdvdcss, "dvdcss_readv" );
____dvdcss_error = dlsym( p_libdvdcss, "dvdcss_error" );
if( ____dvdcss_open == NULL || ____dvdcss_close == NULL
|| ____dvdcss_title == NULL || ____dvdcss_seek == NULL
|| ____dvdcss_read == NULL || ____dvdcss_readv == NULL
|| ____dvdcss_error == NULL )
{
intf_ErrMsg( "dvd warning: missing symbols in libdvdcss.so.1, "
"this shouldn't happen !" );
......@@ -147,13 +147,13 @@ static void ProbeLibDVDCSS( void )
intf_ErrMsg( "dvd warning: get libdvdcss at "
"http://www.videolan.org/libdvdcss/" );
dvdcss_open = dummy_dvdcss_open;
dvdcss_close = dummy_dvdcss_close;
dvdcss_title = dummy_dvdcss_title;
dvdcss_seek = dummy_dvdcss_seek;
dvdcss_read = dummy_dvdcss_read;
dvdcss_readv = dummy_dvdcss_readv;
dvdcss_error = dummy_dvdcss_error;
____dvdcss_open = dummy_dvdcss_open;
____dvdcss_close = dummy_dvdcss_close;
____dvdcss_title = dummy_dvdcss_title;
____dvdcss_seek = dummy_dvdcss_seek;
____dvdcss_read = dummy_dvdcss_read;
____dvdcss_readv = dummy_dvdcss_readv;
____dvdcss_error = dummy_dvdcss_error;
}
}
......
......@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.7 2002/01/05 03:49:18 sam Exp $
* $Id: wall.c,v 1.8 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -134,8 +134,8 @@ static int vout_Create( vout_thread_t *p_vout )
return( 1 );
}
p_vout->p_sys->i_col = 3;
p_vout->p_sys->i_row = 3;
p_vout->p_sys->i_col = 6;
p_vout->p_sys->i_row = 6;
p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_row *
p_vout->p_sys->i_col *
......
ggi_SOURCES = ggi.c vout_ggi.c
ggi_SOURCES = ggi.c
This diff is collapsed.
This diff is collapsed.
glide_SOURCES = glide.c vout_glide.c
glide_SOURCES = glide.c
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.5 2002/01/02 14:37:42 sam Exp $
* $Id: gnome.c,v 1.6 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -325,12 +325,12 @@ static gint GnomeManage( gpointer p_data )
/* update the playlist */
GtkPlayListManage( p_intf );
if( p_intf->p_input != NULL && !p_intf->b_die )
if( p_input_bank->pp_input[0] != NULL && !p_intf->b_die )
{
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
/* New input or stream map change */
if( p_intf->p_input->stream.b_changed )
if( p_input_bank->pp_input[0]->stream.b_changed )
{
GtkModeManage( p_intf );
GtkSetupMenus( p_intf );
......@@ -338,12 +338,12 @@ static gint GnomeManage( gpointer p_data )
}
/* Manage the slider */
if( p_intf->p_input->stream.b_seekable )
if( p_input_bank->pp_input[0]->stream.b_seekable )
{
float newvalue;
newvalue = p_intf->p_sys->p_adj->value;
#define p_area p_intf->p_input->stream.p_selected_area
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
/* If the user hasn't touched the slider since the last time,
* then the input can safely change it */
if( newvalue == p_intf->p_sys->f_adj_oldvalue )
......@@ -361,9 +361,9 @@ static gint GnomeManage( gpointer p_data )
{
off_t i_seek = ( newvalue * p_area->i_size ) / 100;
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
input_Seek( p_intf->p_input, i_seek );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
input_Seek( p_input_bank->pp_input[0], i_seek );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
/* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue;
......@@ -372,13 +372,13 @@ static gint GnomeManage( gpointer p_data )
}
if( p_intf->p_sys->i_part !=
p_intf->p_input->stream.p_selected_area->i_part )
p_input_bank->pp_input[0]->stream.p_selected_area->i_part )
{
p_intf->p_sys->b_chapter_update = 1;
GtkSetupMenus( p_intf );
}
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
else if( p_intf->p_sys->b_playing && !p_intf->b_die )
{
......
......@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.7 2001/12/30 07:09:55 sam Exp $
* $Id: gtk.c,v 1.8 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -328,12 +328,12 @@ static gint GtkManage( gpointer p_data )
/* update the playlist */
GtkPlayListManage( p_data );
if( p_intf->p_input != NULL && !p_intf->b_die )
if( p_input_bank->pp_input[0] != NULL && !p_intf->b_die )
{
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
/* New input or stream map change */
if( p_intf->p_input->stream.b_changed )
if( p_input_bank->pp_input[0]->stream.b_changed )
{
GtkModeManage( p_intf );
GtkSetupMenus( p_intf );
......@@ -341,11 +341,11 @@ static gint GtkManage( gpointer p_data )
}
/* Manage the slider */
if( p_intf->p_input->stream.b_seekable )
if( p_input_bank->pp_input[0]->stream.b_seekable )
{
float newvalue = p_intf->p_sys->p_adj->value;
#define p_area p_intf->p_input->stream.p_selected_area
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
/* If the user hasn't touched the slider since the last time,
* then the input can safely change it */
if( newvalue == p_intf->p_sys->f_adj_oldvalue )
......@@ -364,9 +364,9 @@ static gint GtkManage( gpointer p_data )
off_t i_seek = ( newvalue * p_area->i_size ) / 100;
/* release the lock to be able to seek */
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
input_Seek( p_intf->p_input, i_seek );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
input_Seek( p_input_bank->pp_input[0], i_seek );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
/* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue;
......@@ -375,13 +375,13 @@ static gint GtkManage( gpointer p_data )
}
if( p_intf->p_sys->i_part !=
p_intf->p_input->stream.p_selected_area->i_part )
p_input_bank->pp_input[0]->stream.p_selected_area->i_part )
{
p_intf->p_sys->b_chapter_update = 1;
GtkSetupMenus( p_intf );
}
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
else if( p_intf->p_sys->b_playing && !p_intf->b_die )
......
......@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.29 2001/12/30 07:09:55 sam Exp $
* $Id: gtk_callbacks.c,v 1.30 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -133,10 +133,10 @@ void GtkWindowDrag( GtkWidget *widget,
int end = p_main->p_playlist->i_size;
GtkDropDataReceived( p_intf, data, info, PLAYLIST_END );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, end-1 );
......@@ -186,20 +186,20 @@ void GtkTitlePrev( GtkButton * button, gpointer user_data )
int i_id;
p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data );
i_id = p_intf->p_input->stream.p_selected_area->i_id - 1;
i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1;
/* Disallow area 0 since it is used for video_ts.vob */
if( i_id > 0 )
{
p_area = p_intf->p_input->stream.pp_areas[i_id];
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id];
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_intf->p_sys->b_title_update = 1;
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
GtkSetupMenus( p_intf );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
}
......@@ -211,19 +211,19 @@ void GtkTitleNext( GtkButton * button, gpointer user_data )
int i_id;
p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data );
i_id = p_intf->p_input->stream.p_selected_area->i_id + 1;
i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1;
if( i_id < p_intf->p_input->stream.i_area_nb )
if( i_id < p_input_bank->pp_input[0]->stream.i_area_nb )
{
p_area = p_intf->p_input->stream.pp_areas[i_id];
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id];
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_intf->p_sys->b_title_update = 1;
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
GtkSetupMenus( p_intf );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
}
......@@ -235,19 +235,19 @@ void GtkChapterPrev( GtkButton * button, gpointer user_data )
input_area_t * p_area;
p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data );
p_area = p_intf->p_input->stream.p_selected_area;
p_area = p_input_bank->pp_input[0]->stream.p_selected_area;
if( p_area->i_part > 0 )
{
p_area->i_part--;
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_intf->p_sys->b_chapter_update = 1;
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
GtkSetupMenus( p_intf );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
}
......@@ -258,19 +258,19 @@ void GtkChapterNext( GtkButton * button, gpointer user_data )
input_area_t * p_area;
p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data );
p_area = p_intf->p_input->stream.p_selected_area;
p_area = p_input_bank->pp_input[0]->stream.p_selected_area;
if( p_area->i_part < p_area->i_part_nb )
{
p_area->i_part++;
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_intf->p_sys->b_chapter_update = 1;
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
GtkSetupMenus( p_intf );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
}
......@@ -303,10 +303,10 @@ void GtkChannelGo( GtkButton * button, gpointer user_data )
intf_WarnMsg( 3, "intf info: joining channel %d", i_channel );
vlc_mutex_lock( &p_intf->change_lock );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* end playing item */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
......@@ -328,7 +328,7 @@ void GtkChannelGo( GtkButton * button, gpointer user_data )
vlc_mutex_unlock( &p_intf->change_lock );
// input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
// input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
}
......@@ -410,14 +410,14 @@ void GtkJumpOk( GtkButton *button,
i_seconds += 60 *i_minutes + 3600* i_hours;
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
i_seek = i_seconds * 50 * p_intf->p_input->stream.i_mux_rate;
i_size = p_intf->p_input->stream.p_selected_area->i_size;
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
i_seek = i_seconds * 50 * p_input_bank->pp_input[0]->stream.i_mux_rate;
i_size = p_input_bank->pp_input[0]->stream.p_selected_area->i_size;
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
if( i_seek < i_size )
{
input_Seek( p_intf->p_input, i_seek );
input_Seek( p_input_bank->pp_input[0], i_seek );
}
p_main->p_playlist->b_stopped = 0;
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
......
......@@ -2,7 +2,7 @@
* gtk_control.c : functions to handle stream control buttons.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_control.c,v 1.8 2001/12/30 07:09:55 sam Exp $
* $Id: gtk_control.c,v 1.9 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -69,12 +69,10 @@ gboolean GtkControlStop( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* end playing item */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
......@@ -94,11 +92,9 @@ gboolean GtkControlPlay( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_main->p_playlist->b_stopped = 0;
}
else
......@@ -135,11 +131,9 @@ gboolean GtkControlPause( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE );
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->b_stopped = 0;
......@@ -154,11 +148,9 @@ gboolean GtkControlSlow( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER );
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->b_stopped = 0;
......@@ -173,11 +165,9 @@ gboolean GtkControlFast( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER );
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->b_stopped = 0;
......
......@@ -2,7 +2,7 @@
* gtk_display.c: Gtk+ tools for main interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_display.c,v 1.10 2001/12/30 07:09:55 sam Exp $
* $Id: gtk_display.c,v 1.11 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -67,13 +67,13 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
p_intf = gtk_object_get_data( GTK_OBJECT( p_adj ), "p_intf" );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
#define p_area p_intf->p_input->stream.p_selected_area
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
char psz_time[ OFFSETTOTIME_MAX_SIZE ];
gtk_frame_set_label( GTK_FRAME( p_intf->p_sys->p_slider_frame ),
input_OffsetToTime( p_intf->p_input, psz_time,
input_OffsetToTime( p_input_bank->pp_input[0], psz_time,
( p_area->i_size * p_adj->value ) / 100 ) );
#undef p_area
}
......@@ -120,9 +120,9 @@ gint GtkModeManage( intf_thread_t * p_intf )
b_control = 0;
/* show the box related to current input mode */
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
switch( p_intf->p_input->stream.i_method & 0xf0 )
switch( p_input_bank->pp_input[0]->stream.i_method & 0xf0 )
{
case INPUT_METHOD_FILE:
//intf_WarnMsg( 2, "intf info: file method" );
......@@ -131,7 +131,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
p_intf->p_sys->p_window ),
"label_status" );
gtk_label_set_text( GTK_LABEL( p_label ),
p_intf->p_input->p_source );
p_input_bank->pp_input[0]->p_source );
break;
case INPUT_METHOD_DISC:
//intf_WarnMsg( 2, "intf info: disc method" );
......@@ -144,7 +144,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
p_intf->p_sys->p_window ),
"network_address_label" );
gtk_label_set_text( GTK_LABEL( p_label ),
p_intf->p_input->p_source );
p_input_bank->pp_input[0]->p_source );
p_channel = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "network_channel_box" ) );
if( main_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR,
......@@ -164,7 +164,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
}
/* initialize and show slider for seekable streams */
if( p_intf->p_input->stream.b_seekable )
if( p_input_bank->pp_input[0]->stream.b_seekable )
{
p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = 0;
gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
......@@ -173,7 +173,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
}
/* control buttons for free pace streams */
b_control = p_intf->p_input->stream.b_pace_control;
b_control = p_input_bank->pp_input[0]->stream.b_pace_control;
/* get ready for menu regeneration */
p_intf->p_sys->b_title_update = 1;
......@@ -183,7 +183,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
p_intf->p_sys->b_spu_update = 1;
p_intf->p_sys->i_part = 0;
p_intf->p_input->stream.b_changed = 0;
p_input_bank->pp_input[0]->stream.b_changed = 0;
intf_WarnMsg( 3, "intf: stream has changed, refreshing interface" );
}
else
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_open.c,v 1.13 2002/01/02 14:37:42 sam Exp $
* $Id: gtk_open.c,v 1.14 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -111,9 +111,9 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
GtkRebuildCList( p_playlist_clist, p_main->p_playlist );
/* end current item, select added item */
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
......@@ -225,9 +225,9 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data )
GtkRebuildCList( p_playlist_clist, p_main->p_playlist );
/* stop current item, select added item */
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
......@@ -315,9 +315,9 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
GTK_WIDGET(button), "network_server" ) ) );
/* select added item */
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
/* Check which protocol was activated */
......
......@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: gtk_playlist.c,v 1.25 2002/01/04 14:01:34 sam Exp $
* $Id: gtk_playlist.c,v 1.26 2002/01/07 02:12:29 sam Exp $
*
* Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -102,14 +102,12 @@ gboolean GtkPlaylistPrev( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
intf_PlaylistPrev( p_main->p_playlist );
intf_PlaylistPrev( p_main->p_playlist );
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
return TRUE;
......@@ -120,12 +118,10 @@ gboolean GtkPlaylistNext( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
return TRUE;
......@@ -281,10 +277,10 @@ gboolean GtkPlaylistEvent( GtkWidget * widget,
(event->button).y, &i_row, &i_col ) == 1 )
{
/* clicked is in range. */
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, i_row - 1 );
......@@ -507,7 +503,7 @@ void GtkDeleteGListItem( gpointer data, gpointer param )
if( p_intf->p_sys->i_playing == i_cur_row )
{
/* next ! */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
/* this has to set the slider to 0 */
/* step minus one */
......
......@@ -222,7 +222,7 @@ void KInterface::slotManage()
/* Update language/chapter menus after user request */
#if 0
if( fInterface->p_input != NULL && p_intf->p_sys->p_window != NULL &&
if( p_input_bank->pp_input[0] != NULL && p_intf->p_sys->p_window != NULL &&
p_intf->p_sys->b_menus_update )
{
// GnomeSetupMenu( p_intf );
......@@ -230,9 +230,9 @@ void KInterface::slotManage()
#endif
/* Manage the slider */
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
#define p_area p_intf->p_input->stream.p_selected_area
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
fSlider->setValue( ( 100 * p_area->i_tell ) / p_area->i_size );
#undef p_area
}
......@@ -253,25 +253,25 @@ void KInterface::slotSliderMoved( int position )
// XXX is this locking really useful ?
vlc_mutex_lock( &p_intf->change_lock );
off_t i_seek = ( position * p_intf->p_input->stream.p_selected_area->i_size ) / 100;
input_Seek( p_intf->p_input, i_seek );
off_t i_seek = ( position * p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 100;
input_Seek( p_input_bank->pp_input[0], i_seek );
vlc_mutex_unlock( &p_intf->change_lock );
}
void KInterface::slotSliderChanged( int position )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
char psz_time[ OFFSETTOTIME_MAX_SIZE ];
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
#define p_area p_intf->p_input->stream.p_selected_area
statusBar()->changeItem( input_OffsetToTime( p_intf->p_input, psz_time, ( p_area->i_size * position ) / 100 ), ID_DATE );
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
statusBar()->changeItem( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 100 ), ID_DATE );
#undef p_area
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
}
......@@ -295,9 +295,9 @@ void KInterface::slotOpenDisk()
// Select added item and switch to disk interface
intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
}
}
......@@ -319,35 +319,35 @@ void KInterface::slotOpenStream()
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, source.latin1() );
intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
}
}
void KInterface::slotPlay()
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
}
}
void KInterface::slotPause()
{
if ( p_intf->p_input != NULL )
if ( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE );
}
}
void KInterface::slotStop()
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* end playing item */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
......@@ -366,37 +366,37 @@ void KInterface::slotBackward()
void KInterface::slotPrev()
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
intf_PlaylistPrev( p_main->p_playlist );
intf_PlaylistPrev( p_main->p_playlist );
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
}
void KInterface::slotNext()
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
}
void KInterface::slotSlow()
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER );
}
}
void KInterface::slotFast()
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER );
}
}
......
......@@ -29,14 +29,14 @@ void KTitleMenu::regenerateSlot()
fLanguageList = new KActionMenu( "Language", 0, this );
int i_item = 0;
vlc_mutex_lock( &fInterfaceThread->p_input->stream.stream_lock );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
for( int i = 0 ; i < fInterfaceThread->p_input->stream.i_es_number ; i++ )
for( int i = 0 ; i < p_input_bank->pp_input[0]->stream.i_es_number ; i++ )
{
if( fInterfaceThread->p_input->stream.pp_es[i]->i_cat /* == i_cat */ )
if( p_input_bank->pp_input[0]->stream.pp_es[i]->i_cat /* == i_cat */ )
{
i_item++;
QString language( fInterfaceThread->p_input->stream.pp_es[i]->psz_desc );
QString language( p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc );
if ( QString::null == language )
{
language += i18n( "Language" );
......@@ -45,7 +45,7 @@ void KTitleMenu::regenerateSlot()
KRadioAction *action = new KRadioAction( language, 0, this, "language_action" );
fLanguageList->insert( action );
if( /* p_es == */ fInterfaceThread->p_input->stream.pp_es[i] )
if( /* p_es == */ p_input_bank->pp_input[0]->stream.pp_es[i] )
{
/* don't lose p_item when we append into menu */
//p_item_active = p_item;
......@@ -53,7 +53,7 @@ void KTitleMenu::regenerateSlot()
}
}
vlc_mutex_unlock( &fInterfaceThread->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
#if 0
/* link the new menu to the menubar item */
......
......@@ -63,13 +63,12 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for mad_adec module" )
ADD_COMMENT( "No device to configure." )
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( "Libmad MPEG 1/2/3 audio decoder library" )
ADD_CAPABILITY( DECODER, 950 )
ADD_SHORTCUT( "mad" )
MODULE_INIT_STOP
MODULE_ACTIVATE_START
......
mga_SOURCES = mga.c
mgammx_SOURCES = mga.c
......@@ -2,7 +2,7 @@
* mga.c : Matrox Graphic Array plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: mga.c,v 1.14 2002/01/06 18:01:58 sam Exp $
* $Id: mga.c,v 1.15 2002/01/07 02:12:29 sam Exp $
*
* Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
* Samuel Hocevar <sam@zoy.org>
......@@ -65,15 +65,9 @@ MODULE_CONFIG_START
MODULE_CONFIG_STOP
MODULE_INIT_START
#ifdef MODULE_NAME_IS_mga
SET_DESCRIPTION( "Matrox Graphic Array video module" )
ADD_CAPABILITY( VOUT, 10 )
ADD_SHORTCUT( "mga" )
#elif defined( MODULE_NAME_IS_mgammx )
SET_DESCRIPTION( "MMX-accelerated Matrox Graphic Array video module" )
ADD_CAPABILITY( VOUT, 11 )
ADD_SHORTCUT( "mgammx" )
#endif
MODULE_INIT_STOP
MODULE_ACTIVATE_START
......@@ -135,7 +129,6 @@ typedef struct vout_sys_s
mga_vid_config_t mga;
int i_fd;
byte_t * p_video;
boolean_t b_420bug;
} vout_sys_t;
......@@ -143,10 +136,6 @@ typedef struct picture_sys_s
{
int i_frame;
/* For buggy g200s which don't do I420 properly */
u8 * p_chroma;
u8 * p_tmp;
} picture_sys_t;
#define CEIL32(x) (((x)+31)&~31)
......@@ -241,8 +230,9 @@ static int vout_Init( vout_thread_t *p_vout )
* p_vout->output.i_height * 2;
p_vout->p_sys->mga.version = MGA_VID_VERSION;
/* Assume we only do YV12 for the moment */
p_vout->output.i_chroma = FOURCC_YV12;
/* Assume we only do YMGA for the moment. XXX: mga_vid calls this
* YV12, but it's actually some strange format with packed UV. */
p_vout->output.i_chroma = FOURCC_YMGA;
p_vout->p_sys->mga.format = MGA_VID_FORMAT_YV12;
if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, &p_vout->p_sys->mga) )
......@@ -251,18 +241,10 @@ static int vout_Init( vout_thread_t *p_vout )
return -1;
}
p_vout->p_sys->b_420bug = 0;
if( p_vout->p_sys->mga.card_type == MGA_G200 )
{
intf_WarnMsg( 3, "vout info: detected MGA G200 (%d MB Ram)",
p_vout->p_sys->mga.ram_size );
if( p_vout->output.i_chroma == FOURCC_I420
|| p_vout->output.i_chroma == FOURCC_IYUV
|| p_vout->output.i_chroma == FOURCC_YV12 )
{
p_vout->p_sys->b_420bug = 1;
}
}
else
{
......@@ -334,10 +316,6 @@ static void vout_End( vout_thread_t *p_vout )
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
if( p_vout->p_sys->b_420bug )
{
free( PP_OUTPUTPICTURE[ i_index ]->p_sys );
}
}
}
......@@ -369,59 +347,9 @@ static int vout_Manage( vout_thread_t *p_vout )
*****************************************************************************/
static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
{
if( p_vout->p_sys->b_420bug )
{
/* Grmbl, we have a G200 which mistakenly assumes 4:2:0 planar
* has *packed* chroma information! Do some conversion... */
u8 *p_dest = p_pic->p_sys->p_chroma;
u8 *p_cr = p_pic->U_PIXELS;
u8 *p_cb = p_pic->V_PIXELS;
int i;
/* frame_size is a multiple of 64 */
for( i = p_vout->p_sys->mga.frame_size / 64; i--; )
{
#ifdef MODULE_NAME_IS_mga
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
*p_dest++ = *p_cr++; *p_dest++ = *p_cb++;
#elif defined( MODULE_NAME_IS_mgammx )
__asm__( ".align 32 \n\
movd (%0), %%mm0 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd 4(%0), %%mm2 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd 8(%0), %%mm4 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd 12(%0), %%mm6 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
movd (%1), %%mm1 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
movd 4(%1), %%mm3 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
movd 8(%1), %%mm5 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
movd 12(%1), %%mm7 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
punpcklbw %%mm1, %%mm0 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
punpcklbw %%mm3, %%mm2 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
punpcklbw %%mm5, %%mm4 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
punpcklbw %%mm7, %%mm6 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
movq %%mm0, (%2) # Store CrCb \n\
movq %%mm2, 8(%2) # Store CrCb \n\
movq %%mm4, 16(%2) # Store CrCb \n\
movq %%mm6, 24(%2) # Store CrCb"
: : "r" (p_cr), "r" (p_cb), "r" (p_dest) );
p_cr += 16; p_cb += 16; p_dest += 32;
#endif
}
}
/* Grmbl, if we have a G200 which mistakenly assumes 4:2:0 planar
* has *packed* chroma information, we'll need to do some
* vonversion... but vlc does this for us. */
}
/*****************************************************************************
......@@ -446,6 +374,13 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
p_pic->p_data = p_vout->p_sys->p_video + I_OUTPUTPICTURES
* p_vout->p_sys->mga.frame_size;
p_pic->p_sys = malloc( sizeof( picture_sys_t ) );
if( p_pic->p_sys == NULL )
{
return -1;
}
p_pic->Y_PIXELS = p_pic->p_data;
p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
p_pic->p[Y_PLANE].i_pitch = CEIL32( p_vout->output.i_width );
......@@ -461,42 +396,13 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
p_pic->p[Y_PLANE].b_margin = 0;
}
if( p_vout->p_sys->b_420bug )
{
/* We need to store the chroma somewhere else */
p_pic->p_sys = malloc( sizeof( picture_sys_t )
+ p_vout->p_sys->mga.frame_size / 2 );
if( p_pic->p_sys == NULL )
{
return -1;
}
p_pic->p_sys->p_chroma =
p_pic->p_data + p_vout->p_sys->mga.frame_size / 2;
p_pic->p_sys->p_tmp = (u8*)p_pic->p_sys + sizeof( picture_sys_t );
p_pic->U_PIXELS = p_pic->p_sys->p_tmp;
p_pic->V_PIXELS = p_pic->p_sys->p_tmp
+ p_vout->p_sys->mga.frame_size / 4;
}
else
{
p_pic->p_sys = malloc( sizeof( picture_sys_t ) );
if( p_pic->p_sys == NULL )
{
return -1;
}
p_pic->U_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 2/4;
p_pic->V_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 3/4;
}
p_pic->U_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 2/4;
p_pic->p[U_PLANE].i_lines = p_vout->output.i_height / 2;
p_pic->p[U_PLANE].i_pitch = CEIL32( p_vout->output.i_width ) / 2;
p_pic->p[U_PLANE].i_pixel_bytes = 1;
p_pic->p[U_PLANE].b_margin = 0;
p_pic->V_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 3/4;
p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;
p_pic->p[V_PLANE].i_pitch = CEIL32( p_vout->output.i_width ) / 2;
p_pic->p[V_PLANE].i_pixel_bytes = 1;
......
......@@ -2,7 +2,7 @@
* intf_qt.cpp: Qt interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_qt.cpp,v 1.10 2001/12/30 07:09:56 sam Exp $
* $Id: intf_qt.cpp,v 1.11 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -378,15 +378,15 @@ IntfWindow::~IntfWindow( void )
*****************************************************************************/
void IntfWindow::DateDisplay( int i_range )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
char psz_time[ OFFSETTOTIME_MAX_SIZE ];
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
p_date->setText( input_OffsetToTime( p_intf->p_input, psz_time,
( p_intf->p_input->stream.p_selected_area->i_size * i_range )
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
p_date->setText( input_OffsetToTime( p_input_bank->pp_input[0], psz_time,
( p_input_bank->pp_input[0]->stream.p_selected_area->i_size * i_range )
/ SLIDER_MAX ) );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
}
......@@ -438,11 +438,11 @@ void IntfWindow::About( void )
void IntfWindow::Manage( void )
{
/* Manage the slider */
if( p_intf->p_input != NULL && p_intf->p_input->stream.b_seekable )
if( p_input_bank->pp_input[0] != NULL && p_input_bank->pp_input[0]->stream.b_seekable )
{
int i_value = p_slider->value();
#define p_area p_intf->p_input->stream.p_selected_area
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
/* If the user hasn't touched the slider since the last time,
* then the input can safely change it */
if( i_value == p_slider->oldvalue() )
......@@ -458,7 +458,7 @@ void IntfWindow::Manage( void )
{
off_t i_seek = ( i_value * p_area->i_size ) / SLIDER_MAX;
input_Seek( p_intf->p_input, i_seek );
input_Seek( p_input_bank->pp_input[0], i_seek );
/* Update the old value */
p_slider->setOldValue( i_value );
......@@ -487,9 +487,9 @@ void IntfWindow::Manage( void )
*****************************************************************************/
void IntfWindow::PlaybackPlay( void )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
}
}
......@@ -498,9 +498,9 @@ void IntfWindow::PlaybackPlay( void )
*****************************************************************************/
void IntfWindow::PlaybackPause( void )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE );
}
}
......@@ -509,9 +509,9 @@ void IntfWindow::PlaybackPause( void )
*****************************************************************************/
void IntfWindow::PlaybackSlow( void )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER );
}
}
......@@ -520,9 +520,9 @@ void IntfWindow::PlaybackSlow( void )
*****************************************************************************/
void IntfWindow::PlaybackFast( void )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER );
}
}
......@@ -531,12 +531,12 @@ void IntfWindow::PlaybackFast( void )
*****************************************************************************/
void IntfWindow::PlaylistPrev( void )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
intf_PlaylistPrev( p_main->p_playlist );
intf_PlaylistPrev( p_main->p_playlist );
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
}
......@@ -545,10 +545,10 @@ void IntfWindow::PlaylistPrev( void )
*****************************************************************************/
void IntfWindow::PlaylistNext( void )
{
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
}
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.78 2002/01/05 03:49:18 sam Exp $
* $Id: vout_sdl.c,v 1.79 2002/01/07 02:12:29 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
......@@ -97,17 +97,24 @@ typedef struct picture_sys_s
*****************************************************************************/
static __inline__ void vout_Seek( off_t i_seek )
{
#define area p_main->p_intf->p_input->stream.p_selected_area
off_t i_tell = area->i_tell;
off_t i_tell;
i_tell += i_seek * (off_t)50 * p_main->p_intf->p_input->stream.i_mux_rate;
vlc_mutex_lock( &p_input_bank->lock );
if( p_input_bank->pp_input[0] != NULL )
{
#define S p_input_bank->pp_input[0]->stream
i_tell = S.p_selected_area->i_tell + i_seek * (off_t)50 * S.i_mux_rate;
i_tell = ( i_tell <= area->i_start ) ? area->i_start
: ( i_tell >= area->i_size ) ? area->i_size
: i_tell;
i_tell = ( i_tell <= 0 /*S.p_selected_area->i_start*/ )
? 0 /*S.p_selected_area->i_start*/
: ( i_tell >= S.p_selected_area->i_size )
? S.p_selected_area->i_size
: i_tell;
input_Seek( p_main->p_intf->p_input, i_tell );
#undef area
input_Seek( p_input_bank->pp_input[0], i_tell );
#undef S
}
vlc_mutex_unlock( &p_input_bank->lock );
}
/*****************************************************************************
......@@ -401,7 +408,8 @@ static int vout_Manage( vout_thread_t *p_vout )
/* In this part we will eventually manage
* clicks for DVD navigation for instance. For the
* moment just pause the stream. */
input_SetStatus( p_main->p_intf->p_input, INPUT_STATUS_PAUSE );
input_SetStatus( p_input_bank->pp_input[0],
INPUT_STATUS_PAUSE );
break;
case 4:
......
......@@ -2,7 +2,7 @@
* rc.c : remote control stdin/stdout plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: rc.c,v 1.8 2002/01/04 14:01:34 sam Exp $
* $Id: rc.c,v 1.9 2002/01/07 02:12:29 sam Exp $
*
* Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
*
......@@ -163,8 +163,9 @@ static void intf_Run( intf_thread_t *p_intf )
while( !p_intf->b_die )
{
#define S p_intf->p_input->stream
if( p_intf->p_input != NULL )
vlc_mutex_lock( &p_input_bank->lock );
#define S p_input_bank->pp_input[0]->stream
if( p_input_bank->pp_input[0] != NULL )
{
/* Get position */
if( S.i_mux_rate )
......@@ -182,6 +183,7 @@ static void intf_Run( intf_thread_t *p_intf )
}
}
#undef S
vlc_mutex_unlock( &p_input_bank->lock );
b_complete = 0;
i_cmd_pos = 0;
......@@ -212,6 +214,8 @@ static void intf_Run( intf_thread_t *p_intf )
}
}
vlc_mutex_lock( &p_input_bank->lock );
/* Is there something to do? */
if( b_complete == 1 )
{
......@@ -223,9 +227,9 @@ static void intf_Run( intf_thread_t *p_intf )
{
intf_PlaylistAdd( p_main->p_playlist,
PLAYLIST_END, p_cmd + 2 );
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
p_intf->p_input->b_eof = 1;
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist,
p_main->p_playlist->i_size - 2 );
......@@ -234,9 +238,10 @@ static void intf_Run( intf_thread_t *p_intf )
case 'p':
case 'P':
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
input_SetStatus( p_input_bank->pp_input[0],
INPUT_STATUS_PAUSE );
}
break;
......@@ -276,7 +281,7 @@ static void intf_Run( intf_thread_t *p_intf )
case 'r':
case 'R':
if( p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
for( i_dummy = 1;
i_dummy < MAX_LINE_LENGTH && p_cmd[ i_dummy ] >= '0'
......@@ -288,7 +293,8 @@ static void intf_Run( intf_thread_t *p_intf )
p_cmd[ i_dummy ] = 0;
f_cpos = atof( p_cmd + 1 );
input_Seek( p_intf->p_input, (off_t) (f_cpos / f_ratio) );
input_Seek( p_input_bank->pp_input[0],
(off_t) (f_cpos / f_ratio) );
/* rcreseek(f_cpos); */
}
break;
......@@ -312,6 +318,8 @@ static void intf_Run( intf_thread_t *p_intf )
}
}
vlc_mutex_unlock( &p_input_bank->lock );
p_intf->pf_manage( p_intf );
msleep( INTF_IDLE_SLEEP );
}
......
......@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.8 2002/01/05 15:17:12 sam Exp $
* $Id: xcommon.c,v 1.9 2002/01/07 02:12:29 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -222,17 +222,24 @@ typedef struct mwmhints_s
*****************************************************************************/
static __inline__ void vout_Seek( off_t i_seek )
{
#define area p_main->p_intf->p_input->stream.p_selected_area
off_t i_tell = area->i_tell;
off_t i_tell;
i_tell += i_seek * (off_t)50 * p_main->p_intf->p_input->stream.i_mux_rate;
vlc_mutex_lock( &p_input_bank->lock );
if( p_input_bank->pp_input[0] != NULL )
{
#define S p_input_bank->pp_input[0]->stream
i_tell = S.p_selected_area->i_tell + i_seek * (off_t)50 * S.i_mux_rate;
i_tell = ( i_tell <= 0/*area->i_start*/ ) ? 0/*area->i_start*/
: ( i_tell >= area->i_size ) ? area->i_size
: i_tell;
i_tell = ( i_tell <= 0 /*S.p_selected_area->i_start*/ )
? 0 /*S.p_selected_area->i_start*/
: ( i_tell >= S.p_selected_area->i_size )
? S.p_selected_area->i_size
: i_tell;
input_Seek( p_main->p_intf->p_input, i_tell );
#undef area
input_Seek( p_input_bank->pp_input[0], i_tell );
#undef S
}
vlc_mutex_unlock( &p_input_bank->lock );
}
/*****************************************************************************
......@@ -659,12 +666,12 @@ static int vout_Manage( vout_thread_t *p_vout )
vout_Seek( -60 );
break;
case XK_Home:
input_Seek( p_main->p_intf->p_input,
p_main->p_intf->p_input->stream.p_selected_area->i_start );
input_Seek( p_input_bank->pp_input[0],
p_input_bank->pp_input[0]->stream.p_selected_area->i_start );
break;
case XK_End:
input_Seek( p_main->p_intf->p_input,
p_main->p_intf->p_input->stream.p_selected_area->i_size );
input_Seek( p_input_bank->pp_input[0],
p_input_bank->pp_input[0]->stream.p_selected_area->i_size );
break;
case XK_Page_Up:
vout_Seek( 900 );
......@@ -673,7 +680,7 @@ static int vout_Manage( vout_thread_t *p_vout )
vout_Seek( -900 );
break;
case XK_space:
input_SetStatus( p_main->p_intf->p_input,
input_SetStatus( p_input_bank->pp_input[0],
INPUT_STATUS_PAUSE );
break;
......@@ -726,7 +733,7 @@ static int vout_Manage( vout_thread_t *p_vout )
/* In this part we will eventually manage
* clicks for DVD navigation for instance. For the
* moment just pause the stream. */
input_SetStatus( p_main->p_intf->p_input,
input_SetStatus( p_input_bank->pp_input[0],
INPUT_STATUS_PAUSE );
break;
......@@ -778,10 +785,10 @@ static int vout_Manage( vout_thread_t *p_vout )
if( ((XExposeEvent *)&xevent)->count == 0 )
{
/* (if this is the last a collection of expose events...) */
if( p_main->p_intf->p_input != NULL )
if( p_input_bank->pp_input[0] != NULL )
{
if( PAUSE_S ==
p_main->p_intf->p_input->stream.control.i_status )
p_input_bank->pp_input[0]->stream.control.i_status )
{
/* XVideoDisplay( p_vout )*/;
}
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input.c,v 1.167 2001/12/30 07:09:56 sam Exp $
* $Id: input.c,v 1.168 2002/01/07 02:12:29 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -92,6 +92,37 @@ static void HTTPOpen ( input_thread_t *p_input );
static void NetworkClose ( input_thread_t *p_input );
#endif
/*****************************************************************************
* input_InitBank: initialize the input bank.
*****************************************************************************/
void input_InitBank ( void )
{
p_input_bank->i_count = 0;
/* XXX: Workaround for old interface modules */
p_input_bank->pp_input[0] = NULL;
vlc_mutex_init( &p_input_bank->lock );
}
/*****************************************************************************
* input_EndBank: empty the input bank.
*****************************************************************************
* This function ends all unused inputs and empties the bank in
* case of success.
*****************************************************************************/
void input_EndBank ( void )
{
/* Ask all remaining video outputs to die */
while( p_input_bank->i_count )
{
input_DestroyThread(
p_input_bank->pp_input[ --p_input_bank->i_count ], NULL );
}
vlc_mutex_destroy( &p_input_bank->lock );
}
/*****************************************************************************
* input_CreateThread: creates a new input thread
*****************************************************************************
......
......@@ -4,7 +4,7 @@
* interface, such as command line.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: interface.c,v 1.85 2001/12/30 07:09:56 sam Exp $
* $Id: interface.c,v 1.86 2002/01/07 02:12:30 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -93,7 +93,6 @@ intf_thread_t* intf_Create( void )
/* Initialize structure */
p_intf->b_die = 0;
p_intf->p_input = NULL;
p_intf->b_menu = 0;
p_intf->b_menu_change = 0;
......@@ -127,16 +126,20 @@ static void intf_Manage( intf_thread_t *p_intf )
/* Manage module bank */
module_ManageBank( );
if( ( p_intf->p_input != NULL ) &&
( p_intf->p_input->b_error || p_intf->p_input->b_eof ) )
vlc_mutex_lock( &p_input_bank->lock );
if( p_input_bank->i_count
&& ( p_input_bank->pp_input[0]->b_error
|| p_input_bank->pp_input[0]->b_eof ) )
{
input_DestroyThread( p_intf->p_input, NULL );
p_intf->p_input = NULL;
intf_DbgMsg("Input thread destroyed");
intf_WarnMsg( 3, "intf: input thread destroyed" );
input_DestroyThread( p_input_bank->pp_input[0], NULL );
p_input_bank->pp_input[0] = NULL;
p_input_bank->i_count--;
}
/* If no stream is being played, try to find one */
if( p_intf->p_input == NULL && !p_intf->b_die )
if( !p_input_bank->i_count && !p_intf->b_die )
{
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
......@@ -156,8 +159,10 @@ static void intf_Manage( intf_thread_t *p_intf )
p_main->p_playlist->i_mode = PLAYLIST_FORWARD +
main_GetIntVariable( PLAYLIST_LOOP_VAR,
PLAYLIST_LOOP_DEFAULT );
p_intf->p_input =
intf_WarnMsg( 3, "intf: creating new input thread" );
p_input_bank->pp_input[0] =
input_CreateThread( &p_main->p_playlist->current, NULL );
p_input_bank->i_count++;
}
}
else
......@@ -178,6 +183,8 @@ static void intf_Manage( intf_thread_t *p_intf )
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
vlc_mutex_unlock( &p_input_bank->lock );
}
/*****************************************************************************
......@@ -190,11 +197,13 @@ void intf_Destroy( intf_thread_t *p_intf )
/* Destroy interfaces */
p_intf->pf_close( p_intf );
#if 0
/* Close input thread, if any (blocking) */
if( p_intf->p_input )
{
input_DestroyThread( p_intf->p_input, NULL );
}
#endif
/* Unlock module */
module_Unneed( p_intf->p_module );
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.142 2002/01/04 14:01:35 sam Exp $
* $Id: main.c,v 1.143 2002/01/07 02:12:30 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -227,6 +227,7 @@ static const char *psz_shortopts = "hHvgt:T:u:a:s:c:I:A:V:";
*****************************************************************************/
main_t *p_main;
module_bank_t *p_module_bank;
input_bank_t *p_input_bank;
aout_bank_t *p_aout_bank;
vout_bank_t *p_vout_bank;
......@@ -266,11 +267,13 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
{
main_t main_data; /* root of all data - see main.h */
module_bank_t module_bank;
input_bank_t input_bank;
aout_bank_t aout_bank;
vout_bank_t vout_bank;
p_main = &main_data; /* set up the global variables */
p_module_bank = &module_bank;
p_input_bank = &input_bank;
p_aout_bank = &aout_bank;
p_vout_bank = &vout_bank;
......@@ -388,9 +391,10 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
GetFilenames( i_argc, ppsz_argv );
/*
* Initialize module, aout and vout banks
* Initialize module, input, aout and vout banks
*/
module_InitBank();
input_InitBank();
aout_InitBank();
vout_InitBank();
......@@ -453,8 +457,9 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
}
/*
* Free aout and vout banks
* Free input, aout and vout banks
*/
input_EndBank();
vout_EndBank();
aout_EndBank();
......
......@@ -2,7 +2,7 @@
* modules_plugin.h : Plugin management functions used by the core application.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_plugin.h,v 1.2 2002/01/04 14:01:35 sam Exp $
* $Id: modules_plugin.h,v 1.3 2002/01/07 02:12:30 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -155,6 +155,7 @@ module_error( void )
#define STORE_SYMBOLS( p_symbols ) \
STORE_TRACE_SYMBOLS( p_symbols ) \
(p_symbols)->p_main = p_main; \
(p_symbols)->p_input_bank = p_input_bank; \
(p_symbols)->p_aout_bank = p_aout_bank; \
(p_symbols)->p_vout_bank = p_vout_bank; \
(p_symbols)->main_GetIntVariable = main_GetIntVariable; \
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.154 2002/01/05 03:49:18 sam Exp $
* $Id: video_output.c,v 1.155 2002/01/07 02:12:30 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -695,6 +695,11 @@ static int ReduceHeight( int i_ratio )
int i_dummy = VOUT_ASPECT_FACTOR;
int i_pgcd = 1;
if( !i_ratio )
{
return i_pgcd;
}
/* VOUT_ASPECT_FACTOR is (2^7 * 3^3 * 5^3), we just check for 2, 3 and 5 */
while( !(i_ratio & 1) && !(i_dummy & 1) )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment