| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were some slight differences between what input.conf mapped, and
what was in input.c def_cmd_binds[]. Make them match.
Add some minor documentation improvements in input.cfg.
Also remove double comments ('##'), because they were confusing.
|
| |
| |
| |
| |
| | |
Use the <X11/keysymdef.h> xlib header instead. I'm not sure why mplayer
defined these constants itself.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At least on some keyboards, the key between '0' and 'Enter' on the
key pad is mapped to KP_Separator. Since X11 VOs accept unicode
input, the mplayer keycode this key generates depended on the numlock
state, and with numlock enabled this mapped to an ASCII character.
This is probably not what the user wanted, since two physical keys
will always map to the same key code.
Map it to KP_DEC.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This assumes the terminal uses UTF-8. If invalid UTF-8 is encountered (for
example because the terminal uses a legacy encoding), the code falls back
to the old method and feeds each byte as key code to the input code.
In theory, UTF-8 input could randomly fail, because the code in getch2.c
doesn't try to fill the input buffer correctly with input sequences
longer than a byte. This is a problem with the design of the existing
code.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change allows using non-ASCII keys with X11. These keys were ingored
before.
Technically, this creates an invisible, non-interactive input method
context. If creation fails, the code falls back to the old method, which
allows a subset of ASCII only.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This moves all key codes above the highest valid unicode code point (which
is 0x10FFFF). All key codes below MP_KEY_BASE now directly map to unicode.
Configuration files (input.conf) can contain unicode characters in UTF-8
to map non-ASCII characters/keys.
This shouldn't change anything user visible, except that "direct key codes"
(as used in input.conf) will change their meaning.
|
| |
| |
| |
| | |
Parts taken from libavutil's GET_UTF8 and slightly modified.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Libav started automatically enabling threaded decoding a while ago.
This is not safe, as it means callbacks can suddenly get called from
other threads and outside calls to libavcodec. We need to know when
threading will be used and disable thread-unsafe callbacks in those
cases. Explicitly set thread count to 1 instead of leaving it at 0
(which triggers the autodetection) when we are not requesting more
threads; this should make sure that autodetection on libavcodec side
will not be used.
|
| | |
| | |
| | |
| | |
| | |
| | | |
A string freed with m_struct_free() was allocated with strdup(). This
would cause a crash when using vcd:// streams. Fix to use
talloc_strdup().
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now PulseAudio is preferred over ALSA, which in turn is preferred over
OSS. This should give best results on all systems. On systems with
PulseAudio, we will always use it natively, rather than through the
suboptimal ALSA emulation (which the default ALSA output is normally
redirected to when PulseAudio is active; ALSA hardware devices will
not be, but to use those the user must set AO explicitly in any case,
so changing the defaults makes no difference). The fallback from
ao_pulse to ao_alsa causes no noticeable delay on systems without
PulseAudio. On systems with ALSA, we won't attempt to use OSS anymore.
Also, move OpenAL above SDL. OpenAL should generally work better than
SDL.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the volume multiplier is 1, the data shouldn't be changed, but the
code actually multiplied each sample with 255/256. Change the factor to
256, and hope there wasn't a good reason for the value 255.
Additionally, don't work on the data if it wouldn't be changed anyway.
This is a micro-optimization.
This doesn't touch the code path for the float format.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since the recent OSD redraw changes, every GUI expose event causes the
message "===== PAUSE =====" to be printed on console. This was a bit
annoying, so change it so that it is only printed once when going into
paused mode. It's also printed again if the cache status changes (when
playing URLs), or when the status line is printed during pause mode (when
you seek while paused).
This also removes some minor code duplication.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the OSD was enabled and the player was paused by executing the
frame_step command, the OSD still displayed the icon indicating
playback. Fix this and always set the proper icon when the pause
state is changed.
|
| | |
| | |
| | |
| | |
| | |
| | | |
access_mpcontext.h and the declared functions in mplayer.c were only
used by the now deleted internal GUI. Remove the unused header and
functions.
|
| | |
| | |
| | |
| | |
| | | |
Pass avpacket->side_data when using a libavcodec audio decoder
together with libavformat demuxer (this was already done for video).
|
| | |
| | |
| | |
| | |
| | | |
Make vf_fspp compile without using internal Libav/FFmpeg files and
compile it by default.
|
| | |
| | |
| | |
| | |
| | |
| | | |
stream_ffmpeg was using the libavformat URLContext API. This API has
been deprecated (for public use at least) in libavformat. Switch to
the AVIOContext API.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Update various code using Libav libraries to remove use of API
features that were deprecated at Libav release 0.7. I think this
removes them all with the exception of URLContext functions still used
in stream_ffmpeg.c (at least other uses that generated deprecation
warnings with libraries from 0.7 are removed).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Require versions of the Libav libraries corresponding to Libav release
0.7. These are:
libavutil 51.7.0
libavcodec 53.5.0
libavformat 53.2.0
libswscale 2.0.0
libpostproc 52.0.0
Also disable the fallback to simple header check if these libraries
could not be found with pkg-config; now compiling without pkg-config
support for these always requires explicitly setting --enable-libav
and any needed compiler/linker flags. The simple check would have let
compilation proceed even if a version mismatch was detected.
|
| |/
| |
| |
| |
| |
| |
| | |
Recent commits for screenshot support and video redraw changes didn't
handle vdpau driver preemption state correctly, which could make the
player crash if preemption occurred. Fix this and improve preemption
handling a bit otherwise.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding these flags improves the quality of the YUV->RGB conversion when
screenshots are taken. It trades precision for performance.
This doesn't affect any other swscale uses, such as vf_scale or vo_x11.
Based on a patch by cantabile. Fixes #140.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When --shuffle was used, the pt_step -1 jumped to the next file, instead
of the previously played file. This was because the playtree entries were
never actually shuffled, but instead a random unplayed file was picked.
Fix this by actually shuffling the playtree in advance. I couldn't see any
clear location where exactly this should happen, so it's done when a
playtree iterator is created.
Not removing the old code, since new playtree entries could be added while
an iterator is active.
|
| |
| |
| |
| |
| |
| | |
This simplifies the code. It also can make loading of mkv files faster, as
initializing two ASS_Render instances required scanning mkv font
attachments twice.
|
| |
| |
| |
| | |
Less mutable state = better.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note: now that libmenu has been removed, the related code in input.c has
been removed. If libmenu is ever added back, a queue_remove() function
that can remove any item in the input queue will be required.
libmenu triggered some special case that caused crashes by double frees.
In particular the queue_pop function is used, expecting to remove an element
that is not necessarily always the one that queue_pop removes. Fix by
adding a queue_remove functions. Rewrite the other queue functions, since
these are probably buggy as well. queue_pop didn't even attempt to
maintain the doubly linked list.
|
| |
| |
| |
| | |
Playing a video and then an audio file only left the VO window on screen.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mplayer used to follow the convention of using a single dash ("-help") for
each option. For some reason "--help" was allowed as special case.
mplayer2 introduced a change to allow the more common convention with two
dashes ("--help"). This means that in combination with the old special
case for "--help", "---help" would suddenly be allowed.
Remove this special case.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to be a bit more clever when scanning for linked mkv files (ordered
chapters feature). Instead of just preferring filenames with a closer
prefix match, consider file sizes as well. The assumption is that it is
better to scan small files first. Achieve this by sorting by prefix
first, and then by file size.
In order to make this new behavior trigger more often, be a more "fuzzy"
about the prefix matching: consider all matches in a certain range as
equal.
This will speed up the following case:
title_01.mkv
title_02.mkv
title_03.mkv
title_op.mkv (title0*.mkv link to it)
Playing title_01.mkv, the old code would first scan title_0*, and then
title_op.mkv, as "title_0" is the largest prefix. The new code would
reduce the common prefix to "title", and then sort the resulting files
by size, causing title_op.mkv to be scanned first. The total number of
scanned files is reduced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the "expand" filter makes the image area larger by adding
borders to the video frame. These borders are supposed to be always
black. The filter relied on the borders in its output buffer staying
black without redrawing them for each frame. However, when using
direct rendering, a video filter inserted after vf_expand can draw
into these borders, for example the "unsharp" and "ass" filters. These
changes incorrectly stayed visible in the the following video frames.
Fix this by always clearing the borders in vf_expand. In some cases,
this might be more work than necessary, but vf_expand has no way of
detecting whether a subsequent filter draws into the borders or not,
and this avoids fragile assumptions about the existing contents of the
output buffer(s).
This also deals with frame size changes when config() is called again.
Before this commit, remains of the old video were visible if the new
video frame size was smaller than before.
Since we now always clear the borders, there's no more need for the
complicated code that cleared only the regions that were covered by the
OSD. Delete that.
|
|
|
|
|
|
| |
When config() is called multiple times (e.g. aspect ratio changes
while the same file is playing), the user settings are not honoured,
because config() overwrites them. Don't do that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a crash with vo_gl when the switch_ratio slave command is used
while a displaying an animated subtitle. switch_ratio will cause a config()
call to vo_gl, which will reset all state, including the EOSD state. Next
time the EOSD is rendered, its change detection will indicate that only
subtitle positions have changed. The render code will attempt to access
the EOSD data structures which have been deleted with config().
Fix this by forcing the change detection to indicate a full change if
config() has been called.
This only happens when doing switch_ratio with vo_gl, and the current
subtitle is only changing positions, i.e. mp_eosd_images_t.changed == 1.
|
|
|
|
|
| |
Remove support for building the player without libavcodec and
libavformat. These libraries are now always required.
|
| |
|
|
|
|
|
|
|
| |
With current typical video sizes, font sizes are large enough that
they don't really need hinting (and particularly so for font sizes in
display-resolution rendered subtitles in fullscreen mode), and hinting
apparently causes problems with some fonts.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Currently there is no way to set the swap interval with a function
that has a signature compatible with other platforms' gl extensions.
Make a wrapper function around the gui toolkit method of setting the
swap interval property, and point gl->SwapInterval to it.
|
| |
| |
| |
| |
| |
| | |
Remove the useless dependency on MPGLContext from cocoa_common, since
it was used just to access the vo struct. Change gl_common to pass the
vo struct directly to all the cocoa_common functions.
|
|\| |
|
| |
| |
| |
| |
| | |
Also change the WM_CLASS "application class" string from "MPlayer" to
"mplayer2". This string is visible as application name in Gnome 3.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Always set the X11 window title properties as UTF-8. This is a bit tricky
for X11 window properties which are not specified to use UTF-8, such as
WM_NAME.
We also properly set WM_ICON_NAME, which means the window caption and the
text used in the task bar (of the WM has one) will be the same on most
window managers. Before this commit, WM_ICON_NAME was always hardcoded to
"MPlayer", even if --title or --use-filename-title was used.
Also update the window title only on reconfigure, like it is done in
mplayer-svn commit 34380.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This affects only the "new" VO API. The config() title argument was barely
used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa
GUI backends, which are the only ones properly supporting window titles,
ignored this argument. Remove the title argument.
Add the vo_get_window_title function. All GUI VOs are supposed to use it
for the window title.
|
| |
| |
| |
| |
| |
| | |
Avoid call |