Commit Graph

3622 Commits

Author SHA1 Message Date
Uoti Urpala decec7f2a3 vo_vdpau: skip resize code if not fully initialized
Window events or user commands could trigger a call to resize() before
config() had been called. This caused at least error messages. Add a
check to make resize() exit without doing anything in this case. It
will be called again later when the output is configured.
2011-07-17 17:05:42 +03:00
Uoti Urpala 82b8f89bae input: rework event reading and command queuing
Rework much of the logic related to reading from event sources and
queuing commands. The two biggest architecture changes are:
- The code buffering keycodes in mp_fifo.c is gone. Instead key input
  is now immediately fed to input.c and interpreted as commands, and
  then the commands are buffered instead.
- mp_input_get_cmd() now always tries to read every available event
  from every event source and convert them to (buffered) commands.
  Before it would only process new events until one new command became
  available.

Some relevant behavior changes:
- Before commands could be lost when stream code called
  mp_input_check_interrupt() which read commands (to see if they were
  of types that triggered aborts during slow IO tasks) and then threw
  them away. This was especially an issue if cache was enabled and slow
  to read. Fixed - now it's possible to check whether there are queued
  commands which will abort playback of the current file without
  throwing other commands away.
- mp_input_check_interrupt() now prints a message if it returns
  true. This is especially useful because the failures caused by
  aborted stream reads can trigger error messages from other code that
  was doing the read; the new message makes it more obvious what the
  cause of the subsequent error messages is.
- It's now possible to again avoid making stdin non-blocking (which
  caused some issues) without reintroducing extra latency. The change
  will be done in a subsequent commit.
- Event sources that do not support select() should now have somewhat
  lower latency in certain situations as they will be checked both
  before and after select()/sleep in input reading; before the sleep
  always happened first even if such sources already had queued
  input. Before the key fifo was also handled in this manner (first
  key triggered select, but if multiple were read then rest could be
  delayed; however in most cases this didn't add latency in practice
  as after central code started doing command handling it queried for
  further commands with a max sleep time of 0).
- Key fifo limiting is more accurate now: it now counts actual
  commands intead of keycodes, and all queued keys are read
  immediately from input devices so they can be counted correctly.
- Since keypresses are now interpreted immediately, commands which
  change keybindings will no longer affect following keypresses that
  have already been read before the command is executed. This should
  not be an issue in practice with current keybinding behavior.
2011-07-17 07:36:09 +03:00
Uoti Urpala 8a37558c5f vo_directx: include <libavutil/common.h> for FFMIN
070491f102 added an use of FFMIN to
vo_directx.c but failed to include a header for the macro. Fix.
2011-07-07 22:58:34 +03:00
Uoti Urpala 2670ceeb81 Merge branch 'mplayer1_changes' 2011-07-06 13:07:37 +03:00
reimar 06d830687d cleanup: silence some clang warnings
Cosmetics: vo_mpegpes.c: Fix strange space placement

Avoids clang warning that =- might have been intended as -=.

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

vo_jpeg: Use "const char *" type for paths.
Fixes a clang warning due to sign mismatch when calling open().

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

mga_template.c: Remove pointless and in addition incorrect cast.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33800 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:08 +03:00
reimar 950003b0c3 vo_gl: fix YUY2/YVYU colorspace mixup
Second GL_YCBCR_MESA format is YVYU, not YUY2.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33694 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
reimar 9d8913dbf4 cleanup: vo_directx: remove redundant code
Simplify code for printing display adapter list.

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

Remove left-over code from icon/cursor handling that is
now done by w32_common.c

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

Remove more code and variables that have no purpose anymore.

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

Remove some #includes that are no longer needed.

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

Remove more unnecessary code/defines.

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

Move check_events function to avoid forward declaration.

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

Remove more unused variables.

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

Add const to avoid compiler warning.

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

Use the proper type for the palette, fixes compiler warning.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33681 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
reimar 070491f102 vo_directx: Change vo_directx to use w32_common.c
While I tested it quite thoroughly, with and without
-wid, -vm, -fs, ... it is _very_ likely to break
something, please report any regressions!
In the worst case it can still be reverted, however
since it has very little relevance nowadays it will
rot all the faster if not at least some code is shared.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33657 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
reimar 1b6ae1ff58 VO: w32_common: also generate VO_EVENT_MOVE
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33650 b3059339-0415-0410-9bf9-f77b7e298cf2

Generate VO_EVENT_MOVE also with -wid.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33656 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
diego d6e34fe91a VO: support Pause/Break key in X11 input
Allow Pause/Break key to be bound as MPlayer input key under X11.
patch by Steaphan Greene, sgreene cs.binghamton edu

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33609 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
iive ab1544b74d cleanup: x11_common: remove pointless GC operations
Remove useless XSetBackground() call right before freeing the graphic
context.

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

Create empty vo_gc graphic context instead of one with
undefined foreground color.

The code that uses vo_gc already employs XSetForeground()/XSetBackground()
to change the context accordingly.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33525 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 09:10:56 +03:00
iive 15513a77fb vo_xv: avoid setting background color due to resize flicker
Set background color only when using ck-method=background. In the
other cases clearing of the non-video image area should be done
manually. Not drawing on the video image area prevents flickering
(visible when resizing).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33522 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 09:03:12 +03:00
Uoti Urpala 47ccb48ac9 vo: avoid losing initial expose event
The x11_common.c window creation code could lose the initial expose
event due to input mask changes. This meant that the window might
not be cleared at start (there's a vo_x11_clearwindow() call but it
may do nothing if it runs before the window is mapped). Modify the
code to avoid losing the expose event. Handling that event should
ensure the window is cleared and otherwise set up properly.
2011-07-06 08:42:57 +03:00
Uoti Urpala aeafa7a2b4 vo_xv: avoid clearing too much on resize
vo_xv set the "use_fs" parameter to vo_x11_clearwindow_part(). This
meant it always used the whole screen size to calculate the area to
clear. I can't see why overriding the vo->dwidth/dheight values would
ever be the right thing to do (if in fullscreen they should be set to
match that), so remove the use_fs parameter and always use the
dwidth/dheight values in the function. Also delete code drawing back
borders in vo_xv_draw colorkey. That should already happen in
vo_x11_clearwindow_part(); if it doesn't then things need to be fixed
anyway because colorkey code only ran in fullscreen mode (but borders
must work in window mode too).
2011-07-06 08:36:46 +03:00
reimar 48fdd3d926 vo_gl: Support 9- and 10-bit YUV input for OpenGL VOs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33502 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix clear/border color of chroma texture for 9- and 10-bit formats.
Avoids pink borders for those formats.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33504 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 07:31:54 +03:00
diego 94d3e6a710 cleanup: vo_direct3d: Mark a function static
This fixes the warning:
libvo/vo_direct3d.c:984:6: warning: no previous prototype for 'vo_draw_alpha_l8a8'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33499 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 07:24:52 +03:00
Uoti Urpala befed529bc debug output: reduce verbosity of some frequent messages
Drop from frequent (per-frame) messages from DBG2 to DBG3. Drop VDPAU
clock adjustment messages from V to DBG2.
2011-07-05 00:50:41 +03:00
Uoti Urpala c8e78a0383 VO: silence "[ASPECT] Warning: No suitable new res found!"
The warning "[ASPECT] Warning: No suitable new res found!" was printed
from aspect() if the video ended up being downscaled from the original
size AND the horizontal direction was the more limiting one for
aspect-aware scaling. Also, because aspect() can run multiple times
when starting playback this warning could be output multiple times.
Change the code so that downscaling alone no longer triggers this
message.
2011-07-05 00:38:34 +03:00
Uoti Urpala 677e78f278 VO: clean up aspect.c, remove aspecttest tool
Clean up aspect.c code and simplify it somewhat (without changing the
overall logic). Replace debug output printf calls under #ifdef with
mp_msg() debug output (somewhat modified).

Remove the file aspecttest.c which created a binary to test aspect.c
functionality. It did not compile and would not be particularly useful
anyway. Remove some support lines from aspect.c and Makefile.
2011-07-05 00:30:13 +03:00
Uoti Urpala 48891debe2 cleanup: mark some vo_directfb2.c and vo_s3fb.c functions static 2011-06-29 11:43:19 +03:00
reimar 2c7488fe91 vo_gl: Request GL_LUMINANCE16 for 16-bit YUV input
Request GL_LUMINANCE16 as internal format for > 8 bit YUV formats.
Have yet to find a system that actually provides that though.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33453 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-06-29 10:49:52 +03:00
reimar 57f48fc1bf vo_gl: don't accept 9/10-bit formats as input
Make mp_get_chroma_shift() simpler/more generic and add an argument
to get the per-component bit depth.
Use this to check more properly for supported formats in
gl and gl2 vos (only 8 and 16 bit are supported, 9 and 10 are not).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33452 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-06-29 10:49:41 +03:00
reimar 00ffdc0da6 cleanup: some warning fixes and minor cleanups
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33399 b3059339-0415-0410-9bf9-f77b7e298cf2

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

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

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

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33426 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-06-29 09:17:19 +03:00
Rudolf Polzer 84d86719fc Windows: vo/input: handle WM_XBUTTONDOWN message
WM_XBUTTONDOWN is used for extra mouse buttons (mapped to button 5 and
button 6 in mplayer2). Previously only vo_directx handled this
message.  Add support to w32_common.c event handling too (used by
vo_direct3d and vo_gl/vo_gl2 on Windows).
2011-06-19 04:05:36 +03:00
Uoti Urpala cbdb7e6305 vo_xvmc: drop XvMC support
Due to libavcodec changes vo_xvmc would have needed some modifications
to keep working. However, I think there's little real demand for XvMC,
so I'll just drop XvMC support. XvMC only supported MPEG-2, making it
of very limited usefulness nowadays, plus the vo_xvmc implementation
was not high quality and never worked particularly well or reliably
anyway.
2011-05-09 20:27:16 +03:00
Clément Bœsch b68f9fef32 cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
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 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
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
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 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
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
reimar c246c09b03 vo_gl: fix "gamma" equalizer setting
The "gamma" setting only changed red gamma. Fix it to change all of
red, green and blue gamma.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32895 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-04-12 18:41:26 +03:00
Uoti Urpala ca5399d04f VO: don't wait for map event in X VO initialization
After creating a video window the common X code waited for a MapNotify
event before proceeding. This meant that if the window was opened on
another workspace the player would be stuck until the user switched to
that workspace and the window could become actually visible. Remove
this waiting code. I don't know why it was there or if it was actually
beneficial/needed for some setup (at least common uses seem to work
fine without it); it comes from the earliest MPlayer versions visible
in VCS history.
2011-04-08 02:30:13 +03:00
Uoti Urpala 16e29bebf0 vo_mga, build: change include from "libavcore" to "libavutil"
Libavcore was merged back to libavutil. Change the mga_template.c
include of libavcore/imgutils.h to match. This means that split
libavcore/libavutil versions won't work any more; but since this only
affects people who enable vo_mga and there was no released version
using the split libs I won't bother with any conditionals for the
include.
2011-03-28 04:13:40 +03:00
Stefano Pigozzi b10b2b5b2c vo_corevideo: add key_modifier_alt only when pressing left option key 2011-03-18 21:59:38 +02:00
Stefano Pigozzi e94a9076dc vo_corevideo: fix menubar showing 2 apples on snow leopard 2011-03-11 20:32:57 +02:00
Stefano Pigozzi cf664986ae vo_corevideo: support modifier keys in keyboard input 2011-03-03 13:27:30 +02:00
Uoti Urpala afef26425d core: hr-seek: fix soft hang with hrseek past EOF
When doing a precise seek video_out->frame_loaded was left to true
while frames were being skipped. However vo_get_buffered_frame()
always returns success if a frame is already loaded; due to this the
EOF detection in update_video() never triggered, and a hr-seek past
EOF could cause a soft hang (commands were still processed and it was
possible to seek again to exit the loop). This could also happen with
Matroska files using ordered chapters if an underlying file was
actually shorter than the chapter that was supposed to come from it.
Then seeking to a timestamp after the end of the file but before the
end of the chapter would trigger the bug.

Fix the problem by setting frame_loaded to false when we decide to
skip the frame in question.
2011-03-03 12:54:36 +02:00
Uoti Urpala 106c5f9989 x11_common: fix for reconfig with pos/xineramascreen set
vo_x11_create_vo_window() only called vo_x11_update_geometry() if no
window position had been specified by -geometry or -xineramascreen, to
avoid overwriting the specified position with values from the existing
window. However window size should be initialized to the existing
window here, and setting new window title for -use-filename-title is
also done in vo_x11_update_geometry() (for whatever reason, it doesn't
match what else that function does). Change the code in
vo_x11_create_vo_window() to always call vo_x11_update_geometry() for
size variable and window title updates, but add a flag that tells it
not to update position variables.
2011-02-03 21:49:12 +02:00
Uoti Urpala 626d5ed628 vo_zr2: drop Zoran support
There were multiple files specific to Zoran support, and they also
depended on internal FFmpeg headers (so it would probably have been
hard to get them to compile now even if you tried). It's obsolete now,
so just drop the whole mess.
2011-01-31 16:03:11 +02:00
Uoti Urpala b138ca43ca vo_dxr2, ao_dxr2: drop dxr2 support
dxr2 support had been broken quite a while and nobody noticed. There
were finally commits to fix it in the svn repo, but rather than apply
those I'll just drop dxr2 support.
2011-01-31 16:03:10 +02:00
Uoti Urpala 6d534cd3cb vidix: drop VIDIX support
By now VIDIX is too obscure to justify the amount of code and
complexity it requires in the sources. Although there is no pressing
need to drop it just now from a code point of view, I'll rather remove
it before release than release with VIDIX support and then drop it
later.

Some of the manpage mentions of VIDIX were in "this option supported
for these VOs" lists that looked outdated and failed to mention vdpau
for example. Replace such incorrect lists with a generic "not
supported for all VOs" mention.
2011-01-31 16:03:10 +02:00
cboesch 303865cb81 cleanup: vo_md5sum: Remove unused define/undef
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32786 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-01-31 16:03:10 +02:00
reimar 7c8cb100af vo_gl: mark llvmpipe as a software renderer
llvmpipe, while only slow instead of insanely slow, is a software
renderer. Recognize it as such and disable -vo gl_nosw on it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32719 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-01-29 02:48:58 +02:00
Uoti Urpala c9026cb321 sub/OSD: move some related files to sub/ 2011-01-26 20:39:05 +02:00