Commit Graph

90 Commits

Author SHA1 Message Date
wm4 d811f6a9ed build: use pkg-config for xscreensaver 2014-08-16 22:00:00 +02:00
wm4 f8f3a1b4a1 build: drop check for XF86keysym.h
This is always included in the Xorg development headers. Strictly
speaking it's not necessarily available with other X implementations,
but these are hopefully all dead.
2014-08-16 21:57:51 +02:00
wm4 fe782a6e95 x11: use xrandr to retrieve display refresh rate
Drop use of the ancient XF86VM, and use the slightly less ancient Xrandr
extension to retrieve the refresh rate. Xrandr has the advantage that it
supports multiple monitors (at least the modern version of it).

For now, we don't attempt any dynamic reconfiguration. We don't request
and listen to Xrandr events, and we don't notify the VO code of changes
in the refresh rate. (The later works by assuming that X coordinates map
directly to Xrandr coordinates, which probably is wrong with compositing
window manager, at least if these use complicated transformations. But I
know of no API to handle this.)

It would be nice to drop use of the Xinerama extension too, but
unfortunately, at least one EWMH feature uses Xinerama screen numbers,
and I don't know how that maps to Xrandr outputs.
2014-08-16 21:56:22 +02:00
wm4 061a5af544 demux_lavf: support new metadata update API
This Libav-invented API is of course completely different from the
FFmpeg-one. (The fun part is that I approved of both.)
2014-08-14 01:18:18 +02:00
Stefano Pigozzi 2e241c0a47 build: allow to disable building the cplayer 2014-08-06 09:31:59 +02:00
Stefano Pigozzi 212374149f build: expose waf variants to the user
This allows the user to execute multiple configuration and build steps. It
can be used for several scenarios where you need different compiler flags.
2014-08-06 09:31:59 +02:00
FRAU KOUJIRO 022a43de8e build: cocoa-application config target
I had to put it after video options because it depends on cocoa;
is there anywhere better to put it rather than making a new group?
2014-08-06 09:31:59 +02:00
wm4 bdf607ea5f build: list exported symbols explicitly
Instead of using a regex to match names to be exported from the libmpv
dynamic shared library, use a libmpv.def file, which lists all exported
functions explicitly.

This reduces the platform specifics in syms.py. I'm not sure if the
separate compile_sym task is still needed (it could probably be
collapsed, which would concentrate the platform specifics into one
place).
2014-08-05 02:21:29 +02:00
wm4 91fbaa7d34 build: fix cross-compilation of libmpv
libmpv requires nm for creating the list of exported symbols (this is
done in syms.py). We should probably just make this list static instead,
but since this involves platform-specific code, for now this quick-fix
will do.
2014-08-05 00:20:31 +02:00
Stefano Pigozzi 6aac17cebb vda: only support the new hwaccel 1.2 API (remove old code)
Since the new hwaccel API is now merged in ffmpeg's stable release, we can
finally remove support for the old API.

I pretty much kept lu_zero's new code unchanged and just added some error
printing (that we had with the old glue code) to make the life of our users
less miserable.
2014-08-01 10:38:18 +02:00
wm4 77d9e4b8a9 ao_pulse: remove hacks for ancient PulseAudio versions
This was needed by very old (0.9) versions only. Get rid of it.

Unfortunately, I can't cross-check with the original bug report, since
the bug URL leads to this:

Internal Server Error

TracError: IOError: [Errno 2] No such file or directory: '/home/lennart/svn/trac/pulseaudio/VERSION'
2014-07-26 23:19:48 +02:00
Tsukasa OMOTO b0ff0527a3 build: enable compiler optimization by default 2014-07-20 00:08:36 +02:00
wm4 23a7257cca Revert "Remove DVD and Bluray support"
This reverts commit 4b93210e0c.

*shrug*
2014-07-15 01:49:02 +02:00
wm4 4b93210e0c Remove DVD and Bluray support
It never worked well. Just remux your DVD and BD images to mkv.
2014-07-14 14:34:14 +02:00
wm4 d27a2bc546 build: allow compilation without any atomics
Not all compilers on all platforms have atomics available (even if they
could, technically speaking).

We don't use atomics that much, only the following things rely on it:
1. the audio pull code, and all audio outputs using it
2. updating global msg levels
3. reading log messages through the client API

Just disable 1. and 3. if atomics are not available. For 2., using fake-
atomics isn't too bad; at worst, message levels won't properly update
under certain situations (but most likely, it will work just fine).

This means if atomics are not available, the client API function
mpv_request_log_messages() will do nothing.

CC: @mpv-player/stable
2014-07-05 17:07:16 +02:00
Niklas Haas 86d3d11a68 video: Add BT.2020-NCL colorspace and transfer function
Source: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-I!!PDF-E.pdf
2014-06-22 19:00:38 +02:00
wm4 fd64bcbe8e build: remove BSD-specific /usr/local include path additions
It seems it's generally cleaner to leave this stuff to the BSDs.
Additionally, the NetBSD part wasn't even correct, because it made the
compiler prefer the system include path before local include files.
2014-06-20 22:37:41 +02:00
Alessandro Ghedini 84eebc6e4e build: check for 64bit stdatomic.h operations too
This fixes the build on platform where the atomic calls can't be turned into
lock-free instructions and thus need the external libatomic library (e.g. mips).
2014-06-17 22:44:51 +02:00
wm4 973c1fa570 gl_lcms: use thread-safe lcms API, require lcms2 2.6
The error log callback was not thread-safe and not library-safe. And
apparently there were some other details that made it not library-safe,
such as a global lcms plugin registry.

Switch the the thread-safe API provided by lcms2 starting with 2.6.
Remove our approximate thread-safety hacks.

Note that lcms basically provides 2 APIs now, the old functions, and
the thread-safe alternatives whose names end with THR. Some functions
don't change, because they already have a context of some sort. Care
must be taken not to accidentally use old APIs.
2014-06-16 18:02:52 +02:00
xylosper 858d6d93cb build: add '--enable-libmpv-static' option
Signed-off-by: wm4 <wm4@nowhere>
2014-06-16 18:02:50 +02:00
wm4 9d3232e058 build: disable zsh completions by default, fixes e.g. cross compilation
The Perl script generating the completions actually invokes mpv, and it
runs during the build. This is not sane and breaks at least cross
compilation.

As a workaround, disable the completions by default for now.
2014-06-09 15:17:03 +02:00
Alessandro Ghedini cc74bc3fec build: generate and install zsh completion script 2014-06-08 20:48:42 +02:00
wm4 aafc03aab3 wscript: update waf version check to the version in bootstrap.py 2014-06-06 17:13:50 +02:00
wm4 556bb1cf13 demux_lavf: support new rotation metadata API 2014-06-01 17:56:10 +02:00
wm4 a192f32a3a stream: remove VCD support
If a single person complains, I will readd it. But I don't expect that
this will happen.

The main reason for removing this is that it's some of the most unclean
code remaining, it's unmaintained, and I've never ever heard of someone
using it.
2014-06-01 17:22:21 +02:00
wm4 3053a68d2d tv: remove sysinfo() usage
This call was used limited the buffer size if installed RAM was below 16
MB. This stopped being useful a decade ago. The check could also
overflow on 32 bit systems. Just get rid of it.
2014-05-30 13:30:56 +02:00
wm4 e127cfa0b5 build: disable PortAudio by default
This was originally added because we thought this would make a good
portable audio API, which would give us good behavior on Windows, Linux,
and OSX. But this hope was disappointed: it's not reliable enough (nice
deadlocks on Linux when seeking, i.e. resetting the audio device),
doesn't have enough features (no channel maps, no digital passthrough),
and in general just is not very good.
2014-05-29 02:24:21 +02:00
wm4 7cc48f26e0 build: disable cdda and vcd by default
Let's see if anyone complains. cdda is relatively inoffensive, but the
vcd code is the definition of ifdef-hell.
2014-05-24 17:09:29 +02:00
wm4 8665f78018 stream_file: readjust some windows ifdeffery
Also sneak in some cosmetics.

setmode() exists on Windows/msvcrt only, so there's no need for a
config test.

I couldn't reproduce the problem with seekable pipes on wine, so axe
it. (I'm aware that it still could be an issue on real Windows.)
2014-05-24 16:17:52 +02:00
wm4 fcdaaa203b build: "tv-v4l2" needs "tv"
Fixes #795.
2014-05-22 09:29:41 +02:00
Juan Francisco Cantero Hurtado 38c8f5ea57 Fix the build on OpenBSD and FreeBSD
Without this change, the compiler uses by default the "talloc.h" file
installed by the package libtalloc within /usr/local/include. Found and
tested on OpenBSD but FreeBSD has the same patch on its ports tree.
2014-05-21 02:23:23 +02:00
wm4 8e7cf4bc99 atomics: switch to C11 stdatomic.h
In my opinion, we shouldn't use atomics at all, but ok.

This switches the mpv code to use C11 stdatomic.h, and for compilers
that don't support stdatomic.h yet, we emulate the subset used by mpv
using the builtins commonly provided by gcc and clang.

This supersedes an earlier similar attempt by Kovensky. That attempt
unfortunately relied on a big copypasted freebsd header (which also
depended on much more highly compiler-specific functionality, defined
reserved symbols, etc.), so it had to be NIH'ed.

Some issues:
- C11 says default initialization of atomics "produces a valid state",
  but it's not sure whether the stored value is really 0. But we rely on
  this.
- I'm pretty sure our use of the __atomic... builtins is/was incorrect.
  We don't use atomic load/store intrinsics, and access stuff directly.
- Our wrapper actually does stricter typechecking than the stdatomic.h
  implementation by gcc 4.9. We make the atomic types incompatible with
  normal types by wrapping them into structs. (The FreeBSD wrapper does
  the same.)
- I couldn't test on MinGW.
2014-05-21 02:21:18 +02:00
Luca Barbato e0e79a2e7e vda: Hwaccel 1.2 support
Use the new context and the default functions provided.
2014-05-12 12:59:16 +02:00
Alessandro Ghedini b6162dda12 build: bump required libpostproc version
The CPU autodetect feature was added in 52.2.100 and is lacking from the
stand-alone version at http://git.videolan.org/?p=libpostproc.git
2014-04-25 08:37:42 +02:00
wm4 0cff5836c3 Remove CPU detection and inline asm handling
Not needed anymore. I'm not opposed to having asm, but inline asm is too
much of a pain, and it was planned long ago to eventually get rid fo all
inline asm uses.

For the note, the inline asm use that was removed with the previous
commits was almost worthless. It was confined to video filters, and most
video filtering is now done with libavfilter. Some mpv filters (like
vf_pullup) actually redirect to libavfilter if possible.

If asm is added in the future, it should happen in the form of external
files.
2014-04-19 17:10:56 +02:00
wm4 132f395aac Remove radio://
It was disabled by default, works only for analogue radio, and I bet
nobody uses it.
2014-04-13 18:51:43 +02:00
Kevin Mitchell f09134b76d vf_lavfi: copy AVFrame metadata into vf_lavfi priv
store it as mp_tas and add VFCTRL_GET_METADATA to access it from elsewhere

Signed-off-by: wm4 <wm4@nowhere>

old-configure test by wm4.
2014-04-13 18:03:01 +02:00
wm4 33f822b715 video: add VapourSynth filter bridge
Mainly meant to apply simple VapourSynth filters to video at runtime.
This has various restrictions, which are listed in the manpage.

Additionally, this actually copies video frames when converting frame
references from mpv to VapourSynth, and a second time when going from
VapourSynth to mpv. This is inefficient and could probably be easily
improved. But for now, this is simpler, and in fact I'm not sure if
we even can references VapourSynth frames after the core has been
destroyed.
2014-04-12 19:31:50 +02:00
Stefano Pigozzi e2bd5139ad build: bump libbluray minimum version
The code uses BD_OVERLAY_HIDE which seems to be available from 0.3.0. Update
the pkg-config query.
2014-04-05 18:12:33 +02:00
Alessandro Ghedini cc3d4a2725 build: check if replaygain side data is available
Signed-off-by: wm4 <wm4@nowhere>

old-configure change by wm4.
2014-04-04 18:35:29 +02:00
James Ross-Gowan 065c301739 build: only check for Linux fstatfs on Linux
This check incorrectly passed on Cygwin. While Cygwin has the
statfs.f_type field, it contains the volume's FileSystemAttributes,
which aren't useful for detecting network mounts.
2014-03-17 18:28:29 +01:00
wm4 98cd2c4122 build: simplify libavfilter configure checks
This is all not needed anymore. In particular, remove all configure
switches except --enable-libavfilter.
2014-03-16 13:19:29 +01:00
wm4 c7e620df96 af_lavrresample: remove avresample_set_channel_mapping() fallbacks
This function is now always available.

Also remove includes of reorder_ch.h from some AOs (these are just old
relicts).
2014-03-16 13:19:28 +01:00
wm4 3ec7f528c4 vd_lavc: remove compatibility crap
All this code was needed for compatibility with very old libavcodec
versions only (such as Libav 9).

Includes some now-possible simplifications too.
2014-03-16 13:19:19 +01:00
wm4 f50455507e build: drop support for Libav 9
I have no tolerance for this garbage anymore. There are tons of issues
with it (see e.g. previous commit), and there is no reason to use it
either. Use Libav git, or Libav 10 when it's released.

This also drops support for earlier FFmpeg release, which have exactly
the same issues as Libav 9. FFmpeg 2.1.4 is still supported, because
it's the latest release, and is reasonably recent. (Although this will
probably also be dropped as soon as FFmpeg 2.2 is released.)

Assumed version table (lots of nonsensical numbers):

        FFmpeg 2.1.4    FFmpeg (n2.2-rc2)   Libav (v10_beta2)

lavu    52.48.101       52.66.100           53.3.0
lavc    55.39.101       55.52.102           55.34.1
lavf    55.19.104       55.33.100           55.12.0
lsws    2.5.101         2.5.101             2.1.2
lavi    3.90.100        4.2.100             4.2.0
lswr    0.17.104        0.18.100            -
lavr    1.1.0           1.2.0               1.1.0

libpostproc and libavdevice are not interesting.

Following this commit, code needed just to support old Libav versions
will start to be removed.
2014-03-16 02:45:58 +01:00
wm4 3bc78a84cd af_lavfi: beat it into working with Libav
The main incompatibility was that Libav didn't have av_opt_set_int_list.
But since that function is excessively ugly and idiotic (look how it
handles types), I'm not missing it much. Use an aformat filter instead
to handle the functionality that was indirectly provided by it. This is
similar to how vf_lavfi works.

The other incompatibility was channel handling. Libav consistently uses
channel layouts only, why ffmpeg still requires messing with channel
counts to some degree. Get rid of most channel count uses (and hope
channel layouts are "exact" enough). Only in one case FFmpeg fails with
a runtime check if we feed it AVFrames with channel count unset.

Another issue were AVFrame accessor functions. FFmpeg introduced these
for ABI compatibility with Libav. I refuse to use them, and it's not my
problem if FFmpeg doesn't manage to provide a stable ABI for fields
provided both by FFmpeg and Libav.
2014-03-13 00:29:17 +01:00
wm4 b05803c2e1 build: make check for BSD fstatfs() a bit more strict
Linux also has fstatfs(), and the test relied on certain system include
files being available on BSD, but not on Linux. It would break if Linux
added the missing includes for some reason.

Make it a bit stricter, and check for the struct statfs field the code
needs.
2014-03-12 00:49:16 +01:00
Philip Sequeira ac4b9a47ce stream_file: network file system detection for Linux
Addresses issue #558 on Linux systems.

Signed-off-by: wm4 <wm4@nowhere>
2014-03-12 00:46:18 +01:00
wm4 40855d6c12 build: rename --enable-shared switch
Rename it to --enable-libmpv-shared. The option name didn't really
tell much. When we add the possibility to create a static library,
it would also be bad if that were named --enable-static (because it
would sound like it does what --static-build does).
2014-03-11 23:56:19 +01:00
Hans-Kristian Arntzen baa6d9491c build: fix compilation with MinGW-w64
References to WinMM/OLE/UUID were missing.

Signed-off-by: wm4 <wm4@nowhere>
2014-03-09 19:11:17 +01:00