mirror of https://code.videolan.org/videolan/vlc
* ./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 :-)
This commit is contained in:
parent
ebd16b8d57
commit
1e053ea0ed
3
Makefile
3
Makefile
|
@ -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 \
|
||||
|
|
|
@ -4897,10 +4897,10 @@ case x"${target_cpu}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
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"
|
||||
|
||||
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"
|
||||
|
@ -6440,9 +6440,6 @@ if test "${enable_mga+set}" = set; then
|
|||
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
|
||||
fi
|
||||
|
||||
|
@ -6484,7 +6481,7 @@ fi
|
|||
# Extract the first word of "sdl12-config", so it can be a program name with args.
|
||||
set dummy sdl12-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:6488: checking for $ac_word" >&5
|
||||
echo "configure:6485: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6524,7 +6521,7 @@ fi
|
|||
# Extract the first word of "sdl11-config", so it can be a program name with args.
|
||||
set dummy sdl11-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:6528: checking for $ac_word" >&5
|
||||
echo "configure:6525: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6565,7 +6562,7 @@ fi
|
|||
# Extract the first word of "sdl-config", so it can be a program name with args.
|
||||
set dummy sdl-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:6569: checking for $ac_word" >&5
|
||||
echo "configure:6566: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6611,17 +6608,17 @@ fi
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:6615: checking for $ac_hdr" >&5
|
||||
echo "configure:6612: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6620 "configure"
|
||||
#line 6617 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -6691,17 +6688,17 @@ fi
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:6695: checking for $ac_hdr" >&5
|
||||
echo "configure:6692: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6700 "configure"
|
||||
#line 6697 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -6730,7 +6727,7 @@ done
|
|||
|
||||
else
|
||||
echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
|
||||
echo "configure:6734: checking for directX headers in ${withval}" >&5
|
||||
echo "configure:6731: checking for directX headers in ${withval}" >&5
|
||||
if test -f ${withval}/include/directx.h
|
||||
then
|
||||
PLUGINS="${PLUGINS} directx"
|
||||
|
@ -6817,7 +6814,7 @@ if test "${enable_gnome+set}" = set; then
|
|||
# Extract the first word of "gnome-config", so it can be a program name with args.
|
||||
set dummy gnome-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:6821: checking for $ac_word" >&5
|
||||
echo "configure:6818: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6862,17 +6859,17 @@ fi
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:6866: checking for $ac_hdr" >&5
|
||||
echo "configure:6863: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6871 "configure"
|
||||
#line 6868 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -6932,7 +6929,7 @@ fi
|
|||
# Extract the first word of "gtk-config", so it can be a program name with args.
|
||||
set dummy gtk-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:6936: checking for $ac_word" >&5
|
||||
echo "configure:6933: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6982,17 +6979,17 @@ fi
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:6986: checking for $ac_hdr" >&5
|
||||
echo "configure:6983: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6991 "configure"
|
||||
#line 6988 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -7049,17 +7046,17 @@ if test x$enable_x11 != xno &&
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:7053: checking for $ac_hdr" >&5
|
||||
echo "configure:7050: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7058 "configure"
|
||||
#line 7055 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:7063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:7060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -7112,17 +7109,17 @@ if test x$enable_xvideo != xno &&
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:7116: checking for $ac_hdr" >&5
|
||||
echo "configure:7113: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7121 "configure"
|
||||
#line 7118 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:7126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:7123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -7162,17 +7159,17 @@ if test "${enable_alsa+set}" = set; then
|
|||
then
|
||||
ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
|
||||
echo "configure:7166: checking for alsa/asoundlib.h" >&5
|
||||
echo "configure:7163: checking for alsa/asoundlib.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7171 "configure"
|
||||
#line 7168 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <alsa/asoundlib.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:7176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:7173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -7189,7 +7186,7 @@ fi
|
|||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
|
||||
echo "configure:7193: checking for main in -lasound" >&5
|
||||
echo "configure:7190: checking for main in -lasound" >&5
|
||||
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -7197,14 +7194,14 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lasound $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7201 "configure"
|
||||
#line 7198 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
main()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,12 +1,79 @@
|
|||
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.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 versioned build-dep to libasound2-dev (Closes: #121057).
|
||||
* 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,6 +439,7 @@ typedef __int64 off_t;
|
|||
typedef struct module_symbols_s
|
||||
{
|
||||
struct main_s* p_main;
|
||||
struct input_bank_s* p_input_bank;
|
||||
struct aout_bank_s* p_aout_bank;
|
||||
struct vout_bank_s* p_vout_bank;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*****************************************************************************
|
||||
* 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,7 +156,8 @@ 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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,221 @@
|
|||
/*****************************************************************************
|
||||
* 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" );
|
||||
____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 )
|
||||
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 *
|
||||
|
|
|
@ -1 +1 @@
|
|||
ggi_SOURCES = ggi.c vout_ggi.c
|
||||
ggi_SOURCES = ggi.c
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
* ggi.c : GGI plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: ggi.c,v 1.10 2001/12/30 07:09:55 sam Exp $
|
||||
* $Id: ggi.c,v 1.11 2002/01/07 02:12:29 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* 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
|
||||
|
@ -26,35 +27,525 @@
|
|||
*****************************************************************************/
|
||||
#include <stdlib.h> /* malloc(), free() */
|
||||
#include <string.h>
|
||||
#include <errno.h> /* ENOMEM */
|
||||
|
||||
#include <ggi/ggi.h>
|
||||
|
||||
#include <videolan/vlc.h>
|
||||
|
||||
#include "video.h"
|
||||
#include "video_output.h"
|
||||
|
||||
#include "intf_msg.h"
|
||||
#include "interface.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
* Local prototypes.
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
static void vout_getfunctions( function_list_t * p_function_list );
|
||||
|
||||
static int vout_Probe ( probedata_t *p_data );
|
||||
static int vout_Create ( vout_thread_t * );
|
||||
static int vout_Init ( vout_thread_t * );
|
||||
static void vout_End ( vout_thread_t * );
|
||||
static void vout_Destroy ( vout_thread_t * );
|
||||
static int vout_Manage ( vout_thread_t * );
|
||||
static void vout_Render ( vout_thread_t *, picture_t * );
|
||||
static void vout_Display ( vout_thread_t *, picture_t * );
|
||||
|
||||
static int OpenDisplay ( vout_thread_t * );
|
||||
static void CloseDisplay ( vout_thread_t * );
|
||||
static int NewPicture ( vout_thread_t *, picture_t * );
|
||||
|
||||
/*****************************************************************************
|
||||
* Building configuration tree
|
||||
*****************************************************************************/
|
||||
MODULE_CONFIG_START
|
||||
ADD_WINDOW( "Configuration for GGI module" )
|
||||
ADD_COMMENT( "For now, the GGI module cannot be configured" )
|
||||
MODULE_CONFIG_STOP
|
||||
|
||||
MODULE_INIT_START
|
||||
p_module->i_capabilities = MODULE_CAPABILITY_NULL
|
||||
| MODULE_CAPABILITY_VOUT;
|
||||
p_module->psz_longname = "General Graphics Interface module";
|
||||
SET_DESCRIPTION( "General Graphics Interface video output" )
|
||||
ADD_CAPABILITY( VOUT, 30 )
|
||||
ADD_SHORTCUT( "ggi" )
|
||||
MODULE_INIT_STOP
|
||||
|
||||
MODULE_ACTIVATE_START
|
||||
_M( vout_getfunctions )( &p_module->p_functions->vout );
|
||||
vout_getfunctions( &p_module->p_functions->vout );
|
||||
MODULE_ACTIVATE_STOP
|
||||
|
||||
MODULE_DEACTIVATE_START
|
||||
MODULE_DEACTIVATE_STOP
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_sys_t: video output GGI method descriptor
|
||||
*****************************************************************************
|
||||
* This structure is part of the video output thread descriptor.
|
||||
* It describes the GGI specific properties of an output thread.
|
||||
*****************************************************************************/
|
||||
typedef struct vout_sys_s
|
||||
{
|
||||
/* GGI system informations */
|
||||
ggi_visual_t p_display; /* display device */
|
||||
|
||||
ggi_mode mode; /* mode descriptor */
|
||||
int i_bits_per_pixel;
|
||||
|
||||
/* Buffer information */
|
||||
ggi_directbuffer * p_buffer[2]; /* buffers */
|
||||
int i_index;
|
||||
|
||||
boolean_t b_must_acquire; /* must be acquired before writing */
|
||||
} vout_sys_t;
|
||||
|
||||
/*****************************************************************************
|
||||
* Functions exported as capabilities. They are declared as static so that
|
||||
* we don't pollute the namespace too much.
|
||||
*****************************************************************************/
|
||||
static void vout_getfunctions( function_list_t * p_function_list )
|
||||
{
|
||||
p_function_list->pf_probe = vout_Probe;
|
||||
p_function_list->functions.vout.pf_create = vout_Create;
|
||||
p_function_list->functions.vout.pf_init = vout_Init;
|
||||
p_function_list->functions.vout.pf_end = vout_End;
|
||||
p_function_list->functions.vout.pf_destroy = vout_Destroy;
|
||||
p_function_list->functions.vout.pf_manage = vout_Manage;
|
||||
p_function_list->functions.vout.pf_render = vout_Render;
|
||||
p_function_list->functions.vout.pf_display = vout_Display;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Probe: probe the video driver and return a score
|
||||
*****************************************************************************
|
||||
* This function tries to initialize GGI and returns a score to the
|
||||
* plugin manager so that it can select the best plugin.
|
||||
*****************************************************************************/
|
||||
static int vout_Probe( probedata_t *p_data )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Create: allocate GGI video thread output method
|
||||
*****************************************************************************
|
||||
* This function allocate and initialize a GGI vout method. It uses some of the
|
||||
* vout properties to choose the correct mode, and change them according to the
|
||||
* mode actually used.
|
||||
*****************************************************************************/
|
||||
int vout_Create( vout_thread_t *p_vout )
|
||||
{
|
||||
/* Allocate structure */
|
||||
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
|
||||
if( p_vout->p_sys == NULL )
|
||||
{
|
||||
intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Open and initialize device */
|
||||
if( OpenDisplay( p_vout ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't initialize GGI display" );
|
||||
free( p_vout->p_sys );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Init: initialize GGI video thread output method
|
||||
*****************************************************************************
|
||||
* This function initialize the GGI display device.
|
||||
*****************************************************************************/
|
||||
int vout_Init( vout_thread_t *p_vout )
|
||||
{
|
||||
int i_index;
|
||||
picture_t *p_pic;
|
||||
|
||||
p_vout->output.i_width = p_vout->p_sys->mode.visible.x;
|
||||
p_vout->output.i_height = p_vout->p_sys->mode.visible.y;
|
||||
p_vout->output.i_aspect = p_vout->p_sys->mode.visible.x
|
||||
* VOUT_ASPECT_FACTOR
|
||||
/ p_vout->p_sys->mode.visible.y;
|
||||
|
||||
switch( p_vout->p_sys->i_bits_per_pixel )
|
||||
{
|
||||
case 8: /* FIXME: set the palette */
|
||||
p_vout->output.i_chroma = FOURCC_BI_RGB; break;
|
||||
case 15:
|
||||
p_vout->output.i_chroma = FOURCC_RV15; break;
|
||||
case 16:
|
||||
p_vout->output.i_chroma = FOURCC_RV16; break;
|
||||
case 24:
|
||||
p_vout->output.i_chroma = FOURCC_BI_BITFIELDS; break;
|
||||
case 32:
|
||||
p_vout->output.i_chroma = FOURCC_BI_BITFIELDS; break;
|
||||
default:
|
||||
intf_ErrMsg( "vout error: unknown screen depth" );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
I_OUTPUTPICTURES = 0;
|
||||
|
||||
/* Try to initialize up to 1 direct buffers */
|
||||
while( I_OUTPUTPICTURES < 1 )
|
||||
{
|
||||
p_pic = NULL;
|
||||
|
||||
/* Find an empty picture slot */
|
||||
for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
|
||||
{
|
||||
if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
|
||||
{
|
||||
p_pic = p_vout->p_picture + i_index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate the picture */
|
||||
if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
p_pic->i_status = DESTROYED_PICTURE;
|
||||
p_pic->i_type = DIRECT_PICTURE;
|
||||
|
||||
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
|
||||
|
||||
I_OUTPUTPICTURES++;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
#if 0
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* Acquire first buffer */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceAcquire( p_b[ 0 ]->resource,
|
||||
GGI_ACTYPE_WRITE );
|
||||
}
|
||||
|
||||
/* Listen to the keyboard and the mouse buttons */
|
||||
ggiSetEventMask( p_vout->p_sys->p_display,
|
||||
emKeyboard | emPtrButtonPress | emPtrButtonRelease );
|
||||
|
||||
/* Set asynchronous display mode -- usually quite faster */
|
||||
ggiAddFlags( p_vout->p_sys->p_display, GGIFLAG_ASYNC );
|
||||
|
||||
return( 0 );
|
||||
#undef p_b
|
||||
#endif
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_End: terminate GGI video thread output method
|
||||
*****************************************************************************
|
||||
* Terminate an output method created by vout_Create
|
||||
*****************************************************************************/
|
||||
void vout_End( vout_thread_t *p_vout )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* Release buffer */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceRelease( p_b[ 0 ]->resource );
|
||||
}
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Destroy: destroy GGI video thread output method
|
||||
*****************************************************************************
|
||||
* Terminate an output method created by vout_Create
|
||||
*****************************************************************************/
|
||||
void vout_Destroy( vout_thread_t *p_vout )
|
||||
{
|
||||
CloseDisplay( p_vout );
|
||||
|
||||
free( p_vout->p_sys );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Manage: handle GGI events
|
||||
*****************************************************************************
|
||||
* This function should be called regularly by video output thread. It returns
|
||||
* a non null value if an error occured.
|
||||
*****************************************************************************/
|
||||
int vout_Manage( vout_thread_t *p_vout )
|
||||
{
|
||||
struct timeval tv = { 0, 1000 }; /* 1 millisecond */
|
||||
gii_event_mask mask;
|
||||
gii_event event;
|
||||
|
||||
mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease;
|
||||
|
||||
ggiEventPoll( p_vout->p_sys->p_display, mask, &tv );
|
||||
|
||||
while( ggiEventsQueued( p_vout->p_sys->p_display, mask) )
|
||||
{
|
||||
ggiEventRead( p_vout->p_sys->p_display, &event, mask);
|
||||
|
||||
switch( event.any.type )
|
||||
{
|
||||
case evKeyRelease:
|
||||
|
||||
switch( event.key.sym )
|
||||
{
|
||||
case 'q':
|
||||
case 'Q':
|
||||
case GIIUC_Escape:
|
||||
/* FIXME pass message ! */
|
||||
p_main->p_intf->b_die = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case evPtrButtonRelease:
|
||||
|
||||
switch( event.pbutton.button )
|
||||
{
|
||||
case GII_PBUTTON_RIGHT:
|
||||
/* FIXME: need locking ! */
|
||||
p_main->p_intf->b_menu_change = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Render: displays previously rendered output
|
||||
*****************************************************************************/
|
||||
void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Display: displays previously rendered output
|
||||
*****************************************************************************/
|
||||
void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* Change display frame */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceRelease( p_b[ 0 ]->resource );
|
||||
}
|
||||
ggiSetDisplayFrame( p_vout->p_sys->p_display,
|
||||
p_b[ 0 ]->frame );
|
||||
|
||||
/* Swap buffers and change write frame */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceAcquire( p_b[ 0 ]->resource,
|
||||
GGI_ACTYPE_WRITE );
|
||||
}
|
||||
ggiSetWriteFrame( p_vout->p_sys->p_display,
|
||||
p_b[ 0 ]->frame );
|
||||
|
||||
/* Flush the output so that it actually displays */
|
||||
ggiFlush( p_vout->p_sys->p_display );
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/* following functions are local */
|
||||
|
||||
/*****************************************************************************
|
||||
* OpenDisplay: open and initialize GGI device
|
||||
*****************************************************************************
|
||||
* Open and initialize display according to preferences specified in the vout
|
||||
* thread fields.
|
||||
*****************************************************************************/
|
||||
static int OpenDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
ggi_color col_fg; /* foreground color */
|
||||
ggi_color col_bg; /* background color */
|
||||
int i_index; /* all purposes index */
|
||||
char *psz_display;
|
||||
|
||||
/* Initialize library */
|
||||
if( ggiInit() )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't initialize GGI library" );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Open display */
|
||||
psz_display = main_GetPszVariable( VOUT_DISPLAY_VAR, NULL );
|
||||
|
||||
p_vout->p_sys->p_display = ggiOpen( psz_display, NULL );
|
||||
|
||||
if( p_vout->p_sys->p_display == NULL )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't open GGI default display" );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Find most appropriate mode */
|
||||
p_vout->p_sys->mode.frames = 2; /* 2 buffers */
|
||||
p_vout->p_sys->mode.visible.x = main_GetIntVariable( VOUT_WIDTH_VAR,
|
||||
VOUT_WIDTH_DEFAULT );
|
||||
p_vout->p_sys->mode.visible.y = main_GetIntVariable( VOUT_HEIGHT_VAR,
|
||||
VOUT_HEIGHT_DEFAULT );
|
||||
p_vout->p_sys->mode.virt.x = GGI_AUTO;
|
||||
p_vout->p_sys->mode.virt.y = GGI_AUTO;
|
||||
p_vout->p_sys->mode.size.x = GGI_AUTO;
|
||||
p_vout->p_sys->mode.size.y = GGI_AUTO;
|
||||
p_vout->p_sys->mode.graphtype = GT_15BIT; /* minimum usable depth */
|
||||
p_vout->p_sys->mode.dpp.x = GGI_AUTO;
|
||||
p_vout->p_sys->mode.dpp.y = GGI_AUTO;
|
||||
ggiCheckMode( p_vout->p_sys->p_display, &p_vout->p_sys->mode );
|
||||
|
||||
/* FIXME: Check that returned mode has some minimum properties */
|
||||
|
||||
/* Set mode */
|
||||
if( ggiSetMode( p_vout->p_sys->p_display, &p_vout->p_sys->mode ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't set GGI mode" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Check buffers properties */
|
||||
p_vout->p_sys->b_must_acquire = 0;
|
||||
for( i_index = 0; i_index < 2; i_index++ )
|
||||
{
|
||||
/* Get buffer address */
|
||||
p_vout->p_sys->p_buffer[ i_index ] =
|
||||
(ggi_directbuffer *)ggiDBGetBuffer( p_vout->p_sys->p_display,
|
||||
i_index );
|
||||
if( p_b[ i_index ] == NULL )
|
||||
{
|
||||
intf_ErrMsg( "vout error: double buffering is not possible" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Check buffer properties */
|
||||
if( ! ( p_b[ i_index ]->type & GGI_DB_SIMPLE_PLB )
|
||||
|| ( p_b[ i_index ]->page_size != 0 )
|
||||
|| ( p_b[ i_index ]->write == NULL )
|
||||
|| ( p_b[ i_index ]->noaccess != 0 )
|
||||
|| ( p_b[ i_index ]->align != 0 ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: incorrect video memory type" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Check if buffer needs to be acquired before write */
|
||||
if( ggiResourceMustAcquire( p_b[ i_index ]->resource ) )
|
||||
{
|
||||
p_vout->p_sys->b_must_acquire = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
intf_DbgMsg("buffers must be acquired");
|
||||
}
|
||||
|
||||
/* Set graphic context colors */
|
||||
col_fg.r = col_fg.g = col_fg.b = -1;
|
||||
col_bg.r = col_bg.g = col_bg.b = 0;
|
||||
if( ggiSetGCForeground(p_vout->p_sys->p_display,
|
||||
ggiMapColor(p_vout->p_sys->p_display,&col_fg)) ||
|
||||
ggiSetGCBackground(p_vout->p_sys->p_display,
|
||||
ggiMapColor(p_vout->p_sys->p_display,&col_bg)) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't set colors" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Set clipping for text */
|
||||
if( ggiSetGCClipping( p_vout->p_sys->p_display, 0, 0,
|
||||
p_vout->p_sys->mode.visible.x,
|
||||
p_vout->p_sys->mode.visible.y ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't set clipping" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* FIXME: set palette in 8bpp */
|
||||
p_vout->p_sys->i_bits_per_pixel = p_b[ 0 ]->buffer.plb.pixelformat->depth;
|
||||
|
||||
return( 0 );
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* CloseDisplay: close and reset GGI device
|
||||
*****************************************************************************
|
||||
* This function returns all resources allocated by OpenDisplay and restore
|
||||
* the original state of the device.
|
||||
*****************************************************************************/
|
||||
static void CloseDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
/* Restore original mode and close display */
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
|
||||
/* Exit library */
|
||||
ggiExit();
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* NewPicture: allocate a picture
|
||||
*****************************************************************************
|
||||
* Returns 0 on success, -1 otherwise
|
||||
*****************************************************************************/
|
||||
static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* We know the chroma, allocate a buffer which will be used
|
||||
* directly by the decoder */
|
||||
p_pic->p->p_pixels = p_b[ 0 ]->write;
|
||||
p_pic->p->i_pixel_bytes = p_b[ 0 ]->buffer.plb.pixelformat->size / 8;
|
||||
p_pic->p->i_lines = p_vout->p_sys->mode.visible.y;
|
||||
|
||||
if( p_b[ 0 ]->buffer.plb.pixelformat->size / 8
|
||||
* p_vout->p_sys->mode.visible.x
|
||||
!= p_b[ 0 ]->buffer.plb.stride )
|
||||
{
|
||||
p_pic->p->b_margin = 1;
|
||||
p_pic->p->b_hidden = 1;
|
||||
p_pic->p->i_pitch = p_b[ 0 ]->buffer.plb.stride;
|
||||
p_pic->p->i_visible_bytes = p_b[ 0 ]->buffer.plb.pixelformat->size / 8
|
||||
* p_vout->p_sys->mode.visible.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_pic->p->b_margin = 0;
|
||||
p_pic->p->i_pitch = p_b[ 0 ]->buffer.plb.stride;
|
||||
}
|
||||
|
||||
/* Only useful for bits_per_pixel != 8 */
|
||||
p_pic->p->i_red_mask = p_b[ 0 ]->buffer.plb.pixelformat->red_mask;
|
||||
p_pic->p->i_green_mask = p_b[ 0 ]->buffer.plb.pixelformat->green_mask;
|
||||
p_pic->p->i_blue_mask = p_b[ 0 ]->buffer.plb.pixelformat->blue_mask;
|
||||
|
||||
p_pic->i_planes = 1;
|
||||
|
||||
return 0;
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
|
|
|
@ -1,434 +0,0 @@
|
|||
/*****************************************************************************
|
||||
* vout_ggi.c: GGI video output display method
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998-2001 VideoLAN
|
||||
* $Id: vout_ggi.c,v 1.14 2001/12/30 07:09:55 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* 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 <errno.h> /* ENOMEM */
|
||||
#include <stdlib.h> /* free() */
|
||||
#include <string.h> /* strerror() */
|
||||
|
||||
#include <ggi/ggi.h>
|
||||
|
||||
#include <videolan/vlc.h>
|
||||
|
||||
#include "video.h"
|
||||
#include "video_output.h"
|
||||
|
||||
#include "intf_msg.h"
|
||||
#include "interface.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_sys_t: video output GGI method descriptor
|
||||
*****************************************************************************
|
||||
* This structure is part of the video output thread descriptor.
|
||||
* It describes the GGI specific properties of an output thread.
|
||||
*****************************************************************************/
|
||||
typedef struct vout_sys_s
|
||||
{
|
||||
/* GGI system informations */
|
||||
ggi_visual_t p_display; /* display device */
|
||||
|
||||
/* Buffer information */
|
||||
ggi_directbuffer * p_buffer[2]; /* buffers */
|
||||
boolean_t b_must_acquire; /* must be acquired before writing */
|
||||
} vout_sys_t;
|
||||
|
||||
/*****************************************************************************
|
||||
* Local prototypes.
|
||||
*****************************************************************************/
|
||||
static int vout_Probe ( probedata_t *p_data );
|
||||
static int vout_Create ( struct vout_thread_s * );
|
||||
static int vout_Init ( struct vout_thread_s * );
|
||||
static void vout_End ( struct vout_thread_s * );
|
||||
static void vout_Destroy ( struct vout_thread_s * );
|
||||
static int vout_Manage ( struct vout_thread_s * );
|
||||
static void vout_Display ( struct vout_thread_s * );
|
||||
|
||||
static int GGIOpenDisplay ( vout_thread_t *p_vout );
|
||||
static void GGICloseDisplay( vout_thread_t *p_vout );
|
||||
|
||||
/*****************************************************************************
|
||||
* Functions exported as capabilities. They are declared as static so that
|
||||
* we don't pollute the namespace too much.
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list )
|
||||
{
|
||||
p_function_list->pf_probe = vout_Probe;
|
||||
p_function_list->functions.vout.pf_create = vout_Create;
|
||||
p_function_list->functions.vout.pf_init = vout_Init;
|
||||
p_function_list->functions.vout.pf_end = vout_End;
|
||||
p_function_list->functions.vout.pf_destroy = vout_Destroy;
|
||||
p_function_list->functions.vout.pf_manage = vout_Manage;
|
||||
p_function_list->functions.vout.pf_display = vout_Display;
|
||||
p_function_list->functions.vout.pf_setpalette = NULL;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Probe: probe the video driver and return a score
|
||||
*****************************************************************************
|
||||
* This function tries to initialize GGI and returns a score to the
|
||||
* plugin manager so that it can select the best plugin.
|
||||
*****************************************************************************/
|
||||
static int vout_Probe( probedata_t *p_data )
|
||||
{
|
||||
if( TestMethod( VOUT_METHOD_VAR, "ggi" ) )
|
||||
{
|
||||
return( 999 );
|
||||
}
|
||||
|
||||
return( 40 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Create: allocate GGI video thread output method
|
||||
*****************************************************************************
|
||||
* This function allocate and initialize a GGI vout method. It uses some of the
|
||||
* vout properties to choose the correct mode, and change them according to the
|
||||
* mode actually used.
|
||||
*****************************************************************************/
|
||||
int vout_Create( vout_thread_t *p_vout )
|
||||
{
|
||||
/* Allocate structure */
|
||||
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
|
||||
if( p_vout->p_sys == NULL )
|
||||
{
|
||||
intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Open and initialize device */
|
||||
if( GGIOpenDisplay( p_vout ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't initialize GGI display" );
|
||||
free( p_vout->p_sys );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Init: initialize GGI video thread output method
|
||||
*****************************************************************************
|
||||
* This function initialize the GGI display device.
|
||||
*****************************************************************************/
|
||||
int vout_Init( vout_thread_t *p_vout )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* Acquire first buffer */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceAcquire( p_b[ p_vout->i_buffer_index ]->resource,
|
||||
GGI_ACTYPE_WRITE );
|
||||
}
|
||||
|
||||
/* Listen to the keyboard and the mouse buttons */
|
||||
ggiSetEventMask( p_vout->p_sys->p_display,
|
||||
emKeyboard | emPtrButtonPress | emPtrButtonRelease );
|
||||
|
||||
/* Set asynchronous display mode -- usually quite faster */
|
||||
ggiAddFlags( p_vout->p_sys->p_display, GGIFLAG_ASYNC );
|
||||
|
||||
return( 0 );
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_End: terminate GGI video thread output method
|
||||
*****************************************************************************
|
||||
* Terminate an output method created by vout_Create
|
||||
*****************************************************************************/
|
||||
void vout_End( vout_thread_t *p_vout )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* Release buffer */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceRelease( p_b[ p_vout->i_buffer_index ]->resource );
|
||||
}
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Destroy: destroy GGI video thread output method
|
||||
*****************************************************************************
|
||||
* Terminate an output method created by vout_Create
|
||||
*****************************************************************************/
|
||||
void vout_Destroy( vout_thread_t *p_vout )
|
||||
{
|
||||
GGICloseDisplay( p_vout );
|
||||
|
||||
free( p_vout->p_sys );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Manage: handle GGI events
|
||||
*****************************************************************************
|
||||
* This function should be called regularly by video output thread. It returns
|
||||
* a non null value if an error occured.
|
||||
*****************************************************************************/
|
||||
int vout_Manage( vout_thread_t *p_vout )
|
||||
{
|
||||
struct timeval tv = { 0, 1000 }; /* 1 millisecond */
|
||||
gii_event_mask mask;
|
||||
gii_event event;
|
||||
|
||||
mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease;
|
||||
|
||||
ggiEventPoll( p_vout->p_sys->p_display, mask, &tv );
|
||||
|
||||
while( ggiEventsQueued( p_vout->p_sys->p_display, mask) )
|
||||
{
|
||||
ggiEventRead( p_vout->p_sys->p_display, &event, mask);
|
||||
|
||||
switch( event.any.type )
|
||||
{
|
||||
case evKeyRelease:
|
||||
|
||||
switch( event.key.sym )
|
||||
{
|
||||
case 'q':
|
||||
case 'Q':
|
||||
case GIIUC_Escape:
|
||||
/* FIXME pass message ! */
|
||||
p_main->p_intf->b_die = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case evPtrButtonRelease:
|
||||
|
||||
switch( event.pbutton.button )
|
||||
{
|
||||
case GII_PBUTTON_RIGHT:
|
||||
/* FIXME: need locking ! */
|
||||
p_main->p_intf->b_menu_change = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Display: displays previously rendered output
|
||||
*****************************************************************************
|
||||
* This function send the currently rendered image to the display, wait until
|
||||
* it is displayed and switch the two rendering buffer, preparing next frame.
|
||||
*****************************************************************************/
|
||||
void vout_Display( vout_thread_t *p_vout )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
/* Change display frame */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceRelease( p_b[ p_vout->i_buffer_index ]->resource );
|
||||
}
|
||||
ggiSetDisplayFrame( p_vout->p_sys->p_display,
|
||||
p_b[ p_vout->i_buffer_index ]->frame );
|
||||
|
||||
/* Swap buffers and change write frame */
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
ggiResourceAcquire( p_b[ (p_vout->i_buffer_index + 1) & 1]->resource,
|
||||
GGI_ACTYPE_WRITE );
|
||||
}
|
||||
ggiSetWriteFrame( p_vout->p_sys->p_display,
|
||||
p_b[ (p_vout->i_buffer_index + 1) & 1]->frame );
|
||||
|
||||
/* Flush the output so that it actually displays */
|
||||
ggiFlush( p_vout->p_sys->p_display );
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/* following functions are local */
|
||||
|
||||
/*****************************************************************************
|
||||
* GGIOpenDisplay: open and initialize GGI device
|
||||
*****************************************************************************
|
||||
* Open and initialize display according to preferences specified in the vout
|
||||
* thread fields.
|
||||
*****************************************************************************/
|
||||
static int GGIOpenDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
#define p_b p_vout->p_sys->p_buffer
|
||||
ggi_mode mode; /* mode descriptor */
|
||||
ggi_color col_fg; /* foreground color */
|
||||
ggi_color col_bg; /* background color */
|
||||
int i_index; /* all purposes index */
|
||||
char *psz_display;
|
||||
|
||||
/* Initialize library */
|
||||
if( ggiInit() )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't initialize GGI library" );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Open display */
|
||||
psz_display = main_GetPszVariable( VOUT_DISPLAY_VAR, NULL );
|
||||
|
||||
p_vout->p_sys->p_display = ggiOpen( psz_display, NULL );
|
||||
|
||||
if( p_vout->p_sys->p_display == NULL )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't open GGI default display" );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Find most appropriate mode */
|
||||
mode.frames = 2; /* 2 buffers */
|
||||
mode.visible.x = main_GetIntVariable( VOUT_WIDTH_VAR,
|
||||
VOUT_WIDTH_DEFAULT );
|
||||
mode.visible.y = main_GetIntVariable( VOUT_HEIGHT_VAR,
|
||||
VOUT_HEIGHT_DEFAULT );
|
||||
mode.virt.x = GGI_AUTO;
|
||||
mode.virt.y = GGI_AUTO;
|
||||
mode.size.x = GGI_AUTO;
|
||||
mode.size.y = GGI_AUTO;
|
||||
mode.graphtype = GT_15BIT; /* minimum usable screen depth */
|
||||
mode.dpp.x = GGI_AUTO;
|
||||
mode.dpp.y = GGI_AUTO;
|
||||
ggiCheckMode( p_vout->p_sys->p_display, &mode );
|
||||
|
||||
/* FIXME: Check that returned mode has some minimum properties */
|
||||
|
||||
/* Set mode */
|
||||
if( ggiSetMode( p_vout->p_sys->p_display, &mode ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't set GGI mode" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Check buffers properties */
|
||||
p_vout->p_sys->b_must_acquire = 0;
|
||||
for( i_index = 0; i_index < 2; i_index++ )
|
||||
{
|
||||
/* Get buffer address */
|
||||
p_vout->p_sys->p_buffer[ i_index ] =
|
||||
(ggi_directbuffer *)ggiDBGetBuffer( p_vout->p_sys->p_display,
|
||||
i_index );
|
||||
if( p_b[ i_index ] == NULL )
|
||||
{
|
||||
intf_ErrMsg( "vout error: double buffering is not possible" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Check buffer properties */
|
||||
if( ! ( p_b[ i_index ]->type & GGI_DB_SIMPLE_PLB )
|
||||
|| ( p_b[ i_index ]->page_size != 0 )
|
||||
|| ( p_b[ i_index ]->write == NULL )
|
||||
|| ( p_b[ i_index ]->noaccess != 0 )
|
||||
|| ( p_b[ i_index ]->align != 0 ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: incorrect video memory type" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Check if buffer needs to be acquired before write */
|
||||
if( ggiResourceMustAcquire( p_b[ i_index ]->resource ) )
|
||||
{
|
||||
p_vout->p_sys->b_must_acquire = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( p_vout->p_sys->b_must_acquire )
|
||||
{
|
||||
intf_DbgMsg("buffers must be acquired");
|
||||
}
|
||||
|
||||
/* Set graphic context colors */
|
||||
col_fg.r = col_fg.g = col_fg.b = -1;
|
||||
col_bg.r = col_bg.g = col_bg.b = 0;
|
||||
if( ggiSetGCForeground(p_vout->p_sys->p_display,
|
||||
ggiMapColor(p_vout->p_sys->p_display,&col_fg)) ||
|
||||
ggiSetGCBackground(p_vout->p_sys->p_display,
|
||||
ggiMapColor(p_vout->p_sys->p_display,&col_bg)) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't set colors" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Set clipping for text */
|
||||
if( ggiSetGCClipping(p_vout->p_sys->p_display, 0, 0,
|
||||
mode.visible.x, mode.visible.y ) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't set clipping" );
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
ggiExit();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Set thread information */
|
||||
p_vout->i_width = mode.visible.x;
|
||||
p_vout->i_height = mode.visible.y;
|
||||
p_vout->i_bytes_per_line = p_b[ 0 ]->buffer.plb.stride;
|
||||
p_vout->i_screen_depth = p_b[ 0 ]->buffer.plb.pixelformat->depth;
|
||||
p_vout->i_bytes_per_pixel = p_b[ 0 ]->buffer.plb.pixelformat->size / 8;
|
||||
p_vout->i_red_mask = p_b[ 0 ]->buffer.plb.pixelformat->red_mask;
|
||||
p_vout->i_green_mask = p_b[ 0 ]->buffer.plb.pixelformat->green_mask;
|
||||
p_vout->i_blue_mask = p_b[ 0 ]->buffer.plb.pixelformat->blue_mask;
|
||||
|
||||
/* FIXME: set palette in 8bpp */
|
||||
|
||||
/* Set and initialize buffers */
|
||||
p_vout->pf_setbuffers( p_vout, p_b[ 0 ]->write, p_b[ 1 ]->write );
|
||||
|
||||
return( 0 );
|
||||
#undef p_b
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* GGICloseDisplay: close and reset GGI device
|
||||
*****************************************************************************
|
||||
* This function returns all resources allocated by GGIOpenDisplay and restore
|
||||
* the original state of the device.
|
||||
*****************************************************************************/
|
||||
static void GGICloseDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
/* Restore original mode and close display */
|
||||
ggiClose( p_vout->p_sys->p_display );
|
||||
|
||||
/* Exit library */
|
||||
ggiExit();
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
glide_SOURCES = glide.c vout_glide.c
|
||||
glide_SOURCES = glide.c
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* glide.c : 3dfx Glide plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: glide.c,v 1.9 2001/12/30 07:09:55 sam Exp $
|
||||
* $Id: glide.c,v 1.10 2002/01/07 02:12:29 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
|
@ -24,37 +24,377 @@
|
|||
/*****************************************************************************
|
||||
* Preamble
|
||||
*****************************************************************************/
|
||||
#include <errno.h> /* ENOMEM */
|
||||
#include <stdlib.h> /* malloc(), free() */
|
||||
#include <string.h>
|
||||
|
||||
#ifndef __linux__
|
||||
# include <conio.h> /* for glide ? */
|
||||
#endif
|
||||
#include <glide.h>
|
||||
#include <linutil.h> /* Glide kbhit() and getch() */
|
||||
|
||||
#include <videolan/vlc.h>
|
||||
|
||||
#include "video.h"
|
||||
#include "video_output.h"
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
#define GLIDE_WIDTH 800
|
||||
#define GLIDE_HEIGHT 600
|
||||
#define GLIDE_BITS_PER_PLANE 16
|
||||
#define GLIDE_BYTES_PER_PIXEL 2
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
* Local prototypes.
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
static void vout_getfunctions( function_list_t * p_function_list );
|
||||
|
||||
static int vout_Probe ( probedata_t *p_data );
|
||||
static int vout_Create ( vout_thread_t * );
|
||||
static int vout_Init ( vout_thread_t * );
|
||||
static void vout_End ( vout_thread_t * );
|
||||
static void vout_Destroy ( vout_thread_t * );
|
||||
static int vout_Manage ( vout_thread_t * );
|
||||
static void vout_Render ( vout_thread_t *, picture_t * );
|
||||
static void vout_Display ( vout_thread_t *, picture_t * );
|
||||
|
||||
static int NewPicture ( vout_thread_t *, picture_t * );
|
||||
static int OpenDisplay ( vout_thread_t * );
|
||||
static void CloseDisplay ( vout_thread_t * );
|
||||
|
||||
/*****************************************************************************
|
||||
* Building configuration tree
|
||||
*****************************************************************************/
|
||||
MODULE_CONFIG_START
|
||||
ADD_WINDOW( "Configuration for Glide module" )
|
||||
ADD_COMMENT( "For now, the Glide module cannot be configured" )
|
||||
MODULE_CONFIG_STOP
|
||||
|
||||
MODULE_INIT_START
|
||||
p_module->i_capabilities = MODULE_CAPABILITY_NULL
|
||||
| MODULE_CAPABILITY_VOUT;
|
||||
p_module->psz_longname = "3dfx Glide module";
|
||||
SET_DESCRIPTION( "3dfx Glide module" )
|
||||
ADD_CAPABILITY( VOUT, 20 )
|
||||
ADD_SHORTCUT( "glide" )
|
||||
ADD_SHORTCUT( "3dfx" )
|
||||
MODULE_INIT_STOP
|
||||
|
||||
MODULE_ACTIVATE_START
|
||||
_M( vout_getfunctions )( &p_module->p_functions->vout );
|
||||
vout_getfunctions( &p_module->p_functions->vout );
|
||||
MODULE_ACTIVATE_STOP
|
||||
|
||||
MODULE_DEACTIVATE_START
|
||||
MODULE_DEACTIVATE_STOP
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_sys_t: Glide video output method descriptor
|
||||
*****************************************************************************
|
||||
* This structure is part of the video output thread descriptor.
|
||||
* It describes the Glide specific properties of an output thread.
|
||||
*****************************************************************************/
|
||||
typedef struct vout_sys_s
|
||||
{
|
||||
GrLfbInfo_t p_buffer_info; /* back buffer info */
|
||||
|
||||
/* Dummy video memory */
|
||||
byte_t * p_video; /* base adress */
|
||||
size_t i_page_size; /* page size */
|
||||
|
||||
} vout_sys_t;
|
||||
|
||||
/*****************************************************************************
|
||||
* Functions exported as capabilities. They are declared as static so that
|
||||
* we don't pollute the namespace too much.
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list )
|
||||
{
|
||||
p_function_list->pf_probe = vout_Probe;
|
||||
p_function_list->functions.vout.pf_create = vout_Create;
|
||||
p_function_list->functions.vout.pf_init = vout_Init;
|
||||
p_function_list->functions.vout.pf_end = vout_End;
|
||||
p_function_list->functions.vout.pf_destroy = vout_Destroy;
|
||||
p_function_list->functions.vout.pf_manage = vout_Manage;
|
||||
p_function_list->functions.vout.pf_render = vout_Render;
|
||||
p_function_list->functions.vout.pf_display = vout_Display;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Probe: probe the video driver and return a score
|
||||
*****************************************************************************
|
||||
* This function tries to initialize SDL and returns a score to the
|
||||
* plugin manager so that it can select the best plugin.
|
||||
*****************************************************************************/
|
||||
static int vout_Probe( probedata_t *p_data )
|
||||
{
|
||||
/* We could do a grSstQueryBoards( GrHwConfiguration *hwConfig ) at
|
||||
* this point, but if the user didn't configure his 3dfx card, we
|
||||
* have great chances to segfault here. So we'd better assume
|
||||
* everything is fine and worry only if we really need to use Glide */
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Create: allocates Glide video thread output method
|
||||
*****************************************************************************
|
||||
* This function allocates and initializes a Glide vout method.
|
||||
*****************************************************************************/
|
||||
int vout_Create( vout_thread_t *p_vout )
|
||||
{
|
||||
/* Allocate structure */
|
||||
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
|
||||
if( p_vout->p_sys == NULL )
|
||||
{
|
||||
intf_ErrMsg("error: %s", strerror(ENOMEM) );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Open and initialize device */
|
||||
if( OpenDisplay( p_vout ) )
|
||||
{
|
||||
intf_ErrMsg("vout error: can't open display");
|
||||
free( p_vout->p_sys );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Init: initialize Glide video thread output method
|
||||
*****************************************************************************/
|
||||
int vout_Init( vout_thread_t *p_vout )
|
||||
{
|
||||
int i_index;
|
||||
picture_t *p_pic;
|
||||
|
||||
I_OUTPUTPICTURES = 0;
|
||||
|
||||
/* Try to initialize up to 1 direct buffers */
|
||||
while( I_OUTPUTPICTURES < 1 )
|
||||
{
|
||||
p_pic = NULL;
|
||||
|
||||
/* Find an empty picture slot */
|
||||
for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
|
||||
{
|
||||
if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
|
||||
{
|
||||
p_pic = p_vout->p_picture + i_index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate the picture */
|
||||
if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
p_pic->i_status = DESTROYED_PICTURE;
|
||||
p_pic->i_type = DIRECT_PICTURE;
|
||||
|
||||
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
|
||||
|
||||
I_OUTPUTPICTURES++;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_End: terminate Glide video thread output method
|
||||
*****************************************************************************/
|
||||
void vout_End( vout_thread_t *p_vout )
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Destroy: destroy Glide video thread output method
|
||||
*****************************************************************************
|
||||
* Terminate an output method created by vout_CreateOutputMethod
|
||||
*****************************************************************************/
|
||||
void vout_Destroy( vout_thread_t *p_vout )
|
||||
{
|
||||
CloseDisplay( p_vout );
|
||||
free( p_vout->p_sys );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Manage: handle Glide events
|
||||
*****************************************************************************
|
||||
* This function should be called regularly by video output thread. It manages
|
||||
* console events. It returns a non null value on error.
|
||||
*****************************************************************************/
|
||||
int vout_Manage( vout_thread_t *p_vout )
|
||||
{
|
||||
int buf;
|
||||
|
||||
/* very Linux specific - see tlib.c in Glide for other versions */
|
||||
while( kbhit() )
|
||||
{
|
||||
buf = getch();
|
||||
|
||||
switch( (char)buf )
|
||||
{
|
||||
case 'q':
|
||||
p_main->p_intf->b_die = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Render: renders previously calculated output
|
||||
*****************************************************************************/
|
||||
void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Display: displays previously rendered output
|
||||
*****************************************************************************/
|
||||
void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
|
||||
|
||||
{
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
|
||||
grBufferSwap( 0 );
|
||||
|
||||
if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER,
|
||||
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
|
||||
&p_vout->p_sys->p_buffer_info) == FXFALSE )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
|
||||
}
|
||||
}
|
||||
|
||||
/* following functions are local */
|
||||
|
||||
/*****************************************************************************
|
||||
* OpenDisplay: open and initialize 3dfx device
|
||||
*****************************************************************************/
|
||||
|
||||
static int OpenDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
static char version[80];
|
||||
GrHwConfiguration hwconfig;
|
||||
GrScreenResolution_t resolution = GR_RESOLUTION_800x600;
|
||||
GrLfbInfo_t p_front_buffer_info; /* front buffer info */
|
||||
|
||||
p_vout->p_sys->i_page_size = GLIDE_WIDTH * GLIDE_HEIGHT
|
||||
* GLIDE_BYTES_PER_PIXEL;
|
||||
|
||||
/* Map two framebuffers a the very beginning of the fb */
|
||||
p_vout->p_sys->p_video = malloc( p_vout->p_sys->i_page_size * 2 );
|
||||
if( (int)p_vout->p_sys->p_video == -1 )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't map video memory (%s)",
|
||||
strerror(errno) );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
grGlideGetVersion( version );
|
||||
grGlideInit();
|
||||
|
||||
if( !grSstQueryHardware(&hwconfig) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't get 3dfx hardware config" );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
grSstSelect( 0 );
|
||||
if( !grSstWinOpen(0, resolution, GR_REFRESH_60Hz,
|
||||
GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't open 3dfx screen" );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* disable dithering */
|
||||
//grDitherMode( GR_DITHER_DISABLE );
|
||||
|
||||
/* clear both buffers */
|
||||
grRenderBuffer( GR_BUFFER_BACKBUFFER );
|
||||
grBufferClear( 0, 0, 0 );
|
||||
grRenderBuffer( GR_BUFFER_FRONTBUFFER );
|
||||
grBufferClear( 0, 0, 0 );
|
||||
grRenderBuffer( GR_BUFFER_BACKBUFFER );
|
||||
|
||||
p_vout->p_sys->p_buffer_info.size = sizeof( GrLfbInfo_t );
|
||||
p_front_buffer_info.size = sizeof( GrLfbInfo_t );
|
||||
|
||||
/* lock the buffers to find their adresses */
|
||||
if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_FRONTBUFFER,
|
||||
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
|
||||
&p_front_buffer_info) == FXFALSE )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't take 3dfx front buffer lock" );
|
||||
grGlideShutdown();
|
||||
return( 1 );
|
||||
}
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_FRONTBUFFER );
|
||||
|
||||
if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER,
|
||||
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
|
||||
&p_vout->p_sys->p_buffer_info) == FXFALSE )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
|
||||
grGlideShutdown();
|
||||
return( 1 );
|
||||
}
|
||||
grLfbUnlock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
|
||||
grBufferClear( 0, 0, 0 );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* CloseDisplay: close and reset 3dfx device
|
||||
*****************************************************************************
|
||||
* Returns all resources allocated by OpenDisplay and restore the original
|
||||
* state of the device.
|
||||
*****************************************************************************/
|
||||
static void CloseDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
/* unlock the hidden buffer */
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
|
||||
/* shutdown Glide */
|
||||
grGlideShutdown();
|
||||
free( p_vout->p_sys->p_video );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* NewPicture: allocate a picture
|
||||
*****************************************************************************
|
||||
* Returns 0 on success, -1 otherwise
|
||||
*****************************************************************************/
|
||||
static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
|
||||
{
|
||||
/* We know the chroma, allocate a buffer which will be used
|
||||
* directly by the decoder */
|
||||
p_pic->p->p_pixels = p_vout->p_sys->p_video;
|
||||
p_pic->p->i_pixel_bytes = GLIDE_BYTES_PER_PIXEL;
|
||||
p_pic->p->i_lines = GLIDE_HEIGHT;
|
||||
|
||||
p_pic->p->b_margin = 1;
|
||||
p_pic->p->b_hidden = 1;
|
||||
p_pic->p->i_visible_bytes = GLIDE_WIDTH * GLIDE_BYTES_PER_PIXEL;
|
||||
p_pic->p->i_pitch = p_vout->p_sys->p_buffer_info.strideInBytes;
|
||||
/*1024 * GLIDE_BYTES_PER_PIXEL*/
|
||||
|
||||
p_pic->p->i_red_mask = 0xf800;
|
||||
p_pic->p->i_green_mask = 0x07e0;
|
||||
p_pic->p->i_blue_mask = 0x001f;
|
||||
|
||||
p_pic->i_planes = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,331 +0,0 @@
|
|||
/*****************************************************************************
|
||||
* vout_glide.c: 3dfx video output display method for 3dfx cards
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: vout_glide.c,v 1.10 2001/12/30 07:09:55 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 <errno.h> /* ENOMEM */
|
||||
#include <stdlib.h> /* free() */
|
||||
#include <string.h> /* strerror() */
|
||||
|
||||
#include <videolan/vlc.h>
|
||||
|
||||
#ifndef __linux__
|
||||
# include <conio.h> /* for glide ? */
|
||||
#endif
|
||||
#include <glide.h>
|
||||
#include <linutil.h> /* Glide kbhit() and getch() */
|
||||
|
||||
#include "video.h"
|
||||
#include "video_output.h"
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
#define GLIDE_WIDTH 800
|
||||
#define GLIDE_HEIGHT 600
|
||||
#define GLIDE_BITS_PER_PLANE 16
|
||||
#define GLIDE_BYTES_PER_PIXEL 2
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_sys_t: Glide video output method descriptor
|
||||
*****************************************************************************
|
||||
* This structure is part of the video output thread descriptor.
|
||||
* It describes the Glide specific properties of an output thread.
|
||||
*****************************************************************************/
|
||||
typedef struct vout_sys_s
|
||||
{
|
||||
GrLfbInfo_t p_buffer_info; /* back buffer info */
|
||||
|
||||
/* Dummy video memory */
|
||||
byte_t * p_video; /* base adress */
|
||||
size_t i_page_size; /* page size */
|
||||
|
||||
} vout_sys_t;
|
||||
|
||||
/*****************************************************************************
|
||||
* Local prototypes.
|
||||
*****************************************************************************/
|
||||
static int vout_Probe ( probedata_t *p_data );
|
||||
static int vout_Create ( struct vout_thread_s * );
|
||||
static int vout_Init ( struct vout_thread_s * );
|
||||
static void vout_End ( struct vout_thread_s * );
|
||||
static void vout_Destroy ( struct vout_thread_s * );
|
||||
static int vout_Manage ( struct vout_thread_s * );
|
||||
static void vout_Display ( struct vout_thread_s * );
|
||||
|
||||
static int GlideOpenDisplay ( vout_thread_t *p_vout );
|
||||
static void GlideCloseDisplay ( vout_thread_t *p_vout );
|
||||
|
||||
/*****************************************************************************
|
||||
* Functions exported as capabilities. They are declared as static so that
|
||||
* we don't pollute the namespace too much.
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list )
|
||||
{
|
||||
p_function_list->pf_probe = vout_Probe;
|
||||
p_function_list->functions.vout.pf_create = vout_Create;
|
||||
p_function_list->functions.vout.pf_init = vout_Init;
|
||||
p_function_list->functions.vout.pf_end = vout_End;
|
||||
p_function_list->functions.vout.pf_destroy = vout_Destroy;
|
||||
p_function_list->functions.vout.pf_manage = vout_Manage;
|
||||
p_function_list->functions.vout.pf_display = vout_Display;
|
||||
p_function_list->functions.vout.pf_setpalette = NULL;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Probe: probe the video driver and return a score
|
||||
*****************************************************************************
|
||||
* This function tries to initialize SDL and returns a score to the
|
||||
* plugin manager so that it can select the best plugin.
|
||||
*****************************************************************************/
|
||||
static int vout_Probe( probedata_t *p_data )
|
||||
{
|
||||
if( TestMethod( VOUT_METHOD_VAR, "glide" ) )
|
||||
{
|
||||
return( 999 );
|
||||
}
|
||||
|
||||
/* We could do a grSstQueryBoards( GrHwConfiguration *hwConfig ) at
|
||||
* this point, but if the user didn't configure his 3dfx card, we
|
||||
* have great chances to segfault here. So we'd better assume
|
||||
* everything is fine and worry only if we really need to use Glide */
|
||||
return( 20 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Create: allocates Glide video thread output method
|
||||
*****************************************************************************
|
||||
* This function allocates and initializes a Glide vout method.
|
||||
*****************************************************************************/
|
||||
int vout_Create( vout_thread_t *p_vout )
|
||||
{
|
||||
/* Allocate structure */
|
||||
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
|
||||
if( p_vout->p_sys == NULL )
|
||||
{
|
||||
intf_ErrMsg("error: %s", strerror(ENOMEM) );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Open and initialize device */
|
||||
if( GlideOpenDisplay( p_vout ) )
|
||||
{
|
||||
intf_ErrMsg("vout error: can't open display");
|
||||
free( p_vout->p_sys );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Init: initialize Glide video thread output method
|
||||
*****************************************************************************/
|
||||
int vout_Init( vout_thread_t *p_vout )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_End: terminate Glide video thread output method
|
||||
*****************************************************************************/
|
||||
void vout_End( vout_thread_t *p_vout )
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Destroy: destroy Glide video thread output method
|
||||
*****************************************************************************
|
||||
* Terminate an output method created by vout_CreateOutputMethod
|
||||
*****************************************************************************/
|
||||
void vout_Destroy( vout_thread_t *p_vout )
|
||||
{
|
||||
GlideCloseDisplay( p_vout );
|
||||
free( p_vout->p_sys );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Manage: handle Glide events
|
||||
*****************************************************************************
|
||||
* This function should be called regularly by video output thread. It manages
|
||||
* console events. It returns a non null value on error.
|
||||
*****************************************************************************/
|
||||
int vout_Manage( vout_thread_t *p_vout )
|
||||
{
|
||||
int buf;
|
||||
|
||||
/* very Linux specific - see tlib.c in Glide for other versions */
|
||||
while( kbhit() )
|
||||
{
|
||||
buf = getch();
|
||||
|
||||
switch( (char)buf )
|
||||
{
|
||||
case 'q':
|
||||
p_main->p_intf->b_die = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* vout_Display: displays previously rendered output
|
||||
*****************************************************************************
|
||||
* This function send the currently rendered image to Glide image, waits until
|
||||
* it is displayed and switch the two rendering buffers, preparing next frame.
|
||||
*****************************************************************************/
|
||||
void vout_Display( vout_thread_t *p_vout )
|
||||
{
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
|
||||
grBufferSwap( 0 );
|
||||
|
||||
if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER,
|
||||
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
|
||||
&p_vout->p_sys->p_buffer_info) == FXFALSE )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
|
||||
}
|
||||
}
|
||||
|
||||
/* following functions are local */
|
||||
|
||||
/*****************************************************************************
|
||||
* GlideOpenDisplay: open and initialize 3dfx device
|
||||
*****************************************************************************/
|
||||
|
||||
static int GlideOpenDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
static char version[80];
|
||||
GrHwConfiguration hwconfig;
|
||||
GrScreenResolution_t resolution = GR_RESOLUTION_800x600;
|
||||
GrLfbInfo_t p_front_buffer_info; /* front buffer info */
|
||||
|
||||
p_vout->i_width = GLIDE_WIDTH;
|
||||
p_vout->i_height = GLIDE_HEIGHT;
|
||||
p_vout->i_screen_depth = GLIDE_BITS_PER_PLANE;
|
||||
p_vout->i_bytes_per_pixel = GLIDE_BYTES_PER_PIXEL;
|
||||
/* bytes per line value overriden later */
|
||||
p_vout->i_bytes_per_line = 1024 * GLIDE_BYTES_PER_PIXEL;
|
||||
|
||||
p_vout->p_sys->i_page_size = GLIDE_WIDTH * GLIDE_HEIGHT
|
||||
* GLIDE_BYTES_PER_PIXEL;
|
||||
|
||||
p_vout->i_red_mask = 0xf800;
|
||||
p_vout->i_green_mask = 0x07e0;
|
||||
p_vout->i_blue_mask = 0x001f;
|
||||
|
||||
/* Map two framebuffers a the very beginning of the fb */
|
||||
p_vout->p_sys->p_video = malloc( p_vout->p_sys->i_page_size * 2 );
|
||||
if( (int)p_vout->p_sys->p_video == -1 )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't map video memory (%s)",
|
||||
strerror(errno) );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
grGlideGetVersion( version );
|
||||
grGlideInit();
|
||||
|
||||
if( !grSstQueryHardware(&hwconfig) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't get 3dfx hardware config" );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
grSstSelect( 0 );
|
||||
if( !grSstWinOpen(0, resolution, GR_REFRESH_60Hz,
|
||||
GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1) )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't open 3dfx screen" );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* disable dithering */
|
||||
//grDitherMode( GR_DITHER_DISABLE );
|
||||
|
||||
/* clear both buffers */
|
||||
grRenderBuffer( GR_BUFFER_BACKBUFFER );
|
||||
grBufferClear( 0, 0, 0 );
|
||||
grRenderBuffer( GR_BUFFER_FRONTBUFFER );
|
||||
grBufferClear( 0, 0, 0 );
|
||||
grRenderBuffer( GR_BUFFER_BACKBUFFER );
|
||||
|
||||
p_vout->p_sys->p_buffer_info.size = sizeof( GrLfbInfo_t );
|
||||
p_front_buffer_info.size = sizeof( GrLfbInfo_t );
|
||||
|
||||
/* lock the buffers to find their adresses */
|
||||
if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_FRONTBUFFER,
|
||||
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
|
||||
&p_front_buffer_info) == FXFALSE )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't take 3dfx front buffer lock" );
|
||||
grGlideShutdown();
|
||||
return( 1 );
|
||||
}
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_FRONTBUFFER );
|
||||
|
||||
if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER,
|
||||
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
|
||||
&p_vout->p_sys->p_buffer_info) == FXFALSE )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
|
||||
grGlideShutdown();
|
||||
return( 1 );
|
||||
}
|
||||
grLfbUnlock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
|
||||
/* Get the number of bytes per line */
|
||||
p_vout->i_bytes_per_line = p_vout->p_sys->p_buffer_info.strideInBytes;
|
||||
|
||||
grBufferClear( 0, 0, 0 );
|
||||
|
||||
/* Set and initialize buffers */
|
||||
p_vout->pf_setbuffers( p_vout, p_vout->p_sys->p_buffer_info.lfbPtr,
|
||||
p_front_buffer_info.lfbPtr );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* GlideCloseDisplay: close and reset 3dfx device
|
||||
*****************************************************************************
|
||||
* Returns all resources allocated by GlideOpenDisplay and restore the original
|
||||
* state of the device.
|
||||
*****************************************************************************/
|
||||
static void GlideCloseDisplay( vout_thread_t *p_vout )
|
||||
{
|
||||
/* unlock the hidden buffer */
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
|
||||
/* shutdown Glide */
|
||||
grGlideShutdown();
|
||||
free( p_vout->p_sys->p_video );
|
||||
}
|
||||
|
|
@ -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>
|
||||
* Stéphane 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>
|
||||
* Stéphane 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>
|
||||
* Stéphane 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* gtk_menu.c : functions to handle menu items.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: gtk_menu.c,v 1.17 2001/12/30 07:09:55 sam Exp $
|
||||
* $Id: gtk_menu.c,v 1.18 2002/01/07 02:12:29 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Stéphane Borel <stef@via.ecp.fr>
|
||||
|
@ -94,7 +94,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf );
|
|||
GTK_OBJECT( p_intf->p_sys->window ), (menu) ) ); \
|
||||
p_es = (es_descriptor_t*)user_data; \
|
||||
\
|
||||
input_ToggleES( p_intf->p_input, p_es, menuitem->active ); \
|
||||
input_ToggleES( p_input_bank->pp_input[0], p_es, menuitem->active ); \
|
||||
\
|
||||
p_intf->p_sys->b_update = menuitem->active; \
|
||||
\
|
||||
|
@ -158,24 +158,24 @@ void GtkPopupNavigationToggle( GtkCheckMenuItem * menuitem,
|
|||
gint i_title = DATA2TITLE( user_data );
|
||||
gint i_chapter = DATA2CHAPTER( 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 != p_intf->p_input->stream.pp_areas[i_title] )
|
||||
if( p_area != p_input_bank->pp_input[0]->stream.pp_areas[i_title] )
|
||||
{
|
||||
p_area = p_intf->p_input->stream.pp_areas[i_title];
|
||||
p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_title];
|
||||
p_intf->p_sys->b_title_update = 1;
|
||||
}
|
||||
|
||||
p_area->i_part = i_chapter;
|
||||
|
||||
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
|
||||
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
|
||||
|
||||
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 );
|
||||
|
||||
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
|
||||
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,16 +190,16 @@ void GtkMenubarTitleToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
|
|||
if( menuitem->active && !p_intf->p_sys->b_title_update )
|
||||
{
|
||||
gint i_title = (gint)((long)user_data);
|
||||
input_ChangeArea( p_intf->p_input,
|
||||
p_intf->p_input->stream.pp_areas[i_title] );
|
||||
input_ChangeArea( p_input_bank->pp_input[0],
|
||||
p_input_bank->pp_input[0]->stream.pp_areas[i_title] );
|
||||
|
||||
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 );
|
||||
p_intf->p_sys->b_title_update = 0;
|
||||
|
||||
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
|
||||
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -217,13 +217,13 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
|
|||
GtkWidget * p_popup_menu;
|
||||
|
||||
p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
|
||||
p_area = p_intf->p_input->stream.p_selected_area;
|
||||
p_area = p_input_bank->pp_input[0]->stream.p_selected_area;
|
||||
i_chapter = (gint)((long)user_data);
|
||||
|
||||
if( menuitem->active && !p_intf->p_sys->b_chapter_update )
|
||||
{
|
||||
p_area->i_part = i_chapter;
|
||||
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
|
||||
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
|
||||
|
||||
snprintf( psz_chapter, 4, "%02d", p_area->i_part );
|
||||
psz_chapter[ 4 ] = '\0';
|
||||
|
@ -233,13 +233,13 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
|
|||
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
|
||||
p_intf->p_sys->p_popup ), "popup_navigation" ) );
|
||||
|
||||
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
GtkTitleMenu( p_intf, p_popup_menu, GtkPopupNavigationToggle );
|
||||
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
|
||||
p_intf->p_sys->b_chapter_update = 0;
|
||||
|
||||
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
|
||||
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,16 +259,16 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
|
|||
{ \
|
||||
p_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( \
|
||||
p_intf->p_sys->window ), (menu) ) ); \
|
||||
p_area = p_intf->p_input->stream.p_selected_area; \
|
||||
p_area = p_input_bank->pp_input[0]->stream.p_selected_area; \
|
||||
p_area->i_angle = (gint)((long)user_data); \
|
||||
\
|
||||
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area ); \
|
||||
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); \
|
||||
\
|
||||
p_intf->p_sys->b_angle_update = 1; \
|
||||
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock ); \
|
||||
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); \
|
||||
GtkRadioMenu( p_intf, p_menu, NULL, "Angle", \
|
||||
p_area->i_angle_nb, p_area->i_angle, (callback) ); \
|
||||
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock ); \
|
||||
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); \
|
||||
p_intf->p_sys->b_angle_update = 0; \
|
||||
}
|
||||
|
||||
|
@ -391,10 +391,10 @@ static gint GtkRadioMenu( intf_thread_t * p_intf,
|
|||
* We have to release the lock since input_ToggleES needs it */
|
||||
if( p_item_selected != NULL )
|
||||
{
|
||||
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_selected ),
|
||||
TRUE );
|
||||
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
}
|
||||
|
||||
/* be sure that menu is sensitive, if there are several items */
|
||||
|
@ -473,15 +473,15 @@ static gint GtkLanguageMenus( gpointer p_data,
|
|||
p_item_active = NULL;
|
||||
i_item = 0;
|
||||
|
||||
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
|
||||
/* create a set of language buttons and append them to the container */
|
||||
for( i = 0 ; i < p_intf->p_input->stream.i_es_number ; i++ )
|
||||
for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_es_number ; i++ )
|
||||
{
|
||||
if( p_intf->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++;
|
||||
strcpy( psz_name, p_intf->p_input->stream.pp_es[i]->psz_desc );
|
||||
strcpy( psz_name, p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc );
|
||||
if( psz_name[0] == '\0' )
|
||||
{
|
||||
snprintf( psz_name, GTK_MENU_LABEL_SIZE,
|
||||
|
@ -493,7 +493,7 @@ static gint GtkLanguageMenus( gpointer p_data,
|
|||
p_group =
|
||||
gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) );
|
||||
|
||||
if( p_es == p_intf->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;
|
||||
|
@ -504,13 +504,13 @@ static gint GtkLanguageMenus( gpointer p_data,
|
|||
/* setup signal hanling */
|
||||
gtk_signal_connect( GTK_OBJECT( p_item ), "toggled",
|
||||
GTK_SIGNAL_FUNC( pf_toggle ),
|
||||
(gpointer)( p_intf->p_input->stream.pp_es[i] ) );
|
||||
(gpointer)( p_input_bank->pp_input[0]->stream.pp_es[i] ) );
|
||||
|
||||
gtk_menu_append( GTK_MENU( p_menu ), p_item );
|
||||
}
|
||||
}
|
||||
|
||||
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
|
||||
/* link the new menu to the menubar item */
|
||||
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu );
|
||||
|
@ -582,7 +582,7 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
p_chapter_submenu = NULL;
|
||||
p_chapter_menu_item = NULL;
|
||||
p_item_active = NULL;
|
||||
i_title_nb = p_intf->p_input->stream.i_area_nb;
|
||||
i_title_nb = p_input_bank->pp_input[0]->stream.i_area_nb;
|
||||
|
||||
/* loop on titles */
|
||||
for( i_title = 1 ; i_title < i_title_nb ; i_title++ )
|
||||
|
@ -606,7 +606,7 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
}
|
||||
|
||||
snprintf( psz_name, GTK_MENU_LABEL_SIZE, "Title %d (%d)", i_title,
|
||||
p_intf->p_input->stream.pp_areas[i_title]->i_part_nb );
|
||||
p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb );
|
||||
psz_name[ GTK_MENU_LABEL_SIZE - 1 ] = '\0';
|
||||
#if 0
|
||||
if( pf_toggle == on_menubar_title_toggle )
|
||||
|
@ -616,8 +616,8 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
p_title_group =
|
||||
gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_title_item ) );
|
||||
|
||||
if( p_intf->p_input->stream.pp_areas[i_title] ==
|
||||
p_intf->p_input->stream.p_selected_area )
|
||||
if( p_input_bank->pp_input[0]->stream.pp_areas[i_title] ==
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area )
|
||||
{
|
||||
p_item_active = p_title_item;
|
||||
}
|
||||
|
@ -626,9 +626,9 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
gtk_signal_connect( GTK_OBJECT( p_title_item ),
|
||||
"toggled",
|
||||
GTK_SIGNAL_FUNC( pf_toggle ),
|
||||
(gpointer)(p_intf->p_input->stream.pp_areas[i_title]) );
|
||||
(gpointer)(p_input_bank->pp_input[0]->stream.pp_areas[i_title]) );
|
||||
|
||||
if( p_intf->p_input->stream.i_area_nb > 1 )
|
||||
if( p_input_bank->pp_input[0]->stream.i_area_nb > 1 )
|
||||
{
|
||||
/* be sure that menu is sensitive */
|
||||
gtk_widget_set_sensitive( p_navigation, TRUE );
|
||||
|
@ -642,7 +642,7 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
#if 1
|
||||
p_chapter_menu = gtk_menu_new();
|
||||
i_chapter_nb =
|
||||
p_intf->p_input->stream.pp_areas[i_title]->i_part_nb;
|
||||
p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb;
|
||||
|
||||
for( i_chapter = 0 ; i_chapter < i_chapter_nb ; i_chapter++ )
|
||||
{
|
||||
|
@ -677,8 +677,8 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
GTK_RADIO_MENU_ITEM( p_item ) );
|
||||
gtk_widget_show( p_item );
|
||||
|
||||
#define p_area p_intf->p_input->stream.pp_areas[i_title]
|
||||
if( ( p_area == p_intf->p_input->stream.p_selected_area ) &&
|
||||
#define p_area p_input_bank->pp_input[0]->stream.pp_areas[i_title]
|
||||
if( ( p_area == p_input_bank->pp_input[0]->stream.p_selected_area ) &&
|
||||
( p_area->i_part == i_chapter + 1 ) )
|
||||
{
|
||||
p_item_active = p_item;
|
||||
|
@ -713,17 +713,17 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_title_item ),
|
||||
p_chapter_menu );
|
||||
|
||||
if( p_intf->p_input->stream.pp_areas[i_title]->i_part_nb > 1 )
|
||||
if( p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb > 1 )
|
||||
{
|
||||
/* be sure that menu is sensitive */
|
||||
gtk_widget_set_sensitive( p_navigation, TRUE );
|
||||
}
|
||||
#else
|
||||
GtkRadioMenu( p_intf, p_title_item, p_chapter_group, "Chapter",
|
||||
p_intf->p_input->stream.pp_areas[i_title]->i_part_nb,
|
||||
p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb,
|
||||
i_title * 100,
|
||||
p_intf->p_input->stream.p_selected_area->i_part +
|
||||
p_intf->p_input->stream.p_selected_area->i_id *100,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_part +
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_id *100,
|
||||
pf_toggle );
|
||||
|
||||
#endif
|
||||
|
@ -757,13 +757,13 @@ static gint GtkTitleMenu( gpointer p_data,
|
|||
* We have to release the lock since input_ToggleES needs it */
|
||||
if( p_item_active != NULL )
|
||||
{
|
||||
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
|
||||
TRUE );
|
||||
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
}
|
||||
#if 0
|
||||
if( p_intf->p_input->stream.i_area_nb > 1 )
|
||||
if( p_input_bank->pp_input[0]->stream.i_area_nb > 1 )
|
||||
{
|
||||
/* be sure that menu is sensitive */
|
||||
gtk_widget_set_sensitive( p_navigation, TRUE );
|
||||
|
@ -790,7 +790,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
p_intf->p_sys->b_audio_update |= p_intf->p_sys->b_title_update;
|
||||
p_intf->p_sys->b_spu_update |= p_intf->p_sys->b_title_update;
|
||||
|
||||
// vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
|
||||
// vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
|
||||
if( p_intf->p_sys->b_title_update )
|
||||
{
|
||||
|
@ -799,12 +799,12 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
|
||||
p_intf->p_sys->p_window ), "menubar_title" ) );
|
||||
GtkRadioMenu( p_intf, p_menubar_menu, NULL, "Title",
|
||||
p_intf->p_input->stream.i_area_nb - 1,
|
||||
p_intf->p_input->stream.p_selected_area->i_id,
|
||||
p_input_bank->pp_input[0]->stream.i_area_nb - 1,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_id,
|
||||
GtkMenubarTitleToggle );
|
||||
|
||||
snprintf( psz_title, 4, "%d",
|
||||
p_intf->p_input->stream.p_selected_area->i_id );
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_id );
|
||||
psz_title[ 4 ] = '\0';
|
||||
gtk_label_set_text( p_intf->p_sys->p_label_title, psz_title );
|
||||
|
||||
|
@ -820,8 +820,8 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
GtkTitleMenu( p_intf, p_popup_menu, GtkPopupNavigationToggle );
|
||||
#if 0
|
||||
GtkRadioMenu( p_intf, p_menubar_menu, NULL, "Title",
|
||||
p_intf->p_input->stream.i_area_nb - 1,
|
||||
p_intf->p_input->stream.p_selected_area->i_id,
|
||||
p_input_bank->pp_input[0]->stream.i_area_nb - 1,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_id,
|
||||
on_menubar_chapter_toggle );
|
||||
#endif
|
||||
|
||||
|
@ -829,18 +829,18 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
p_intf->p_sys->p_window ), "menubar_chapter" ) );
|
||||
|
||||
GtkRadioMenu( p_intf, p_menubar_menu, NULL, "Chapter",
|
||||
p_intf->p_input->stream.p_selected_area->i_part_nb,
|
||||
p_intf->p_input->stream.p_selected_area->i_part,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_part,
|
||||
GtkMenubarChapterToggle );
|
||||
|
||||
|
||||
snprintf( psz_chapter, 4, "%d",
|
||||
p_intf->p_input->stream.p_selected_area->i_part );
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_part );
|
||||
psz_chapter[ 4 ] = '\0';
|
||||
gtk_label_set_text( p_intf->p_sys->p_label_chapter, psz_chapter );
|
||||
|
||||
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 = 0;
|
||||
}
|
||||
|
@ -850,15 +850,15 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
|
||||
p_intf->p_sys->p_window ), "menubar_angle" ) );
|
||||
GtkRadioMenu( p_intf, p_menubar_menu, NULL, "Angle",
|
||||
p_intf->p_input->stream.p_selected_area->i_angle_nb,
|
||||
p_intf->p_input->stream.p_selected_area->i_angle,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_angle_nb,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_angle,
|
||||
GtkMenubarAngleToggle );
|
||||
|
||||
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
|
||||
p_intf->p_sys->p_popup ), "popup_angle" ) );
|
||||
GtkRadioMenu( p_intf, p_popup_menu, NULL, "Angle",
|
||||
p_intf->p_input->stream.p_selected_area->i_angle_nb,
|
||||
p_intf->p_input->stream.p_selected_area->i_angle,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_angle_nb,
|
||||
p_input_bank->pp_input[0]->stream.p_selected_area->i_angle,
|
||||
GtkPopupAngleToggle );
|
||||
|
||||
p_intf->p_sys->b_angle_update = 0;
|
||||
|
@ -868,20 +868,20 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
p_audio_es = NULL;
|
||||
p_spu_es = NULL;
|
||||
|
||||
for( i = 0 ; i < p_intf->p_input->stream.i_selected_es_number ; i++ )
|
||||
for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_selected_es_number ; i++ )
|
||||
{
|
||||
if( p_intf->p_input->stream.pp_selected_es[i]->i_cat == AUDIO_ES )
|
||||
if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat == AUDIO_ES )
|
||||
{
|
||||
p_audio_es = p_intf->p_input->stream.pp_selected_es[i];
|
||||
p_audio_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i];
|
||||
}
|
||||
|
||||
if( p_intf->p_input->stream.pp_selected_es[i]->i_cat == SPU_ES )
|
||||
if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat == SPU_ES )
|
||||
{
|
||||
p_spu_es = p_intf->p_input->stream.pp_selected_es[i];
|
||||
p_spu_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i];
|
||||
}
|
||||
}
|
||||
|
||||
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
|
||||
/* audio menus */
|
||||
if( p_intf->p_sys->b_audio_update )
|
||||
|
@ -923,7 +923,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
|
|||
p_intf->p_sys->b_spu_update = 0;
|
||||
}
|
||||
|
||||
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
|
||||
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
* Stéphane 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>
|
||||
* Stéphane 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
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
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->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 <= 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 <= 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) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue