Commit 5c77dc27 authored by Unknown's avatar Unknown

This commit was manufactured by cvs2svn to create tag 'v0_4_4'.

parent c8d6aecd
......@@ -176,6 +176,10 @@ E: alexis.guillard@bt.com
D: IPv6
S: United Kingdom
N: Roine Gustafsson
E: roine@popstar.com
D: spudec bug fixes
N: Shane Harper
E: shanegh@optusnet.com.au
D: SDL plugin fixes and enhancements
......@@ -299,6 +303,10 @@ D: Many ports (Mac OS X, iPAQ, *BSD, Solaris...)
D: documentation
S: France
N: Benjamin Mironer
E: bmironer@noos.fr
D: Mac OS X fixes
N: Arkadiusz Miskiewicz
E: misiek@pld.ORG.PL
D: autoconf and Makefile patches
......@@ -320,6 +328,11 @@ E: pomel@via.ecp.fr
C: pomel
S: France
N: Remco Poortinga
E: poortinga@telin.nl
D: IPv6 multicast patch
S: Netherlands
N: Jean-Paul Saman
E: jpsaman@wxs.nl
D: libmad plug-in
......
List of known vlc bugs $Id: BUGS,v 1.13 2002/05/20 22:30:19 sam Exp $
List of known vlc bugs $Id: BUGS,v 1.13.2.1 2002/07/11 07:58:53 tcastley Exp $
Please try to keep this file up to date. Also, grep for FIXME in the
source files for more and more bugs to fix.
......@@ -36,6 +36,9 @@ Video output:
* On-the-fly resizing when using a chroma transformation doesn't work for
all plugins. Currently it is only implemented for x11 and SDL.
* The SPU decoder does not respect the pitch of the output buffer. This
causes distortion of subtitles on GeForce cards in BeOS (and Windows I think).
Chroma transformations:
* Most chroma transformation modules completely ignore margins.
......
......@@ -2,9 +2,188 @@
# ChangeLog for vlc #
#===================#
HEAD
0.4.4
Sun, 11 Aug 2002 01:18:13 +0200
* Nothing yet.
* ./src/misc/messages.c: fixed an extremely old buffer overflow.
* ./plugins/spudec/spu_decoder.c: fixed a moronic endianness bug.
* ./plugins/dvd/dvd.c: added a --dvd-css-method config option to the dvd
plugin.
* ./include/threads_funcs.h: fixed the --fast-mutex option.
* ./plugins/directx/vout_directx.*: the directx vout plugin now uses the
IID_IDirectDrawSurface2 interface, this shouldn't break anything and we
should now support WinNT4+DirectX3. Added support for YUY2 overlays because
a few graphics cards only support this. Some code cleanup too.
* ./plugins/directx/vout_events.c: small bugfix.
* ./plugins/network/ipv6.c: attempt to fix the win32 IPv6 implementation.
Multicast should even work (untested) although we'll need to find a way to
replace if_nametoindex() tohave a fully functionnal win32 port.
* ./include/threads.h, ./include/threads_funcs.h: reverted Win32 pthread
implementation to the old code. Fixed vlc_cond_broadcast() for WinNT/2K/XP.
Additional vlc_cond_* implementations for Win9x.
* ./src/interface/main.c: renamed --fast_pthread option into --fast-mutex.
Added a--win9x-cv-method option to choose which vlc_cond_* implementation
we want on Win9x.
* ./plugins/avi/avi.c: kludge to play AVI files created by ffmpeg.
0.4.3
Fri, 26 Jul 2002 00:03:13 +0200
* ./README.MacOSX.rtf : updated README.
* ./plugins/macosx/vout_macosx.c : additional QuickTime fix, thanks to
David Eldred from Apple.
* ./include/threads_funcs.h: Win32 compilation fix.
* ./plugins/macosx/vout_macosx.m : fixed _the_ bug with QuickTime 6.
* ./plugins/access/http.c: we are now parsing the http return code and
failing cleanly if it is >= 400.
* ./plugins/mpeg_system/mpeg_es.c, ./src/input/input_ext-dec.c: fixed
a deadlock issue with demuxers waiting on p_fifo->data_lock.
* ./src/input/input_ext-plugins.c: fixed a memory leak.
* ./plugins/access/http.c: fixed a bug with HTTP/1.0 servers.
* ./src/interface/main.c: new --mtu option.
* ./configure.in: fixed nanosleep detection on some platforms.
* ./plugins/beos/*: created a wrapper class for VLC functions and
interaction, improved file and disk opening, fixed drag and drop, added
right click menu and always on top mode.
* ./plugins/beos/VideoWindow.h: fixed pop-up menu's radio mode.
* ./plugins/beos/VideoWindow.h: fixed changing workspaces problem.
* ./plugins/beos/VideoWindow.h: added a popup menu to enable changing.
0.4.2
Sun, 7 Jul 2002 22:15:33 +0200
* ./plugins/beos/VideoWindow.h: changed default bitmap to 16bit to fix
green distortion problem.
* ./plugins/network/ipv6.c: enabled IPv6 multicast support.
* ./plugins/dvd/dvd_es.c: error in selecting SPU stream.
* ./plugins/spudec/spu_decoder.c: endianness fix for subtitles colour.
* ./plugins/spudec/spu_decoder.c: little hack for preventing blank alpha
palette.
* ./plugins/spudec/spu_decoder.c: subtitle transparency support.
* ./plugins/macosx: new controls for audio output, and deinterlacing
support.
* ./plugins/macosx: fixed a bug with language and subtitle menus.
* ./plugins/access/http.c: should be more tolerant with old servers and
non-seekable streams.
* ./plugins/filter/deinterlace.c: backported new deinterlacing routines.
* ./include/threads.h, ./include/threads_funcs.h: backported the new Win32
cond_wait implementation from MAIN.
* ./plugins/gtk/gnome_callbacks.c: fixed a crash when activating preferences
from the popup menu.
0.4.1
Mon, 3 Jun 2002 23:43:35 +0200
* ./plugins/gtk/gnome.glade: added lines this #@%$! Glade had munched, fixes
a segfault in the Gnome popup menu when toggling the interface.
* ./configure.in, ./plugins/mpeg_system/mpeg_ts.c: fixed libdvbpsi handling.
* ./src/misc/configuration.c: fixed the --nofoo option handling.
* ./src/interface/main.c: fixed two compilation warnings under Solaris.
* ./plugins/avi/avi.c, ./plugins/mpeg_system/mpeg_audio.c: ES will be
selected only once.
* ./plugins/win32/waveout.c: waveOutUnprepareHeader() was never being
called. This should fix the memory leak some people reported when using
the waveout plugin.
* ./src/misc/netutils.c: factored code common to the interfaces into the
network_ChannelJoin function.
* ./plugins/mga/xmga.c, ./plugins/x11/xcommon.c, ./plugins/sdl/vout_sdl.c,
./plugins/directx/vout_events.c: we can now use keys F1 to F12 to switch
channels from the video output window.
* ./plugins/motion/motionmmx.c: MMX motion optimizations courtesy of
Vladimir Chernyshov <greengrass@writeme.com>.
* ./plugins/dvdread/dvdread.c: disabled the dvdread plugin because it
currently sucks.
* ./src/misc/configuration.c, ./src/interface/main.c: we now accept --nofoo
and --no-foo as negations for --foo. Also, the --help output is nicer.
* ./plugins/macosx/*: rewrote the net panel for OS X
* ./plugins/qnx/vout_qnx.c: QNX compilation fix.
* ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
which caused subtitles to appear slanted in odd width windows.
* ./plugins/gtk/gtk_display.c, ./plugins/win32/mainframe.cpp: we deactivate
popup menus when no stream is being played, even in network mode.
* ./src/input/mpeg_system.c: removed unnecessarily verbose message.
* ./src/video_output/video_output.c: fixed the "picture has invalid status"
bug which might have been the cause of crashes.
* ./plugins/filter/crop.c: attempt at an automatic border cropping filter,
using "--filter crop --autocrop".
* ./vlc.spec: added missing filters to the RPM generation.
* ./plugins/macosx/*: channel change support on Mac OS X.
* ./extras/MacOSX/Resources/vlc.icns: new OS X icon, courtesy of Benjamin
Mironer <bmironer@noos.fr>.
* ./plugins/filter/crop.c: crop filter. Usage examples:
--filter crop --crop-geometry 640x480
--filter crop --crop-geometry 320x200+10+10
* ./plugins/macosx/intf_vlc_wrapper.m: fixed a bug in the chapter handling.
* ./plugins/macosx/vout_vlc_wrapper.m: more keystrokes.
* ./plugins/chroma/i420_yuy2.h: simplified the chroma code. Please test
under BeOS and QNX.
* ./plugins/macosx/intf_vlc_wrapper.m: fix for non-ASCII filenames in the
MacOS X interface, courtesy of Watanabe Go <go@dsl.gr.jp>.
* ./plugins/chroma/i420_yuy2.h: fixed an old overflow bug spotted by
Rudolf Cornelissen.
* ./plugins/chroma/i420_rgb16.c: fix for skewed display in software RV32
mode, courtesy of Pascal Levesque.
* ./plugins/beos/InterfaceWindow.h: stopped more than one playlist being
opened.
* ./plugins/beos/InterfaceWindow.cpp: fixed segfault on exit with playlist
open.
* ./plugins/beos/vout_beos.cpp: corrected size of output window.
* ./plugins/a52/a52.c, ./plugins/satellite/satellite_tools.c: compilation
fixes for Solaris.
* ./plugins/sdl/aout_sdl.c: fixed an endianness issue created by a
brain-dead developer :p
* ./plugins/win32/mainframe.cpp: the "Eject" button is enabled only after we
played a dvd or vcd.
* ./plugins/win32/mainframe.cpp: the toolbar is now flat and less cubist.
* ./plugins/win32/mainframe.cpp: got rid of the ugly slider with some winXP
skins.
* ./plugins/win32/messages.cpp: added a config option to limit the number of
messages in the log window (default is set to 500).
* ./plugins/mpeg_vdec/vpar_headers.c: don't try to deference a null
pointer.
* ./plugins/gtk/gnome.c: compilation fix.
* ./src/misc/netutils.c: removed the obsolete artificial delay when switching
channels.
* ./src/interface/intf_eject.c: added ejection code for Win32.
* ./plugins/win32/*: enabled the "Eject" button (thanks Ipkiss).
* ./include/configuration.h: changed ADD_BOOL and ADD_BOOL_WITH_SHORT config
macros to accept a default value as an argument.
* ./src/misc/configuration.c: modified the command line parsing to accept
--foo and --no-foo when a "foo" boolean config option is defined.
* ./src/interface/main.c: modified the help menu to indicate whether the
option is enabled or disabled by default.
* ./src/video_output/video_output.c: when the video output hasn't received
a new picture for a while, it redisplays the last displayed one. This will
be useful for DVD menus, but also solves the "picture becomes black when
vlc is paused" issue.
* ./plugins/dummy/dummy.c: added a CATEGORY_HINT to the config.
* ./plugins/x11/xcommon.c: small change to the ToggleFullscreen routine
to avoid a flickering during the switch.
* ./plugins/filters/*: fixed inconsistencies.
* ./plugins/win32/mainframe.dfm: new icons for the toolbar buttons.
* ./plugins/win32/network.cpp: URL can now start with "http://" in the
Network dialog box.
* ./plugins/win32/about.dfm: updated the About dialog box.
* ./include/video.h: added a b_force flag to picture_t so that we can force
the display of an image even if it is late.
* ./plugins/filter/*: filters are now configurable through the configuration
system. Patch from Sigmund Augdal <sigmunau@stud.ntnu.no>.
* ./po/vlc.pot: updated potfile.
* ./po/pl.po: polish translation, courtesy of Arkadiusz Lipiec
<A.Lipiec@elka.pw.edu.pl>.
* ./debian/control: updated Debian package descriptions.
* ./plugins/aa/aa.c: removed all palette code as it was unused.
* ./plugins/aa/aa.c: moved the aa_fastrender call from vout_Display to
vout_Render.
* ./plugins/aa/aa.c: added support for resizing and right-click menu.
* ./src/input/mpeg_system.c: in order to make ac3 working in avi file, moved
some code from ac3 decoder to mpeg_system.c. (skip 3 bytes is now done in
mpeg_system.c and no longer in ac3 audio decoder).
* src/misc/netutils.c: tests if message from vlcs begins with 'E:' or 'I:'
instead of testing 'E: ' and 'I: ' (to simplify miniVLCS).
* ./plugins/avi/avi.c, ./plugins/avi/libioRIFF.c: added more safety tests.
* ./include/inpu_ext-dec.h: added a check to fifo->b_die after the call
to BitstreamNextDataPacket() in GetChunk().
0.4.0
Thu, 23 May 2002 01:27:05 +0200
......
......@@ -102,6 +102,7 @@ PLUGINS_TARGETS := a52/a52 \
filter/filter_distort \
filter/filter_wall \
filter/filter_clone \
filter/filter_crop \
fx/fx_scope \
ggi/ggi \
glide/glide \
......@@ -368,7 +369,7 @@ dist:
for i in Makefile.in.in POTFILES.in ; do cp po/$$i tmp/vlc/po ; done
# Copy misc files
cp FAQ AUTHORS COPYING TODO todo.pl ChangeLog* README* INSTALL* \
ABOUT-NLS BUGS MODULES vlc.spec \
ABOUT-NLS BUGS plugins/LIST vlc.spec \
Makefile Makefile.*.in Makefile.dep Makefile.modules \
configure configure.in install-sh install-win32 macosx-dmg \
config.sub config.guess aclocal.m4 mkinstalldirs \
......
{\rtf1\mac\ansicpg10000\cocoartf100 {\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fmodern\fcharset77 Courier; } {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww11240\viewh10380\viewkind0 \hyphauto1\hyphfactor90 \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc \f0\fs48 \cf0 VideoLAN Client (VLC) version 0.4\ Mac OS X-specific information \fs24 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \cf0 \ \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qj \cf0 Welcome to the VideoLAN Client ! VLC is a multi-purpose mutimedia tool : it can play DVDs and VCDs, or read a stream from the network. It also supports DivX/MPEG-4 files and is unaffected by the dreaded .avi bug which can cause choppy sound when playing DivX in Quicktime. VLC has originally been developed for GNU/Linux systems, but has been ported to numerous operating systems, including Mac OS X and Win32. The Mac OS X port is a bit young and immature, as you will notice, and there are many caveats. We are working hard to improve it, and if you think you can help us in any way, please drop us a line.\ \ You may find the following frequentely asked questions useful :\ \ \f1\b \ul 1. How do I install ? \f0\b0 \ulnone \ When you download VLC, you will end up with a vlc-0.4.0.dmg file. Doubleclick, or drop it on the application Disk Copy, to open this file. An icon will now appear on your Desktop, right beside your drive(s). Open it and drag the vlc application from the resulting window to the place where you want to install it. Most often this is /Applications.\ \ \ \f1\b \ul 2. How do use VLC? \f0\b0 \ulnone \ To use VLC, you will need to open the application first and then from the "File" menu open the file or disk, you would like to view. Doubleclicking a file will result in Quicktime trying to open it and Quicktime can not benefit from the advantages VLC brings.\ \f1\b \ul \ \ 3. How do I read an SVCD ? \f0\b0 \ulnone \ VLC is currently unable to read SVCD directly from the drive. SVCDs contain plain MPEG-2 files which can be directly read. Just copy the .dat files in the SVCD onto your hard drive, and use the "Open File" menu item in VLC (drag and drop doesn't work yet).\ \ \ \f1\b \ul 4. The video is choppy ! It's like we're dropping frames\ \f0\b0 \ulnone That's the normal behavior when the CPU isn't fast enough to decode all frames. Though there is some room for improvement, do never expect VLC to be able to decode MPEG-2 streams on a low-end G3 machine. Apple DVD player uses specific hardware accelerations from the video board of those systems, and we currently lack documentation to do the same. If you think you have information which might help us, please contact us, otherwise please don't complain about this.\ \ If VLC is slow on your G4 system, try and quit or hide all running applications. See with \f2 top -u \f0 in a terminal window which applications take the CPU. Minimizing the VLC controller window might help, too. Be aware of bouncing icons in the dock. Bounces seriously effect the performance of VLC. The same goes for any time interval process (Checking mail every 2 minutes).\ \ \ \f1\b \ul 5. I only get a black picture !\ \f0\b0 \ulnone We haven't found the reason why some people get this problem. However, users have indicated a workaround : switch your screen depth to thousands of colors instead of millions. If you think you have information to help us find the bug, please drop us a mail.\ \ \ \f1\b \ul 6. How do I hide the mouse cursor ? \f0\b0 \ulnone \ Just double-click on the movie.\ \ \ \f1\b \ul 7. How do remove VLC ? \f0\b0 \ulnone \ Simply drag VLC from the place where you have installed it, to the Trash.\ \ \ Thanks for reading this file. For additional information, subscribe to the vlc mailing list on \ul http://www.videolan.org/.\ulnone \ -- \ Christophe Massiot <massiot@via.ecp.fr>, for the VideoLAN team.\ $Id: README.MacOSX.rtf,v 1.3 2002/05/23 21:42:43 massiot Exp $}
\ No newline at end of file
{\rtf1\mac\ansicpg10000\cocoartf100
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fmodern\fcharset77 Courier;
}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww11240\viewh10380\viewkind0
\hyphauto1\hyphfactor90
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
\f0\fs48 \cf0 VideoLAN Client (VLC) version 0.4\
Mac OS X-specific information
\fs24 \
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \
\
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qj
\cf0 Welcome to the VideoLAN Client ! VLC is a multi-purpose mutimedia tool : it can play DVDs and VCDs, or read a stream from the network. It also supports DivX/MPEG-4 files and is unaffected by the dreaded .avi bug which can cause choppy sound when playing DivX in Quicktime. VLC has originally been developed for GNU/Linux systems, but has been ported to numerous operating systems, including Mac OS X and Win32. The Mac OS X port is a bit young and immature, as you will notice, and there are many caveats. We are working hard to improve it, and if you think you can help us in any way, please drop us a line.\
\
You may find the following frequentely asked questions useful :\
\
\f1\b \ul 1. How do I install ?
\f0\b0 \ulnone \
When you download VLC, you will end up with a vlc-0.4.3.dmg file. Double-click, or drop it on the application Disk Copy, to open this file. An icon will now appear on your Desktop, right beside your drive(s). Open it and drag the vlc application from the resulting window to the place where you want to install it. Most often this is /Applications.\
\
\
\f1\b \ul 2. How do use VLC?
\f0\b0 \ulnone \
To use VLC, you will need to open the application first and then from the "File" menu open the file or disk, you would like to view. Doubleclicking a file will result in QuickTime Player trying to open it and QuickTime Player can not benefit from the advantages VLC brings.\
\f1\b \ul \
\
3. How do I read an SVCD ?
\f0\b0 \ulnone \
VLC is currently unable to read SVCD directly from the drive. SVCDs contain plain MPEG-2 files which can be directly read. Just copy the .dat files in the SVCD onto your hard drive, and use the "Open File" menu item in VLC (drag and drop doesn't work yet). Some SVCDs can be read if you tell VLC they're VCDs, in the "Open Disc" dialog.\
\
\
\f1\b \ul 4. The video is choppy ! It's like we're dropping frames\
\f0\b0 \ulnone That's the normal behavior when the CPU isn't fast enough to decode all frames. Though there is some room for improvement, do never expect VLC to be able to decode MPEG-2 streams on a low-end G3 machine. Apple DVD player uses specific hardware accelerations from the video board of those systems, and we currently lack documentation to do the same. If you think you have information which might help us, please contact us, otherwise please don't complain about this.\
\
If VLC is slow on your G4 system, try and quit or hide all running applications. See with
\f2 top -u
\f0 in a terminal window which applications take the CPU. Minimizing the VLC controller window might help, too. Be aware of bouncing icons in the dock. Bounces seriously effect the performance of VLC. The same goes for any time interval process (Checking mail every 2 minutes).\
\
\
\f1\b \ul 5. How do I hide the mouse cursor ?
\f0\b0 \ulnone \
Just double-click on the movie.\
\
\
\f1\b \ul 6. How do I remove VLC ?
\f0\b0 \ulnone \
Simply drag VLC from the place where you have installed it, to the Trash.\
\
\
\f1\b \ul 7. Where can I find an older version for Mac OS 9 ?\
\f0\b0 \ulnone There is no version for Mac OS 9. VLC is originally a UNIX application and has never been ported to Mac OS 9. Considering the amount of differences between Mac OS 9 and modern systems, it would require a tremendous work to port VLC. We do not plan to do it. So please don't ask.\
\
\
\f1\b \ul 8. How do I enable deinterlacing ?\
\f0\b0 \ulnone You must select the "Deinterlace" menu item
\f1\b before
\f0\b0 opening any file. If the item is selected while reading a file, nothing will happen. This is a known issue, please do not report it.\
\
\
Thanks for reading this file. For additional information, subscribe to the vlc mailing list on \ul http://www.videolan.org/.\ulnone \
-- \
Christophe Massiot <massiot@via.ecp.fr>, for the VideoLAN team.\
$Id: README.MacOSX.rtf,v 1.3.2.4 2002/07/25 22:46:26 massiot Exp $}
\ No newline at end of file
......@@ -47,7 +47,7 @@ Urgency: Wishlist
Description: Share stream information between vlc and vls
vls should send misc TS packets to let us know what the stream PID
contain, such as the language, or the subtitle palette.
Status: Todo
Status: Done (collective work)
Task: 0x59
Difficulty: Hard
......@@ -137,7 +137,7 @@ Description: Fix all known DVD playback issues
A few DVDs are still reported not to work at all. Try to find what is
causing this, have a more robust DVD input, and list all discs reported
to work flawlessly to prevent bug regression.
Status: Todo
Status: Done (collective work)
Task: 0x4e
Difficulty: Hard
......@@ -169,7 +169,7 @@ Urgency: Normal
Description: Write AVI input plugin
.avi files can use MPEG codec, if this is the case it shouldn't be
hard to read those files -> Meuuh
Status: Todo
Status: Done 23 Apr 2002 (fenrir)
Task: 0x4a
Difficulty: Medium
......@@ -459,7 +459,7 @@ Difficulty: Hard
Urgency: Wishlist
Description: MP3 support
The vlc cannot play MPEG1/2 layer 3 yet. It might be nice to fix that.
Status: Todo
Status: Done 10 May 2002 (fenrir)
Task: 0x25
Difficulty: Hard
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,7 +4,7 @@ AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_SYSTEM
PACKAGE="vlc"
VERSION="0.4.0"
VERSION="0.4.4"
CODENAME=Ourumov
dnl Save CFLAGS and LDFLAGS
......@@ -113,7 +113,7 @@ dnl The -DSYS_FOO flag
save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2)
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll)
AC_CHECK_FUNC(connect,,[
AC_CHECK_LIB(socket,connect,
......@@ -126,13 +126,18 @@ AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
])
AC_CHECK_FUNCS(nanosleep,,[
have_nanosleep=0
AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
AC_CHECK_LIB(rt,nanosleep,
[vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"],
[vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"; have_nanosleep=1],
[AC_CHECK_LIB(posix4,nanosleep,
[vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"])]
[vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1])]
)
])
if test x$have_nanosleep = x1; then
AC_DEFINE(HAVE_NANOSLEEP, 1,
Define if nanosleep is available.)
fi
AC_CHECK_FUNC(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
])
......@@ -188,7 +193,7 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
Define if <strings.h> defines strncasecmp.)])
dnl Check for headers
AC_CHECK_HEADERS(getopt.h strings.h)
AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
......@@ -422,7 +427,7 @@ dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone filter_crop fx_scope"
dnl
dnl Accelerated modules
......@@ -719,28 +724,68 @@ if test "x$enable_dvbpsi" != "xno"
then
AC_ARG_WITH(dvbpsi,
[ --with-dvbpsi=PATH libdvbpsi headers and libraries])
if test "x$with_dvbpsi" = x
then
test_LDFLAGS=""
test_CFLAGS=""
else
test_LDFLAGS="-L${with_dvbpsi}/lib"
test_CFLAGS="-I${with_dvbpsi}/include"
fi
CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
AC_CHECK_HEADER([dvbpsi/dr.h],[
PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
],[
if test "x$enable_dvbpsi" != x
AC_ARG_WITH(dvbpsi,
[ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
case "x$with_dvbpsi" in
x|xyes)
if test "x$with_dvbpsi_tree" = x
then
AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
AC_CHECK_HEADERS(dvbpsi/dr.h,
[ PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} -ldvbpsi" ], [],
[ AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
else
AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
if test "x$real_dvbpsi_tree" = x
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
fi
if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
then
dnl Use a custom libdvbpsi
AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
BUILTINS="${BUILTINS} mpeg_ts_dvbpsi"
mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
else
dnl The given libdvbpsi wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
fi
fi
])
CPPFLAGS="$save_CPPFLAGS"
;;
xno)
dnl Compile without dvbpsi (dlopen version, works only under Linux)
;;
*)
AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
if test "x$with_dvbpsi" = x
then
test_LDFLAGS=""
test_CFLAGS=""
else
test_LDFLAGS="-L${with_dvbpsi}/lib"
test_CFLAGS="-I${with_dvbpsi}/include"
fi
CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
AC_CHECK_HEADER([dvbpsi/dr.h],[
PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
],[
if test "x$enable_dvbpsi" != x
then
AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
fi
])
CPPFLAGS="$save_CPPFLAGS"
;;
esac
fi
dnl
dnl VCD module
dnl
......
List of vlc plugins
$Id: MODULES,v 1.3 2002/01/30 00:09:49 sam Exp $
$Id: LIST,v 1.1.2.1 2002/08/07 19:59:02 massiot Exp $
* ac3_adec: software AC3 decoder.
......
/*****************************************************************************
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.cpp,v 1.1.2.1 2002/07/13 11:33:11 tcastley Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Tony Casltey <tony@castley.net>
*
* 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.
*****************************************************************************/
/* VLC headers */
#include <SupportKit.h>
extern "C"
{
#include <videolan/vlc.h>
#include "stream_control.h"
#include "input_ext-intf.h"
#include "interface.h"
#include "intf_playlist.h"
#include "audio_output.h"
#include "video.h"
#include "video_output.h"
}
#include "intf_vlc_wrapper.h"
bool Intf_VLCWrapper::manage()
{
p_main->p_intf->pf_manage( p_main->p_intf );
if ( p_main->p_intf->b_die )
{
// exit the lot
return( 1 );
}
if ( p_input_bank->pp_input[0] != NULL )
{
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
if( !p_input_bank->pp_input[0]->b_die )
{
/* New input or stream map change */
if( p_input_bank->pp_input[0]->stream.b_changed ||
p_main->p_intf->p_sys->i_part !=
p_input_bank->pp_input[0]->stream.p_selected_area->i_part )
{
setupMenus();
p_main->p_intf->p_sys->b_disabled_menus = 0;
}
}
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
}
else if ( !p_main->p_intf->p_sys->b_disabled_menus )
{
setupMenus();
p_main->p_intf->p_sys->b_disabled_menus = 1;
}
return( 0 );
}
void Intf_VLCWrapper::quit()
{
p_main->p_intf->b_die = 1;
}
/* playlist control */
bool Intf_VLCWrapper::playlistPlay()
{
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_main->p_playlist->b_stopped = 0;
}
else
{
vlc_mutex_lock( &p_main->p_playlist->change_lock );
if( p_main->p_playlist->b_stopped )
{
if( p_main->p_playlist->i_size )
{
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist,
p_main->p_playlist->i_index );
}
else
{
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
else
{
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
return( true );
}
void Intf_VLCWrapper::playlistPause()
{
if ( p_input_bank->pp_input[0] != NULL )
{
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;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
void Intf_VLCWrapper::playlistStop()
{
if( p_input_bank->pp_input[0] != NULL )
{
/* end playing item */
p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->i_index--;
p_main->p_playlist->b_stopped = 1;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
void Intf_VLCWrapper::playlistNext()
{
if( p_input_bank->pp_input[0] != NULL )
{
p_input_bank->pp_input[0]->b_eof = 1;
}
}
void Intf_VLCWrapper::playlistPrev()
{
if( p_input_bank->pp_input[0] != NULL )
{
/* FIXME: temporary hack */
intf_PlaylistPrev( p_main->p_playlist );
intf_PlaylistPrev( p_main->p_playlist );
p_input_bank->pp_input[0]->b_eof = 1;
}
}
//void Intf_VLCWrapper::channelNext()
//{
// intf_thread_t * p_intf = p_main->p_intf;
//
// p_intf->p_sys->i_channel++;
//
// intf_WarnMsg( 3, "intf info: joining channel %d", p_intf->p_sys->i_channel );
//
// vlc_mutex_lock( &p_intf->change_lock );
//
// network_ChannelJoin( p_intf->p_sys->i_channel );
// p_intf->pf_manage( p_intf );
//
// vlc_mutex_unlock( &p_intf->change_lock );
//}
//
//void Intf_VLCWrapper::channelPrev()
//{
// intf_thread_t * p_intf = p_main->p_intf;
//
// if ( p_intf->p_sys->i_channel )
// {
// p_intf->p_sys->i_channel--;
// }
//
// intf_WarnMsg( 3, "intf info: joining channel %d", p_intf->p_sys->i_channel );
//
// vlc_mutex_lock( &p_intf->change_lock );
//
// network_ChannelJoin( p_intf->p_sys->i_channel );
// p_intf->pf_manage( p_intf );
//
// vlc_mutex_unlock( &p_intf->change_lock );
//
//}
void Intf_VLCWrapper::loop()
{
intf_thread_t * p_intf = p_main->p_intf;
if ( p_intf->p_sys->b_loop )
{
intf_PlaylistDelete( p_main->p_playlist,
p_main->p_playlist->i_size - 1 );
}
else
{
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
"vlc:loop" );
}
p_intf->p_sys->b_loop = !p_intf->p_sys->b_loop;
}
/* playback control */
void Intf_VLCWrapper::playSlower()
{
if( p_input_bank->pp_input[0] != NULL )
{
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;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
void Intf_VLCWrapper::playFaster()
{
if( p_input_bank->pp_input[0] != NULL )
{
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;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
void Intf_VLCWrapper::volume_mute()
{
if( p_aout_bank->pp_aout[0] == NULL ) return;
if( p_main->p_intf->p_sys->b_mute ) return;
p_main->p_intf->p_sys->i_saved_volume =
p_aout_bank->pp_aout[0]->i_volume;
p_aout_bank->pp_aout[0]->i_volume = 0;
p_main->p_intf->p_sys->b_mute = 1;
}
void Intf_VLCWrapper::volume_restore()
{
if( p_aout_bank->pp_aout[0] == NULL ) return;
p_aout_bank->pp_aout[0]->i_volume =
p_main->p_intf->p_sys->i_saved_volume;
p_main->p_intf->p_sys->b_mute = 0;
}
void Intf_VLCWrapper::toggle_mute()
{
if( p_aout_bank->pp_aout[0] == NULL ) return;
if ( p_main->p_intf->p_sys->b_mute )
{
Intf_VLCWrapper::volume_restore();
}
else
{
Intf_VLCWrapper::volume_mute();
}
p_main->p_intf->p_sys->b_mute = !p_main->p_intf->p_sys->b_mute;
}
void Intf_VLCWrapper::maxvolume()
{
if( p_aout_bank->pp_aout[0] == NULL ) return;
if( p_main->p_intf->p_sys->b_mute )
{
p_main->p_intf->p_sys->i_saved_volume = VOLUME_MAX;
}
else
{
p_aout_bank->pp_aout[0]->i_volume = VOLUME_MAX;
}
}
//void Intf_VLCWrapper::fullscreen()
//{
// if( p_vout_bank->pp_vout[0] != NULL )
// {
// p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE;
// }
//}
void Intf_VLCWrapper::eject(){}
/* playback info */
BString* Intf_VLCWrapper::getTimeAsString()
{
static char psz_currenttime[ OFFSETTOTIME_MAX_SIZE ];
if( p_input_bank->pp_input[0] == NULL )
{
return (new BString("00:00:00"));
}
input_OffsetToTime( p_input_bank->pp_input[0],
psz_currenttime,
p_input_bank->pp_input[0]->stream.p_selected_area->i_tell );
return(new BString(psz_currenttime));
}
float Intf_VLCWrapper::getTimeAsFloat()
{
float f_time = 0.0;
if( p_input_bank->pp_input[0] != NULL )
{
f_time = (float)p_input_bank->pp_input[0]->stream.p_selected_area->i_tell /
(float)p_input_bank->pp_input[0]->stream.p_selected_area->i_size;
}
return( f_time );
}
void Intf_VLCWrapper::setTimeAsFloat(float f_position)
{
if( p_input_bank->pp_input[0] != NULL )
{
input_Seek( p_input_bank->pp_input[0],
(long long int)(p_input_bank->pp_input[0]->stream.p_selected_area->i_size * f_position) );
}
}
bool Intf_VLCWrapper::playlistPlaying()
{
return( !p_main->p_playlist->b_stopped );
}
BList *Intf_VLCWrapper::playlistAsArray()
{
int i;
BList* p_list = new BList(p_main->p_playlist->i_size);
vlc_mutex_lock( &p_main->p_playlist->change_lock );
for( i = 0; i < p_main->p_playlist->i_size; i++ )
{
p_list->AddItem(new BString(p_main->p_playlist->p_item[i].psz_name));
}
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
return( p_list );
}
/* open file/disc/network */
void Intf_VLCWrapper::openFiles(BList *o_files)
{
BString *o_file;
int i_end = p_main->p_playlist->i_size;
intf_thread_t * p_intf = p_main->p_intf;
if ( p_intf->p_sys->b_loop )
{
intf_PlaylistDelete( p_main->p_playlist,
p_main->p_playlist->i_size - 1 );
}
while( ( o_file = (BString *)o_files->LastItem() ) )
{
o_files->RemoveItem(o_files->CountItems() - 1);
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
o_file->String() );
delete o_file;
}
/* end current item, select first added item */
if( p_input_bank->pp_input[0] != NULL )
{
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
if ( p_intf->p_sys->b_loop )
{
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
"vlc:loop" );
}
}
void Intf_VLCWrapper::openDisc(BString o_type, BString o_device, int i_title, int i_chapter)
{
BString o_source("");
int i_end = p_main->p_playlist->i_size;
intf_thread_t * p_intf = p_main->p_intf;
o_source << o_type << ":" << o_device ;
//i_title, i_chapter;
if ( p_intf->p_sys->b_loop )
{
intf_PlaylistDelete( p_main->p_playlist,
p_main->p_playlist->i_size - 1 );
}
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
o_source.String() );
/* stop current item, select added item */
if( p_input_bank->pp_input[0] != NULL )
{
p_input_bank->pp_input[0]->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
if ( p_intf->p_sys->b_loop )
{
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
"vlc:loop" );
}
}
void Intf_VLCWrapper::openNet(BString o_addr, int i_port)
{
}
void Intf_VLCWrapper::openNetChannel(BString o_addr, int i_port)
{
}
void Intf_VLCWrapper::openNetHTTP(BString o_addr)
{
}
/* menus management */
void Intf_VLCWrapper::toggleProgram(int i_program){}
void Intf_VLCWrapper::toggleTitle(int i_title)
{
input_thread_t * p_input = p_input_bank->pp_input[0];
input_ChangeArea( p_input,
p_input->stream.pp_areas[i_title] );
vlc_mutex_lock( &p_input->stream.stream_lock );
setupMenus();
vlc_mutex_unlock( &p_input->stream.stream_lock );
input_SetStatus( p_input, INPUT_STATUS_PLAY );
}
void Intf_VLCWrapper::toggleChapter(int i_chapter)
{
input_thread_t * p_input = p_input_bank->pp_input[0];
p_input->stream.p_selected_area->i_part = i_chapter;
input_ChangeArea( p_input,
p_input->stream.p_selected_area );
vlc_mutex_lock( &p_input->stream.stream_lock );
setupMenus();
vlc_mutex_unlock( &p_input->stream.stream_lock );
input_SetStatus( p_input, INPUT_STATUS_PLAY );
}
void Intf_VLCWrapper::toggleLanguage(int i_language){}
void Intf_VLCWrapper::toggleSubtitle(int i_subtitle){}
void Intf_VLCWrapper::setupMenus(){}
/*****************************************************************************
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.1.2.1 2002/07/13 11:33:11 tcastley Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Tony Casltey <tony@castley.net>
*
* 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.
*****************************************************************************/
class InterfaceWindow;
/*****************************************************************************
* intf_sys_t: description and status of FB interface
*****************************************************************************/
typedef struct intf_sys_s
{
InterfaceWindow * p_window;
char i_key;
int b_disabled_menus;
int i_part;
int i_saved_volume;
int b_loop;
int i_channel;
int b_mute;
} intf_sys_t;
/* Intf_VLCWrapper is a singleton class
(only one instance at any time) */
class Intf_VLCWrapper
{
public:
static bool manage();
static void quit();
/* playlist control */
static bool playlistPlay();
static void playlistPause();
static void playlistStop();
static void playlistNext();
static void playlistPrev();
// static void channelNext();
// static void channelPrev();
static void loop();
/* playback control */
static void playSlower();
static void playFaster();
static void volume_mute();
static void volume_restore();
static void toggle_mute();
static void maxvolume();
// static void fullscreen();
static void eject();
/* playback info */
static BString* getTimeAsString();
static float getTimeAsFloat();
static void setTimeAsFloat(float i_offset);
static bool playlistPlaying();
static BList* playlistAsArray();
/* open file/disc/network */
static void openFiles(BList *o_files);
static void openDisc(BString o_type, BString o_device, int i_title, int i_chapter);
static void openNet(BString o_addr, int i_port);
static void openNetChannel(BString o_addr, int i_port);
static void openNetHTTP(BString o_addr);
/* menus management */
static void toggleProgram(int i_program);
static void toggleTitle(int i_title);
static void toggleChapter(int i_chapter);
static void toggleLanguage(int i_language);
static void toggleSubtitle(int i_subtitle);
static void setupMenus();
};
/*****************************************************************************
* crop.c : Crop video plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: crop.c,v 1.1.2.2 2002/06/02 02:04:37 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>
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <videolan/vlc.h>
#include "video.h"
#include "video_output.h"
#include "filter_common.h"
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "crop-geometry", NULL, NULL, N_("Crop geometry"), N_("Set the geometry of the zone to crop") )
ADD_BOOL ( "autocrop", 0, NULL, N_("Automatic cropping"), N_("Activate automatic black border cropping") )
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("image crop video module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_SHORTCUT( "crop" )
MODULE_INIT_STOP
MODULE_ACTIVATE_START
vout_getfunctions( &p_module->p_functions->vout );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/*****************************************************************************
* vout_sys_t: Crop video output method descriptor
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the Crop specific properties of an output thread.
*****************************************************************************/
typedef struct vout_sys_s
{
vout_thread_t *p_vout;
unsigned int i_x, i_y;
unsigned int i_width, i_height, i_aspect;
boolean_t b_autocrop;
/* Autocrop specific variables */
unsigned int i_lastchange;
boolean_t b_changed;
} vout_sys_t;
/*****************************************************************************
* Local prototypes
*****************************************************************************/
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 void UpdateStats ( vout_thread_t *, picture_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->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_Create: allocates Crop video thread output method
*****************************************************************************
* This function allocates and initializes a Crop vout method.
*****************************************************************************/
static 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: out of memory" );
return 1;
}
return 0;
}
/*****************************************************************************
* vout_Init: initialize Crop video thread output method
*****************************************************************************/
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
char *psz_var;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
p_vout->p_sys->i_lastchange = 0;
p_vout->p_sys->b_changed = 0;
/* Initialize the output structure */
p_vout->output.i_chroma = p_vout->render.i_chroma;
p_vout->output.i_width = p_vout->render.i_width;
p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Shall we use autocrop ? */
p_vout->p_sys->b_autocrop = config_GetIntVariable( "autocrop" );
/* Get geometry value from the user */
psz_var = config_GetPszVariable( "crop-geometry" );
if( psz_var )
{
char *psz_parser, *psz_tmp;
psz_parser = psz_tmp = psz_var;
while( *psz_tmp && *psz_tmp != 'x' ) psz_tmp++;
if( *psz_tmp )
{
psz_tmp[0] = '\0';
p_vout->p_sys->i_width = atoi( psz_parser );
psz_parser = ++psz_tmp;
while( *psz_tmp && *psz_tmp != '+' ) psz_tmp++;
if( *psz_tmp )
{
psz_tmp[0] = '\0';
p_vout->p_sys->i_height = atoi( psz_parser );
psz_parser = ++psz_tmp;
while( *psz_tmp && *psz_tmp != '+' ) psz_tmp++;
if( *psz_tmp )
{
psz_tmp[0] = '\0';
p_vout->p_sys->i_x = atoi( psz_parser );
p_vout->p_sys->i_y = atoi( ++psz_tmp );
}
else
{
p_vout->p_sys->i_x = atoi( psz_parser );
p_vout->p_sys->i_y =
( p_vout->output.i_height - p_vout->p_sys->i_height ) / 2;
}
}
else
{
p_vout->p_sys->i_height = atoi( psz_parser );
p_vout->p_sys->i_x =
( p_vout->output.i_width - p_vout->p_sys->i_width ) / 2;
p_vout->p_sys->i_y =
( p_vout->output.i_height - p_vout->p_sys->i_height ) / 2;
}
}
else
{
p_vout->p_sys->i_width = atoi( psz_parser );
p_vout->p_sys->i_height = p_vout->output.i_height;
p_vout->p_sys->i_x =
( p_vout->output.i_width - p_vout->p_sys->i_width ) / 2;
p_vout->p_sys->i_y =
( p_vout->output.i_height - p_vout->p_sys->i_height ) / 2;
}
/* Check for validity */
if( p_vout->p_sys->i_x + p_vout->p_sys->i_width
> p_vout->output.i_width )
{
p_vout->p_sys->i_x = 0;
if( p_vout->p_sys->i_width > p_vout->output.i_width )
{
p_vout->p_sys->i_width = p_vout->output.i_width;
}
}
if( p_vout->p_sys->i_y + p_vout->p_sys->i_height
> p_vout->output.i_height )
{
p_vout->p_sys->i_y = 0;
if( p_vout->p_sys->i_height > p_vout->output.i_height )
{
p_vout->p_sys->i_height = p_vout->output.i_height;
}
}
free( psz_var );
}
else
{
p_vout->p_sys->i_width = p_vout->output.i_width;
p_vout->p_sys->i_height = p_vout->output.i_height;
p_vout->p_sys->i_x = p_vout->p_sys->i_y = 0;
}
/* Pheeew. Parsing done. */
intf_WarnMsg( 3, "vout info: cropping at %ix%i+%i+%i, %sautocropping",
p_vout->p_sys->i_width, p_vout->p_sys->i_height,
p_vout->p_sys->i_x, p_vout->p_sys->i_y,
p_vout->p_sys->b_autocrop ? "" : "not " );
/* Set current output image properties */
p_vout->p_sys->i_aspect = p_vout->output.i_aspect
* p_vout->output.i_height / p_vout->p_sys->i_height
* p_vout->p_sys->i_width / p_vout->output.i_width;
/* Try to open the real video output */
psz_var = config_GetPszVariable( "filter" );
config_PutPszVariable( "filter", NULL );
intf_WarnMsg( 3, "vout info: spawning the real video outputs" );
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->p_sys->i_width, p_vout->p_sys->i_height,
p_vout->render.i_chroma, p_vout->p_sys->i_aspect );
if( p_vout->p_sys->p_vout == NULL )
{
intf_ErrMsg( "vout error: failed to create vout" );
config_PutPszVariable( "filter", psz_var );
if( psz_var ) free( psz_var );
return 0;
}
config_PutPszVariable( "filter", psz_var );
if( psz_var ) free( psz_var );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return 0;
}
/*****************************************************************************
* vout_End: terminate Crop video thread output method
*****************************************************************************/
static void vout_End( vout_thread_t *p_vout )
{
int i_index;
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
}
/*****************************************************************************
* vout_Destroy: destroy Crop video thread output method
*****************************************************************************
* Terminate an output method created by CropCreateOutputMethod
*****************************************************************************/
static void vout_Destroy( vout_thread_t *p_vout )
{
vout_DestroyThread( p_vout->p_sys->p_vout, NULL );
free( p_vout->p_sys );
}
/*****************************************************************************
* vout_Manage: handle Crop events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
*****************************************************************************/
static int vout_Manage( vout_thread_t *p_vout )
{
if( !p_vout->p_sys->b_changed )
{
return 0;
}
vout_DestroyThread( p_vout->p_sys->p_vout, NULL );
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->p_sys->i_width, p_vout->p_sys->i_height,
p_vout->render.i_chroma, p_vout->p_sys->i_aspect );
if( p_vout->p_sys->p_vout == NULL )
{
intf_ErrMsg( "vout error: failed to create vout" );
return 1;
}
p_vout->p_sys->b_changed = 0;
p_vout->p_sys->i_lastchange = 0;
return 0;
}
/*****************************************************************************
* vout_Render: display previously rendered output
*****************************************************************************
* This function sends the currently rendered image to Crop image, waits
* until it is displayed and switches the two rendering buffers, preparing next
* frame.
*****************************************************************************/
static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
{
picture_t *p_outpic = NULL;
int i_plane;
if( p_vout->p_sys->b_changed )
{
return;
}
while( ( p_outpic =
vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 )
) == NULL )
{
if( p_vout->b_die || p_vout->b_error )
{
vout_DestroyPicture( p_vout->p_sys->p_vout, p_outpic );
return;
}
msleep( VOUT_OUTMEM_SLEEP );
}
vout_DatePicture( p_vout->p_sys->p_vout, p_outpic, p_pic->date );
vout_LinkPicture( p_vout->p_sys->p_vout, p_outpic );
for( i_plane = 0 ; i_plane < p_pic->i_planes ; i_plane++ )
{
u8 *p_in, *p_out, *p_out_end;
int i_in_pitch = p_pic->p[i_plane].i_pitch;
const int i_out_pitch = p_outpic->p[i_plane].i_pitch;
p_in = p_pic->p[i_plane].p_pixels
/* Skip the right amount of lines */
+ i_in_pitch * ( p_pic->p[i_plane].i_lines * p_vout->p_sys->i_y
/ p_vout->output.i_height )
/* Skip the right amount of columns */
+ i_in_pitch * p_vout->p_sys->i_x / p_vout->output.i_width;
p_out = p_outpic->p[i_plane].p_pixels;
p_out_end = p_out + i_out_pitch * p_outpic->p[i_plane].i_lines;
while( p_out < p_out_end )
{
FAST_MEMCPY( p_out, p_in, i_out_pitch );
p_in += i_in_pitch;
p_out += i_out_pitch;
}
}
vout_UnlinkPicture( p_vout->p_sys->p_vout, p_outpic );
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
/* The source image may still be in the cache ... parse it! */
if( !p_vout->p_sys->b_autocrop )
{
return;
}
UpdateStats( p_vout, p_pic );
}
/*****************************************************************************
* vout_Display: displays previously rendered output
*****************************************************************************
* This function send the currently rendered image to Invert image, waits
* until it is displayed and switch the two rendering buffers, preparing next
* frame.
*****************************************************************************/
static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{
;
}
static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
{
u8 *p_in = p_pic->p[0].p_pixels;
int i_pitch = p_pic->p[0].i_pitch;
int i_lines = p_pic->p[0].i_lines;
int i_firstwhite = -1, i_lastwhite = -1, i;
/* Determine where black borders are */
switch( p_vout->output.i_chroma )
{
case FOURCC_I420:
/* XXX: Do not laugh ! I know this is very naive. But it's just a
* proof of concept code snippet... */
for( i = i_lines ; i-- ; )
{
const int i_col = i * i_pitch / i_lines;
if( p_in[i_col/2] > 40
&& p_in[i_pitch / 2] > 40
&& p_in[i_pitch/2 + i_col/2] > 40 )
{
if( i_lastwhite == -1 )
{
i_lastwhite = i;
}
i_firstwhite = i;
}
p_in += i_pitch;
}
break;
default:
break;
}
/* Decide whether it's worth changing the size */
if( i_lastwhite == -1 )
{
p_vout->p_sys->i_lastchange = 0;
return;
}
if( i_lastwhite - i_firstwhite < p_vout->p_sys->i_height / 2 )
{
p_vout->p_sys->i_lastchange = 0;
return;
}
if( i_lastwhite - i_firstwhite < p_vout->p_sys->i_height + 16
&& i_lastwhite - i_firstwhite + 16 > p_vout->p_sys->i_height )
{
p_vout->p_sys->i_lastchange = 0;
return;
}
/* We need at least 25 images to make up our mind */
p_vout->p_sys->i_lastchange++;
if( p_vout->p_sys->i_lastchange < 25 )
{
return;
}
/* Tune a few values */
if( i_firstwhite & 1 )
{
i_firstwhite--;
}
if( !(i_lastwhite & 1) )
{
i_lastwhite++;
}
/* Change size */
p_vout->p_sys->i_y = i_firstwhite;
p_vout->p_sys->i_height = i_lastwhite - i_firstwhite + 1;
p_vout->p_sys->i_aspect = p_vout->output.i_aspect
* p_vout->output.i_height / p_vout->p_sys->i_height
* p_vout->p_sys->i_width / p_vout->output.i_width;
p_vout->p_sys->b_changed = 1;
}
%define name vlc
%define vlc_ver 0.4.0
%define vlc_ver 0.4.4
%define version %vlc_ver
%define cvs 0
......@@ -287,6 +287,8 @@ rm -fr %buildroot
%{_libdir}/videolan/vlc/filter_invert.so
%{_libdir}/videolan/vlc/filter_transform.so
%{_libdir}/videolan/vlc/filter_wall.so
%{_libdir}/videolan/vlc/filter_clone.so
%{_libdir}/videolan/vlc/filter_crop.so
%{_libdir}/videolan/vlc/fx_scope.so
%{_libdir}/videolan/vlc/http.so
%{_libdir}/videolan/vlc/ipv4.so
......@@ -409,6 +411,18 @@ rm -fr %buildroot
%{_libdir}/videolan/vlc/alsa.so
%changelog
* Sun Aug 11 2002 Yves Duret <yduret@mandrakesoft.com> 0.4.4-1mdk
- new upstream release
* Fri Jul 26 2002 Yves Duret <yduret@mandrakesoft.com> 0.4.3-1mdk
- new upstream release
* Sun Jul 7 2002 Yves Duret <yduret@mandrakesoft.com> 0.4.2-1mdk
- new upstream release
* Mon Jun 3 2002 Yves Duret <yduret@mandrakesoft.com> 0.4.1-1mdk
- new upstream release
* Thu May 23 2002 Yves Duret <yduret@mandrakesoft.com> 0.4.0-1mdk
- version 0.4.0 with MPEG4 (DivX) support thx ffmpeg.
thus s/MPEG, MPEG2 and DVD/multimedia/g
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment