1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-04 05:52:09 +00:00
Commit Graph

3162 Commits

Author SHA1 Message Date
Uoti Urpala
7fd3eb0f74 Merge svn changes up to r29752
As part of merging subtitle-in-terminal changes make
update_subtitles() only clear existing subtitles if called with the
reset argument, and not try to set new ones. Later calls should set
the needed new subtitles, and this change avoids some problems with
trying to set subtitles when mp_property_sub() in command.c gets
called from initialization code before full initialization.
2009-10-06 04:48:00 +03:00
cehoyos
23235a0ed0 Fix definition of KEY_PAGE_DOWN.
Patch by Aaro Koskinen, aaro D koskinen A iki D fi 


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29749 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-10-04 21:10:13 +00:00
reimar
a531e51297 Set sensible write frequency/priority values for AllocateMemoryMESA
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29723 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-27 14:33:45 +00:00
reimar
f78f32c864 Print error instead of crashing when mesa-buffer is used on systems
that do not support it.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29722 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-27 14:31:35 +00:00
reimar
fe3b9a88ce Also check GLX client and server strings for extensions
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29721 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-27 14:24:15 +00:00
Uoti Urpala
ef438b3a6b osx_common.c: Fix compilation
This file should have been fixed when merging it from svn. Broke
compilation with OS X-specific VOs enabled.
2009-09-26 16:22:48 +03:00
cehoyos
4c86e46cca Fix teletext font autoscaling.
Patch by Francesco Lavra, francescolavra interfree it


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29702 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-22 22:06:51 +00:00
adrian
7bc4102a08 Fix vo_corevideo with shared buffer after r29606: Only do GUI dependent display config if shared buffer is not enabled.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29699 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-20 19:07:57 +00:00
Uoti Urpala
3f215c9f8e Merge branch 'vdpau' into build
* vdpau: (22 commits)
  VO: Prefer vo_vdpau over vo_xv again
  vo_vdpau: Fix X event handling bugs
  vo_vdpau: Fix memory corruption bug with MP_IMGTYPE_NUMBERED
  core/VO: Allow VO drivers to add/modify frames
  video_out.h: Cosmetics
  VO interface: Remove obsolete draw_frame() from new interface
  vo_vdpau: Support recovering from VDPAU display preemption
  vo_vdpau: Support updating OSD while paused
  vo_vdpau.c: Reindent control() switch statement
  vo_vdpau: Allocate one large surface for EOSD content
  vo_vdpau.c: cosmetics
  vo_vdpau: reindent after GUI code removal
  vo_vpdau: Clean up uninit logic
  vo_vdpau: Make CHECK_ST macro safer
  vo_vdpau: Move all remaining static/global variables to context
  vo_vdpau: Move things to context struct
  vo_vdpau: Make info struct const
  vo_vdpau: Replace global function table with context variable
  vo_vdpau: Move VDPAU interface pointers into one struct
  vo_vdpau: Add template file for VDPAU functions
  ...
2009-09-19 00:28:17 +03:00
Uoti Urpala
c2d0a9c8a7 VO: Prefer vo_vdpau over vo_xv again
vo_vdpau should now be fixed enough that it's a clearly better choice
than vo_xv.
2009-09-19 00:25:36 +03:00
Uoti Urpala
3c70c5dc95 vo_vdpau: Fix X event handling bugs
check_events() first checked for a RESIZE event and called resize() if
needed, and then queued a frame to be reshown if in pause state and
the event was either RESIZE or EXPOSE. The most obvious problems with
the code were:
   - resize() already called flip_page() internally, so the code in
     check_events could lead to _two_ frames being queued.
   - The call in resize() didn't depend on pause status, so the
     behavior was inconsistent.
   - The code in check_events() actually queued the wrong output
     surface. It showed the same surface as flip_page() would show
     _next_, while it should have shown the previously shown one. This
     typically led to the screen contents changing to a previous
     state, as the new surface had not been initialized and had
     contents from a previous use.

Fix the double update. Make resize() also only immediately update the
video if paused (this also affects changing to/from fullscreen) and
otherwise leave the old window contents be until the next frame. Queue
the right frame in check_events(). Also make resize() a bit more
careful to only show contents if they were successfully updated
(though a case where we're paused without content to show shouldn't
normally happen).
2009-09-19 00:00:42 +03:00
reimar
bf52efc804 Re-add some ifdefs, partially reverting r29688, since mDisplay and
mScreen are undefined during a Windows build without X11 support.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29690 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-18 18:46:12 +00:00
reimar
f5c7d8c92f Use vo_w32_window directly instead of via the vo_window macro in Windows-only code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29689 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-18 18:25:17 +00:00
reimar
2eab60ecf3 Get rid of several (probably) pointless ifdefs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29688 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-18 16:51:19 +00:00
Uoti Urpala
350fc4f5a2 core/VO: Allow VO drivers to add/modify frames
Add interfaces to allow VO drivers to add or remove frames from the
video stream and to alter timestamps. Currently this functionality
only works with in correct-pts mode. Use the new functionality in
vo_vdpau to properly support frame-adding deinterlace modes.

Frames added by the VDPAU deinterlacing code are now properly timed.
Before every second frame was always shown immediately (probably next
monitor refresh) after the previous one, even if you were watching
things in slow motion, and framestepping didn't stop at them at all.
When seeking the deinterlace algorithm is no longer fed a mix of
frames from old and new positions.

As a side effect of the changes a problem with resize events was also
fixed. Resizing calls video_to_output_surface() to render the frame at
the new resolution, but before this function also changed the list of
history frames, so resizing could give an image different from the
original one, and also corrupt next frames due to them seeing the
wrong history. Now the function has no such side effects. There are
more resize-related problems though that will be fixed in a later
commit.

The deint_mpi[] list of reserved frames is increased from 2 to 3
entries for reasons related to the above. Having 2 entries is enough
when you initially get a new frame in draw_image() because then you'll
have those two entries plus the new one for a total of 3 (the code
relied on the oldest mpi implicitly staying reserved for the duration
of the call even after usage count was decreased). However if you want
to be able to reproduce the rendering outside draw_image(), relying on
the explicitly reserved list only, then it needs to store 3 entries.
2009-09-18 17:12:53 +03:00
reimar
dffa8cb272 Use ecx instead of ebx to avoid unnecessary issues with PIC.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29687 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-17 19:03:31 +00:00
Uoti Urpala
6847e5e297 video_out.h: Cosmetics
Reindent structs that used 8-space indent, change type of is_new to
bool, remove unnecessary <stdarg.h> include.
2009-09-17 18:15:25 +03:00
Uoti Urpala
74619f275e VO interface: Remove obsolete draw_frame() from new interface 2009-09-17 18:15:20 +03:00
Uoti Urpala
e1ecc43152 Merge svn changes up to r29684 2009-09-16 22:28:12 +03:00
Uoti Urpala
3b3dfc02ac vo_vdpau: Support recovering from VDPAU display preemption
Add code to reinitialize all VDPAU objects if a display preemption
condition occurs. Reinitializing them in the middle of playback will
cause video corruption at least until the next keyframe when using
hardware decoding, but decoding does seem to recover after a keyframe.
2009-09-07 03:12:02 +03:00
reimar
b3a789863e Add standard license header and move a misplaced comment.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29649 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-05 08:48:48 +00:00
Uoti Urpala
d1c7ac9dbf vo_vdpau: Support updating OSD while paused 2009-09-05 06:33:33 +03:00
Uoti Urpala
1d54218465 vo_vdpau.c: Reindent control() switch statement 2009-09-05 06:25:55 +03:00
Uoti Urpala
d9cea6a98b vo_vdpau: Allocate one large surface for EOSD content
Create a single large bitmap surface for EOSD objects and pack all the
bitmap rectangles inside that. The old code created a separate bitmap
surface for every bitmap and then resized the cached surfaces when
drawing later frames. The number of surfaces could be large (at least
about 2000 for one sample subtitle script) so this was very
inefficient. The old code also used a very simple strategy for pairing
existing surfaces to new bitmaps; it could resize tiny surfaces to
hold large glyphs while using existing large surfaces to hold tiny
glyphs and as a result allocate arbitrarily much more total surface
area than was necessary.

The new code only supports using a single surface, freeing it and
allocating a larger one if necessary. It would be possible to support
multiple surfaces in case of hitting the maximum bitmap surface size,
but I'll wait to see if that is actually needed before implementing
it. NVIDIA seems to support bitmap surface sizes up to 8192x8192, so
it would take either a really pathological subtitle script rendered at
a high resolution or an implementation with lower limits before
multiple surfaces would be necessary.

The packing algorithm should successfully pack the bitmaps into a
surface of size w*h as long as the total area of the bitmaps does not
exceed 16/17 (w-max_bitmap_width)*(h-max_bitmap_height), so there
should be no totally catastrophic failure cases. The 16/17 factor
comes from approximate sorting used in the algorithm. On average
performance should be better than this minimum guaranteed level.
2009-09-05 06:25:47 +03:00
reimar
76d4cd713f Factor out duplicated code to set play video scaled by a certain factor.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29646 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-04 18:43:28 +00:00
reimar
5f76d2416b Subopt parser subopts should now be const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29645 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-04 18:21:28 +00:00
Uoti Urpala
0e1b7765be Merge svn changes up to r29644 2009-09-04 19:49:35 +03:00
reimar
d0c1992160 Consistently use sizeof(variable) instead of sizeof(type) where easily possible.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29632 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-02 14:18:01 +00:00
reimar
25cc492d90 Cosmetics: get rid of many pointless ()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29631 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-02 14:11:30 +00:00
reimar
7a7c246709 Reduce code duplication for half/normal/double video size handling.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29630 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-02 14:02:15 +00:00
reimar
001e4be0ba Remove unused variable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29629 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-02 11:38:18 +00:00
reimar
144b7f5989 vo_quartz: change deallocation/uninit to more reliably free allocated data.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29618 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-02 09:51:38 +00:00
reimar
1b3c42472d Make glContext a local variable, it is not needed outside the function
where it is allocated, reference counting takes care of freeing it.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29617 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 21:16:58 +00:00
reimar
9ad17fad92 Add a dealloc function to corevideo to reduce the memleaks from
(for my sample) about 12 MB to 2 MB.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29616 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 21:12:33 +00:00
reimar
cb9e32c88c Fix some of the major memleaks of vo_corevideo with -fixed-vo
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29615 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 20:09:01 +00:00
reimar
e8d5289623 Do not do a unmap/map cycle on Windows given with -wid, with some window
managers this has the ugly side-effect of moving the window.
Instead call XInstallColormap to ensure the Colormap is installed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29614 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 16:39:46 +00:00
reimar
a1f744cb07 Check setGlWindow return value to fail properly instead of crashing if e.g.
no OpenGL support is available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29612 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 15:20:05 +00:00
reimar
7b7302b096 Make shm_fd a local variable and close it when we need it no longer, thus
fixing a file descriptor leak.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29609 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 12:12:45 +00:00
reimar
0f7fe32725 Reduce vo_corevideo memleaks by initializing static context etc. only once
in preinit and freeing the video-specific data before reallocating in config.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29608 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 10:48:47 +00:00
reimar
b125a31886 Fix memleak when using fontconfig without a font name.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29607 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 10:17:22 +00:00
reimar
d7676e783e Use MPlayer's standard aspect handling functions in corevideo
instead of reimplementing them incompletely.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29606 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-01 09:36:04 +00:00
Uoti Urpala
575331d73c Merge branch 'vdpau_old' into vdpau 2009-08-31 22:18:51 +03:00
Uoti Urpala
84964c0dec vo_vdpau.c: cosmetics 2009-08-29 21:01:55 +03:00
Uoti Urpala
3013f956dc vo_vdpau: reindent after GUI code removal 2009-08-29 21:01:55 +03:00
Uoti Urpala
fa860a7ffa vo_vpdau: Clean up uninit logic 2009-08-29 21:01:55 +03:00
Uoti Urpala
e2e0d58407 vo_vdpau: Make CHECK_ST macro safer
Also contains a couple of changes in destroy_vdpau_objects.
2009-08-29 21:01:54 +03:00
Uoti Urpala
7d79dd972d vo_vdpau: Move all remaining static/global variables to context 2009-08-29 21:01:54 +03:00
Uoti Urpala
35dbbc9e31 vo_vdpau: Move things to context struct 2009-08-29 21:01:54 +03:00
Uoti Urpala
8a26256b87 vo_vdpau: Make info struct const 2009-08-29 21:01:54 +03:00
Uoti Urpala
3512f985e0 vo_vdpau: Replace global function table with context variable 2009-08-29 21:01:46 +03:00