Commit Graph

35802 Commits

Author SHA1 Message Date
wm4 c6db8f6a8b version.sh: add --print option, which prints version to stdout
Might be helpful when creating a tarball.
2013-08-09 10:07:23 +02:00
wm4 b27f65a758 version.sh: integrate the release tag in output
This is basically reconstructed from 46b218c. Since we now have proper
release tags, we want this again.

Add --tags to the git describe call, because the github release system
creates light-weight tags only, and we're too lazy to create annitated
tags (or is that bad practice?).

Add --long, so that the git commit hash is part of the output even if
the tag matches.
2013-08-09 09:44:24 +02:00
wm4 d8922361d1 demux_lavf: blacklist "tty" libavformat demuxer
This is completely useless, and in this particular case, it broke the
fallback for MLP2 subtitles (stored as .txt files) to demux_subreader.
(Yes, libavformat should be fixed to handle this, but for now this will
_always_ break playback of subtitle files stored in .txt.)

You can still force this demuxer, but by default we will just pretend
that the "tty" demuxer does not exist.
2013-08-07 23:15:43 +02:00
Alexander Preisinger 182b470567 changes.rst: add precise scrolling support 2013-08-07 22:26:56 +02:00
Alexander Preisinger f921d5c07f input.conf: better documentation and sane defaults
Uses the same defaults as BTN3/4/5/6 which are hardcoded by most backends for
the mouse wheel.
2013-08-07 22:20:10 +02:00
Alexander Preisinger f364a1e3df wayland: add support for precise scrolling
The default value for a standard mouse is 10.0. Because we don't want to
multiply the value in the input config file we scale it down to 1.0.

Hopefully this should work for more precise mousewheels or touchpad, but
I don't have access to such hardware.
2013-08-07 22:15:39 +02:00
Alexander Preisinger 023e5ccd02 input: add support for precise scroll axes
Support horizontal and vertical axes of input devices.

If the input device support precise scrolling with an input value then it
should first be scaled to a standard multiplier, where 1.0 is the default.

The multiplier will then applied to the following commands if possible:
 * MP_CMD_SEEK
 * MP_CMD_SPEED_MULT
 * MP_CMD_ADD

All other commands will triggered on every axis event, without change the
values specified in the config file.
2013-08-07 22:15:39 +02:00
Stefano Pigozzi 406241005e core: move contents to mpvcore (2/2)
Followup commit. Fixes all the files references.
2013-08-06 22:52:31 +02:00
Stefano Pigozzi bc27f946c2 core: move contents to mpvcore (1/2)
core is used in many unix systems for core dumps. For that reason some tools
work under the assumption that the file is indeed a core dump (for example
autoconf does this).

This commit just renames the files. The following one will change all the
includes to fix compilation. This is done this way because git has a easier
time tracing file changes if there is a pure rename commit.
2013-08-06 22:48:47 +02:00
wm4 d40a91e804 gl_video: handle non-mod-2 4:2:0 YUV video correctly
Allocate textures big enough to include the bottom/right borders (so the
chroma texture sizes are rounded up instead of down). Make the texture
large enough to include the additional luma border. Conceptually, we
pretend that the video frame is fully aligned, and then crop away the
unwanted borders. Filtering (even just bilinear) will access the
borders anyway, so it's possible that we might need to switch to
"harder" cropping instead, but at least pixels not close to the
border should be displayed correctly now.

Add a comment to mp_image.c about this luma border. These semantics are
kind of subtle, and the image allocation code handle this in a subtle
way too, so it's better to document this explicitly. The libavutil
image allocation code does similar things.
2013-08-06 21:46:47 +02:00
Diogo Franco 57ec67a6cc Merge pull request #154 from rossy2401/wasapi-pause
WASAPI stops working after pause
2013-08-05 18:22:46 -07:00
Alexander Preisinger 9b6947fcdb changes.rst: mention wayland support
In case website copy&paste outdated information again.
2013-08-05 20:40:17 +02:00
wm4 248b06baa0 mp_msg: fix typo in comment 2013-08-05 19:18:33 +02:00
wm4 3be39ed76c stream_radio: fix some things
Using the radio set/step channel commands would have crashed (that was
broken for about a year, nobody ever noticed). The "capture" part of
a radio:// URI was incorrectly passed (this was broken quite recently).

Still couldn't test it fully. I have no radio device. I suspect nobody
uses this feature or will ever use it again.
2013-08-05 19:18:22 +02:00
wm4 ee2e3b3374 core: change speed option/property to double
The --speed option and the speed property used float. Change them to
double.

Change the commands that manipulate the property (speed_mult/add) to
double as well. Since the cycle command shares code with the add
command, we change that as well.

The reason for this change is that this allows better control over
speed, such as stepping by semitones. Using floats is also just plain
unnecessary.
2013-08-05 00:00:26 +02:00
wm4 cccfac47a4 demux_lavf: make avio buffer configurable
Perhaps not very useful, but reserved for situations when a user reports
awful latency and experimentation/debugging might be required to find
out why or to fix it (happens often).
2013-08-04 23:25:54 +02:00
wm4 b53497a403 demux_lavf: fix API usage
avio_alloc_context() is documented to require an av_malloc'ed buffer. It
appears libavformat can even reallocate the buffer while it is probing,
so passing a static buffer can in theory lead to crashes.

I couldn't reproduce such a crash, but apparently it happened to
mplayer-svn. This commit follows the mplayer fix in svn commit r36397.
2013-08-04 23:21:50 +02:00
wm4 56fec5ad3a option: fix inverted --mouseinput option
Also fixes --no-mouseinput.
2013-08-03 14:56:28 +02:00
wm4 2710ae8017 command: make vf and af commands more verbose
On success, print the filter chain on the OSD. Otherwise, show an error
message on the OSD (just enough so that the user knows whether the
command worked).
2013-08-03 14:56:27 +02:00
wm4 cdc6810e59 command: add vf/af properties 2013-08-03 14:47:33 +02:00
wm4 ef3c5a75ab command: split filter changing in two functions
One function sets a raw filter list, the other allows "editing" the
filter list.
2013-08-03 14:47:32 +02:00
wm4 d1c563c0a9 options: don't make options set during playback file local (e.g. --vf)
Refactor file local options handling: instead of making all options
implicitly file local between loading a file and terminating playback,
explicitly make options file local which are required to be file local.

Or in other words, introduce a M_SETOPT_BACKUP flag, which forces file
local-ness when setting an option, and use this for file local command
line options, per-file config files, and per-protocol/extension/vo/ao
profiles.

In particular, this changes the "vf" input command such that video
filters stay permanent even when going to the next file in the playlist.
The underlying reason for this is that the "vf" command uses the option
setting command. This influences the "af" command as well.
2013-08-02 18:00:38 +02:00
wm4 878a94d000 configure: lower libdvdread minimum required version
This version number was essentially random. When I switched the test
to pkg-config, I took the libdvdread version from my Debian unstable
system as the minimum (as I knew that this version worked).

A user reported that the libdvdread version 4.1.4 appeared to work
fine, so lower the minimum version to the 4.1.x series.
2013-08-02 17:08:36 +02:00
wm4 bd0454c31d m_option.c: fix typo in message 2013-08-02 17:06:49 +02:00
wm4 4e45fbed24 m_config: minor simplification
The optstruct parameter in the m_config_parse_option functions was not
needed.
2013-08-02 17:06:43 +02:00
wm4 44d6ac06ae stream: parse URL escapes for file://
So for example "file:///file%20name.mkv" will open "file name.mkv".

I'm not sure whether we want/need this. The old code didn't do it.
Also, it's not really clear whether this is handled correctly. It
seems the corresponding freedesktop.org "standard" allows a (useless)
hostname part, which we should skip in theory. The number of slashes
is not really clear either. We can open relative filenames (by removing
one of the slashes from the example above), which is perhaps an
unneeded feature. How does this even work with Windows paths?

This issues can probably be corrected later.

The URL unescape code is based on code from m_option.c removed with
a recent commit.
2013-08-02 17:05:26 +02:00
wm4 f8589c9889 Remove m_struct
Not needed anymore.
2013-08-02 17:03:13 +02:00
wm4 bc1d61cf42 stream: redo URL parsing, replace m_struct usage with m_config
Move the URL parsing code from m_option.c to stream.c, and simplify it
dramatically. This code originates from times when http code used this,
but now it's just relict from other stream implementations reusing this
code. Remove the unused bits and simplify the rest.

stream_vcd is insane, and the priv struct is different on every
platform, so drop the URL parsing. This means you can't specify a track
anymore, only the device. (Does anyone use stream_vcd? Not like this
couldn't be fixed, but it doesn't seem worth the effort, especially
because it'd require potentially touching platform specific code.)
2013-08-02 17:02:34 +02:00
wm4 964194b55b manpage: clean up environment variables section 2013-08-02 13:43:11 +02:00
wm4 ac6b150e94 manpage: document exit codes 2013-08-02 13:19:23 +02:00
wm4 7cec9b1ffe manpage: move screenshot section above option list
Seems more logical, because general usage instructions are before the
option list as well.
2013-08-02 13:06:11 +02:00
Andre D bda5e6d9fd mplayer: add more verbose exit codes 2013-08-02 13:00:25 +02:00
Rudolf Polzer e56cedb384 encoding-example-profiles: get rid of the N900 anti upscale hack.
This slightly increases file size due to needless downscaling on the device due
to aspect correction, but keeps quality as is and prevents encoding errors
caused by odd height/width.
2013-08-02 09:31:57 +02:00
Stefano Pigozzi 0bd09da570 ao_coreaudio: move to new log API 2013-08-01 20:32:49 +02:00
Stefano Pigozzi 5cd5f0cf70 ao_coreaudio: remove useless defines
They are already defined in the header file
2013-08-01 20:32:49 +02:00
Stefano Pigozzi 3449e893e1 audio/out: add support for new logging API 2013-08-01 20:32:49 +02:00
Stefano Pigozzi 01178727a9 vo_corevideo: use new log API
Also removes the printing of the OpenGL info when using verbose mode since
gl_common already does that.
2013-08-01 08:38:29 +02:00
Stefano Pigozzi 3b236d176d vo_corevideo: move to C from Objective-C
This file was alredy written in C. The only remaining part was the file
exension and `#import`s.
2013-08-01 08:28:16 +02:00
Stefano Pigozzi 94df9ef797 cocoa_common: use new log API 2013-08-01 08:23:53 +02:00
Alexander Preisinger 6443a9b16c wayland: switch to the new mp_msg api 2013-07-31 21:52:16 +02:00
wm4 03bef3adfd video/out: use new mp_msg stuff for vo.c and vo_opengl
The first step; also serves as example.
2013-07-31 21:46:40 +02:00
wm4 88d79fc00d mp_msg: introduce new log functions and macros
This has two goals:
1. Getting rid of global variables to make the core library-safe.
2. Getting rid of all the MSGT_* constants and the inconsistent
   prefixes spread throughout the source code.

Both goals are not immediately reached with this commit. It's a huge
transition that will take time. There are over >2500 mp_msg calls in the
source, which all have to be replaced for this to work.

The inconsistent prefixes are in particular annoying. Lots of code
manually prefixes messages, e.g. mp_msg(MSGT_VO, MSGL_V, "[vo] ...").
Sometimes the prefixes don't even follow this convention (for example
vo_direct3d.c uses "<vo_direct3d>" as prefix). This commit allows
automatically adding prefixes on request, so consistency will
hopefully improve.

For now, this commit adds unused stuff, and behavior should not change.

In mplayer.c, move the GetCpuCaps() call, because that used mp_msg()
before mp_msg_init() was run.
2013-07-31 21:46:40 +02:00
wm4 d1de1e090f options: handle presets directly in m_config
This means that "mpv -vo opengl-hq:help" will actually show the correct
defaults, instead those of plain vo_opengl.
2013-07-31 20:56:00 +02:00
wm4 d6592dd2e2 m_option: fix skipping of missing -vo/-ao entries
The -vo/-ao options support skipping of unknown entries for the sake of
allowing using the same config on possibly very different systems, which
have different sets of VO/AOs available.

Unfortunately skipping didn't quite work, possibly a rebase error when
this was originally committed. Fix it.
2013-07-31 20:55:59 +02:00
wm4 a8a0c5023b m_config: remove alias information
We don't need to store anymore whether an option is aliased by another
option (which is what the alias_owner member did). Also, that member
had a really bad name.

This also removes some unneeded code from config_destroy(). Calling
m_option_free() is always ok; this just skipped the call if it did
nothing. In particular, it's ok to call m_option_free() on the same
pointer multiple times. (Maybe that function is misnamed, and it should
be m_option_clear().)
2013-07-31 20:55:59 +02:00
wm4 0656411e97 m_config: store file local backup options differently
File local options need to backup the global option value while a file
is played. Instead of keeping a pointer in m_config_option for the
backup value, put it into a separate list. This reduces per-option
overhead for a rarely used obscure feature. (This implementation would
have been a bit dumb in pre-mpv m_config, because there local options
were the default, and _all_ options were backed up when starting
playback of a file. This is not the case anymore, and normally only
a very small number of options are backed up by default.)
2013-07-31 20:53:00 +02:00
wm4 42f06fb915 m_config: make m_profile struct non-public 2013-07-31 20:43:31 +02:00
Stefano Pigozzi ff3b98d11c cocoa_common: simplify resize code
This introduces some changes in resize behaviour. Most importantly the window
frame is not constrained to it's screen's `visibleFrame`. Anyone who still wants
that kind of behaviour when opening a video, can use `--autofit-larger`.

Even though the size of the window is not constrained, it's position is, so
that the titlebar will always be visible. When using `--no-border` even the
position will not be constrained in any way.
2013-07-30 20:02:48 +02:00
wm4 a34c707f03 vd_lavc: print warning if hardware decoding API is not available
At least currently, this case pretty much happens only in the case vdpau
is requested, but not compiled in.
2013-07-30 16:32:21 +02:00
wm4 7f5303fbb6 vd_lavc: fix CONFIG_VDPAU check
CONFIG_VDPAU was just defined to 0, instead of undefined when vdpau was
unavailable. I blame the old mplayer code, which apparently can't have
consistent conventions.
2013-07-30 16:26:54 +02:00