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.
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.
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).
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.
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).
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.
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.
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.
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.)
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.
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.
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.
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().)
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.)
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.
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.
The check for HAVE_AV_CODEC_NEW_VDPAU_API just determines whether the
new vdpau libavutil pixel format is available (which implies presence of
the new API). However, that pixel format (and the correspondig config
test define) is also used in generic code (compiled even without vdpau)
in fmt-conversion.c. Since the configure test didn't define the symbol
if vdpau was not available, it broke in this case.
The URL option parser only accesses certain fields. Remove the fields
that are not accessed, and thus are completely unused and inaccessible.
Historically, these fields were supposed to be settable using an extra
list of options passed to open_stream(). Commit f518cf7 removed these
extra options. Apparently nothing ever actually used this facility.
Using the default output audio unit should provide a much better user
exeperience since it changes automatically the output device based on which
becomes the default one.
Instead of generating vdpau_template.c with a Perl script, just include
the generated file in git. This is ok because it changes very rarely,
and the script is larger than the output it generates.
It also simplify the Makefile, and fixes the build. The problem was that
transitive dependencies do not work with generated files: there is no
dependency information yet when building it the first time. I overlooked
this because I didn't delete the .d files for testing (which contained
the correct dependencies, but only _after_ a first successful build).