Commit Graph

32896 Commits

Author SHA1 Message Date
Clément Bœsch e699250908 vo_svga: fix build after previous commit 6506d4ad
vo_svga.c used its static query_format() function before defining it,
but had no prototype before the use. Thus is depended on the otherwise
useless static declaration in a shared header, and broke after that
was removed. Fix by adding an advance declaration inside the file.
2011-05-03 12:21:59 +03:00
Clément Bœsch 6506d4ad84 cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
Uoti Urpala 7e65428712 Merge branch 'mplayer1_changes' 2011-05-02 00:46:03 +03:00
Uoti Urpala 5c4b059f16 input: rewrite -key-fifo-size limiting logic
Instead of strictly limiting the number of total entries in the
internal fifo, make the overall buffer bigger and try to limit entries
based on how many bound commands they're expected to generate. Now
doubleclick and button down events aren't counted for that limit.
Normally the sequence down-doubleclick-up generates at most one
command, so this better matches the quantity we actually want to
limit. Also add a mechanism to clear the button combination state kept
by input.c when the fifo is full; this avoids "stuck button" problems
due to button release events being dropped.

The key combination state clearing is partially based on MPlayer 1
changes by Reimar Döffinger (though overall the effects of this commit
are quite different). It still doesn't make "stuck button" problems
completely impossible; at least if the VO gets closed while a button
was down then nothing will send a button up event or reset state.
2011-05-02 00:44:21 +03:00
Uoti Urpala b9eaafe1ed input: modify interpretation of doubleclick events
The code combining button presses into multibutton commands prevented
single click commands from triggering if a doubleclick event had been
generated from the same button press. As a result using the mouse
wheel to seek worked very badly. Special-case doubleclick events in
the event interpretation code to avoid this issue. This changes the
sequence of generated "keys" for press-release-press-release from
MOUSE_BTN0   MOUSE_BTN0-MOUSE_BTN0_DBL   MOUSE_BTN0_DBL   to
MOUSE_BTN0   MOUSE_BTN0_DBL              MOUSE_BTN0.
"Keys" like MOUSE_BTN0-MOUSE_BTN0_DBL will never be generated now; any
existing configuration files using those need to be changed.
2011-05-02 00:44:21 +03:00
Uoti Urpala 325926f9f8 command.c: fix sub_remove crash
The sub_remove slave command tried to access a NULL pointer when
removing an external subtitle file displayed with libass. Fix.
2011-05-02 00:44:21 +03:00
Uoti Urpala ed5279db29 cleanup: input.c: simplify some string handling code
Replace manual loops with strspn() / strcspn().
2011-05-02 00:44:21 +03:00
Uoti Urpala 3832d67afd cleanup: reformat input.c 2011-05-02 00:44:21 +03:00
Uoti Urpala 23cb829072 input: move all key code lists to input/keycodes.h
Move the definitions of all special key codes (those not passed by
ASCII value) to input/keycodes.h. Before they were spread between
osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus
some special values in input.h. This was especially inconvenient as
the codes had to be coordinated to not conflict between the files.

The change requires a bit of ugliness as appleir.c includes
<linux/input.h> which contains various conflicting KEY_* definitions.
Work around this by adding a special preprocessor variable which can
be used to avoid defining these in keycodes.h.
2011-05-02 00:43:31 +03:00
cehoyos d0376729d1 codecs.conf: add Etymonix MPEG-2 I-frame codec to ffmpeg12
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33332 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:21 +03:00
reimar 84b2296c34 ad_speex: support decoding stream without header packet
Setup default speex modes, allows decoding of speex in flv which does
not contain a header packet.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33327 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:21 +03:00
reimar e7e4d1d802 commands: Fix DVD angle cycling up
Patch by 侯红勋 [houhongxun gmail com]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33317 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:21 +03:00
diego e631474c76 configure: Make largefile support non-optional
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33314 b3059339-0415-0410-9bf9-f77b7e298cf2

rpm: Delete reference to removed --enable-largefiles configure option.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33321 b3059339-0415-0410-9bf9-f77b7e298cf2

Conflicts:

	rpm/mplayer.spec
2011-05-02 00:36:21 +03:00
reimar 95d40b3f8d cleanup: vo_fbdev: simplify some code
Simplify by using FFMAX3.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33300 b3059339-0415-0410-9bf9-f77b7e298cf2

Simplify colormap generation code, avoid some mallocs and add frees
for one error case.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33302 b3059339-0415-0410-9bf9-f77b7e298cf2

Use memcpy_pic instead of reimplementing it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33303 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
cehoyos fa33ca0695 codecs.conf: add Canopus SD50 (CDV5) to ffdv entry
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33301 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar 8c831a2e86 vo_fbdev: clip x/y offsets to avoid bad video placement
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33299 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar 8924d2c27d vo_fbdev: Add -geometry support reusing common code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33298 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar 6d99ffbeed codecs.conf: add Deluxe Paint Animation decoder from libavcodec
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33290 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar 57f700d19c vo_fbdev: add RGB framebuffer support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33289 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar a3bf88ddef mp_taglists.c: add CODEC_ID_ANM and CODEC_ID_AVS
Add mapping between codec ID and tag for ANM and AVS.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33288 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar b977f59609 vd_ffmpeg: Make DR work with reget_buffer without buffer_hints
Allow DR to work with reget_buffer when no buffer_hints are set.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33287 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar d09882bd74 vd_ffmpeg: handle reget_buffer in DRI failure fallback code
Allow reget_buffer to somewhat work after direct rendering failure.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33286 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
diego f8471184e8 demux_ts: Hint at -tsprobe option when no audio stream is found
patch by Godmar Back, godmar gmail com

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33271 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar aeb6ac60ae ad_qtaudio: don't run win32 loader code when it's not used
Do not try to set up the FS segment when using quicktime to decode,
it makes no sense to do that.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33259 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
cehoyos c51e9d5ae1 codecs.conf: add Kega Video (kgv1) from libavcodec
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33254 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar dbde82d0f2 sub/spudec: fix artefacts at right border of subtitles
Fix artefacts at right border of scaled bitmap subtitles by clearing
the destination to 0 first if the width is not a multiple of 8.
This is necessary because some of the optimized sub drawing functions
always draw pixels in multiples of 8, so we cannot rely on any "dirt"
in the "unused" borders being ignored.
Note that due to the way rendering works, both alpha and the image need
to be cleared.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33230 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
reimar e617653265 options: Add dummy -shuffle option to show it in -list-options
Add dummy -shuffle and -noshuffle options so they appear in
-list-options output. These features are not implemented as options;
rather they're features of the command line parser.

Also add the CONF_NOCFG flag to the existing playlist option, which is
a similar placeholder for a command line parser feature.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33147 b3059339-0415-0410-9bf9-f77b7e298cf2

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33148 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:36:20 +03:00
cehoyos 673a2c7597 codecs.conf, mp_taglists: add FFmpeg Bitmap Brothers JV decoder
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33125 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-02 00:35:48 +03:00
reimar a37b71dc32 cache: call stream read with at least sector size space
Ensure we always pass a buffer of at least sector size to the read
function. This is never an issue with streams that have actual
sectors, as the reads will always return a multiple of sector size and
the cache is always used in blocks of sector size. However the rtp
protocol misuses this so it can just assume it always has a
sufficiently large buffer available and thus fails without this extra
hack.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33120 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-01 16:29:57 +03:00
compn 211e93aeec codecs.conf: cleanup/unify hdv* fourccs, except vdpau
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33113 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-05-01 16:25:37 +03:00
Uoti Urpala 3e86228fad input: don't interrupt processing at unbound events
The input code read at most one event per input or command fd. If this
event was not bound to any recognized command then no command was
returned, and higher-level code could not distinguish this case from
there being no pending events left. As a result unbound events would
cause extra latency in event processing. Change the input code to
continue reading events until it either finds one that maps to a
command or hits EOF/error.
2011-05-01 14:44:05 +03:00
Uoti Urpala 40234b1a3c input: make stdin non-blocking for terminal input
getch2.c did not make stdin non-blocking, and relied on only being
called after select() had shown readability. Stop relying on that
assumption and set stdin to non-blocking mode. Hopefully no relevant
platform has problems with this...
2011-04-28 12:52:00 +03:00
Uoti Urpala 3b401fb07f find_subfiles: fix unintended modification of global filename
Commit a2d28010cc ("cleanup: find_subfiles.c: simplify (mainly using
bstr)") was missing a bstrdup() in subtitle search code, and thus the
code erroneously modified the original filename string passed in. As a
result anything which printed or otherwise used the filename after
that would use a lowercase-converted version instead of the actual
file name. Fix by adding the bstrdup() to operate on a local copy of
the name instead.
2011-04-28 09:44:37 +03:00
Rudolf Polzer 994b21a80a vf_*: fix pts values passed to the next filter
Many video filters failed to calculate or even just pass through pts
values for their output frames. Fix this, and also make the two
remaining filters that called vf_next_put_image() twice for the same
input frame (vf_softpulldown, vf_telecine) use vf_queue_frame() so
that e.g. framestepping properly sees both frames.

Changed filters: vf_bmovl, vf_detc, vf_divtc, vf_filmdint, vf_ivtc,
vf_lavc, vf_phase, vf_pullup, vf_softpulldown, vf_telecine, vf_tile,
vf_tinterlace.
2011-04-24 03:55:47 +03:00
Uoti Urpala 28b3cc0efe bstr.h: change BSTR() from macro to inline function
Change BSTR() from a macro producing a compound literal to an inline
function returning the same value. This works for all existing uses,
and avoids a warning from BSTR(NULL) (the macro expansion contained
strlen(NULL); this was valid code because the strlen call was never
evaluated, but still triggered a GCC warning).
2011-04-24 03:05:24 +03:00
Clément Bœsch 9790fc444e demux_ogg: fix slang selection
Commit 59fff90d94 ("options: change -alang and -slang to use string
list type") failed to change demux_ogg accordingly. Add the missing
change.
2011-04-23 05:41:45 +03:00
Uoti Urpala d6072d7408 input: sleep in event loop even if there are no input fds
The input loop select() call was only run if there was at least one
input file descriptor. However other code uses the input loop to wait;
this could result in the wait becoming a busy loop when running with
-noconsolecontrols (without that there is at least one input fd for
terminal input). Make the input loop call select() to sleep even if
there are no input file descriptors.
2011-04-22 09:34:03 +03:00
Uoti Urpala c2067cabaf audio: fill small AO buffers more often in audio-only case
Commit cbeed30ae8 ("core: wake up a bit less often for audio-only
files") increased the sleep time between audio buffer fills. This
turned out to cause problems on some machines where available audio
buffer sizes are extremely limited (example cases included 85 ms for
stereo and less for multichannel audio). Change the code to check
the amount of buffered audio and shorten sleep times accordingly if
needed.

Such short buffers violate some assumptions made by video timing code,
so they may still cause visible problems in some cases. At least on
some machines using ALSA the problem seems to be caused by bad
configuration defaults (small buffer memory limit which can be
increased).
2011-04-22 09:34:02 +03:00
Uoti Urpala d33877acb6 configure: abort if certain libraries can't be found
Change the behavior of the iconv, freetype, fontconfig and libass
tests when autodetection fails. They now abort instead of silently
creating a crippled build. Users who really want to build without
those features can use explicit --disable flags.
2011-04-20 21:53:56 +03:00
Uoti Urpala 1bdb0e4cc3 configure: fix --enable-3dfx override without dga
If --enable-3dfx is specified but dga is not available then 3dfx is
disabled nonetheless. However, this disabling is not done properly,
and libvo/vo_3dfx.c is still compiled (but cannot be used). Fix.

The behavior of automatically disabling vo_3dfx despite --enable-3dfx
is itself questionable, but I'm not changing that now.
2011-04-20 20:37:10 +03:00
Uoti Urpala c33fafd6f1 Update libav API uses
Update various code to use newer alternatives instead of deprecated
functions/fields that are being dropped at libav API bump. An
exception is avcodec_thread_init() which is being dropped even though
it's still _necessary_ with fairly recent libav versions, so there's
no good alternative which would work with both those recent versions
and latest libavcodec. I think there are grounds to consider the drop
premature and revert it for now; if that doesn't happen I'll add a
version-test #if check around it later.
2011-04-20 04:36:05 +03:00
Uoti Urpala 726c28dd9b manpage: restore -lavfdopts doc accidentally removed in d76ad5f2
For some reason the -lavfdopts option was documented under MEncoder
options (despite not being MEncoder-specific), and was removed
together with MEncoder documentation in commit d76ad5f227. Restore the
documentation and convert it from its own section to normal option
documentation form. Also fix the example to actually work with current
lavf.
2011-04-20 04:29:01 +03:00
Clément Bœsch d10b54fc2e config: remove pointless cfg-mplayer-def.h file 2011-04-20 04:22:53 +03:00
Clément Bœsch 79bb565038 options: merge cfg-mplayer.h and cfg-common.h
Remove obsolete extern declarations for demuxer_type,
audio_demuxer_type, sub_demuxer_type and noconfig_opts in the
process.
2011-04-20 04:22:53 +03:00
Clément Bœsch 699bf9dcd3 vo_dga: replace xf86dga.h with Xxf86dga.h
xf86dga.h is deprecated and may be removed in the future.
2011-04-20 04:22:53 +03:00
Clément Bœsch 52743acba3 cleanup: avoid various GCC warnings 2011-04-20 04:22:53 +03:00
Clément Bœsch b17a1cf70c ao_alsa: remove warning by simplifying error handling case
Avoid a gcc warning about potentially uninitialized variable 'err'
(there was no actual problem with the code).
2011-04-20 04:22:53 +03:00
Uoti Urpala a2d28010cc cleanup: find_subfiles.c: simplify (mainly using bstr) 2011-04-20 04:22:53 +03:00
Clément Bœsch 52d60a7334 cleanup: find_subfiles.c: simplify declarations and allocations
Also clarify compare_sub_priority() and remove a typedef for the subfn
structure in the process.
2011-04-20 04:22:53 +03:00
Clément Bœsch 549177c105 find_subfiles: select subtitle files matching -slang
Also simplify subtitle selection a bit.
2011-04-20 04:22:53 +03:00