2008-06-17 11:40:04 +00:00
|
|
|
# MPlayer Makefile
|
|
|
|
#
|
|
|
|
# copyright (c) 2008 Diego Biurrun
|
|
|
|
# Rewritten entirely from a set of Makefiles written by Arpi and many others.
|
|
|
|
#
|
|
|
|
# This file is part of MPlayer.
|
|
|
|
#
|
|
|
|
# MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# MPlayer is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
include old_build/config.mak
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2008-05-09 17:51:44 +00:00
|
|
|
###### variable declarations #######
|
|
|
|
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES_AUDIO_INPUT-$(ALSA) += stream/ai_alsa1x.c
|
|
|
|
SOURCES_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
|
2013-09-28 16:01:12 +00:00
|
|
|
SOURCES_AUDIO_INPUT-$(SNDIO) += stream/ai_sndio.c
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(AUDIO_INPUT) += $(SOURCES_AUDIO_INPUT-yes)
|
2014-03-26 15:55:27 +00:00
|
|
|
SOURCES-$(CDDA) += stream/stream_cdda.c
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(DVBIN) += stream/dvb_tune.c \
|
|
|
|
stream/stream_dvb.c
|
|
|
|
SOURCES-$(DVDREAD) += stream/stream_dvd.c \
|
|
|
|
stream/stream_dvd_common.c
|
Add prelimimary (basic, possibly broken) dvdnav support
This readds a more or less completely new dvdnav implementation, though
it's based on the code from before commit 41fbcee. Note that this is
rather basic, and might be broken or not quite usable in many cases.
Most importantly, navigation highlights are not correctly implemented.
This would require changes in the FFmpeg dvdsub decoder (to apply a
different internal CLUT), so supporting it is not really possible right
now. And in fact, I don't think I ever want to support it, because it's
a very small gain for a lot of work. Instead, mpv will display fake
highlights, which are an approximate bounding box around the real
highlights.
Some things like mouse input or switching audio/subtitles stream using
the dvdnav VM are not supported.
Might be quite fragile on transitions: if dvdnav initiates a transition,
and doesn't give us enough mpeg data to initialize video playback, the
player will just quit.
This is added only because some users seem to want it. I don't intend to
make mpv a good DVD player, so the very basic minimum will have to do.
How about you just convert your DVD to proper video files?
2013-12-12 00:44:28 +00:00
|
|
|
SOURCES-$(DVDNAV) += stream/stream_dvdnav.c \
|
|
|
|
stream/stream_dvd_common.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
2013-07-07 19:44:37 +00:00
|
|
|
SOURCES-$(HAVE_SYS_MMAN_H) += audio/filter/af_export.c
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(LADSPA) += audio/filter/af_ladspa.c
|
2013-06-22 00:09:52 +00:00
|
|
|
SOURCES-$(LIBASS) += sub/ass_mp.c sub/sd_ass.c \
|
|
|
|
demux/demux_libass.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
|
|
|
SOURCES-$(LIBBLURAY) += stream/stream_bluray.c
|
|
|
|
SOURCES-$(LIBBS2B) += audio/filter/af_bs2b.c
|
|
|
|
|
|
|
|
SOURCES-$(LIBPOSTPROC) += video/filter/vf_pp.c
|
|
|
|
SOURCES-$(LIBSMBCLIENT) += stream/stream_smb.c
|
|
|
|
|
2013-09-03 19:18:28 +00:00
|
|
|
SOURCES-$(COCOA) += video/out/cocoa/view.m \
|
|
|
|
video/out/cocoa/window.m \
|
|
|
|
video/out/cocoa/additions.m \
|
|
|
|
video/out/cocoa_common.m \
|
2013-06-02 15:39:05 +00:00
|
|
|
osdep/macosx_application.m \
|
2013-06-02 22:52:40 +00:00
|
|
|
osdep/macosx_events.m \
|
2013-09-03 19:18:28 +00:00
|
|
|
osdep/ar/HIDRemote.m \
|
|
|
|
osdep/path-macosx.m
|
|
|
|
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(MPG123) += audio/decode/ad_mpg123.c
|
|
|
|
|
|
|
|
SOURCES-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c
|
|
|
|
SOURCES-$(NEED_GLOB) += osdep/glob-win.c
|
2014-01-19 13:20:02 +00:00
|
|
|
SOURCES-$(WIN32) += osdep/path-win.c \
|
|
|
|
osdep/w32_keyboard.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
|
|
|
SOURCES-$(PRIORITY) += osdep/priority.c
|
|
|
|
SOURCES-$(PVR) += stream/stream_pvr.c
|
|
|
|
SOURCES-$(RADIO) += stream/stream_radio.c
|
|
|
|
SOURCES-$(RADIO_CAPTURE) += stream/audio_in.c
|
2013-06-06 18:33:02 +00:00
|
|
|
SOURCES-$(STREAM_CACHE) += stream/cache.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
|
|
|
SOURCES-$(TV) += stream/stream_tv.c stream/tv.c \
|
|
|
|
stream/frequencies.c stream/tvi_dummy.c
|
|
|
|
|
|
|
|
SOURCES-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
|
|
|
|
SOURCES-$(VCD) += stream/stream_vcd.c
|
|
|
|
SOURCES-$(DUMMY_OSD) += sub/osd_dummy.c
|
|
|
|
SOURCES-$(LIBASS_OSD) += sub/osd_libass.c
|
|
|
|
|
|
|
|
SOURCES-$(ALSA) += audio/out/ao_alsa.c
|
|
|
|
SOURCES-$(CACA) += video/out/vo_caca.c
|
2012-12-28 07:07:14 +00:00
|
|
|
SOURCES-$(SDL) += audio/out/ao_sdl.c
|
|
|
|
SOURCES-$(SDL2) += video/out/vo_sdl.c
|
2013-07-13 07:48:10 +00:00
|
|
|
SOURCES-$(COREAUDIO) += audio/out/ao_coreaudio.c \
|
|
|
|
audio/out/ao_coreaudio_utils.c \
|
|
|
|
audio/out/ao_coreaudio_properties.c
|
2013-08-01 06:28:16 +00:00
|
|
|
SOURCES-$(COREVIDEO) += video/out/vo_corevideo.c
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(DIRECT3D) += video/out/vo_direct3d.c \
|
|
|
|
video/out/w32_common.c
|
|
|
|
SOURCES-$(DSOUND) += audio/out/ao_dsound.c
|
2013-07-20 17:13:39 +00:00
|
|
|
SOURCES-$(WASAPI) += audio/out/ao_wasapi.c
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(GL) += video/out/gl_common.c video/out/gl_osd.c \
|
2013-03-01 20:19:20 +00:00
|
|
|
video/out/vo_opengl.c video/out/gl_lcms.c \
|
2013-05-25 23:48:39 +00:00
|
|
|
video/out/gl_video.c video/out/dither.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
video/out/vo_opengl_old.c \
|
|
|
|
video/out/pnm_loader.c
|
|
|
|
|
|
|
|
SOURCES-$(ENCODING) += video/out/vo_lavc.c audio/out/ao_lavc.c \
|
2013-12-17 01:39:45 +00:00
|
|
|
common/encode_lavc.c
|
2013-03-01 14:55:08 +00:00
|
|
|
|
|
|
|
SOURCES-$(GL_WIN32) += video/out/w32_common.c video/out/gl_w32.c
|
|
|
|
SOURCES-$(GL_X11) += video/out/x11_common.c video/out/gl_x11.c
|
|
|
|
SOURCES-$(GL_COCOA) += video/out/gl_cocoa.c
|
|
|
|
SOURCES-$(GL_WAYLAND) += video/out/wayland_common.c \
|
|
|
|
video/out/gl_wayland.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
|
|
|
SOURCES-$(JACK) += audio/out/ao_jack.c
|
2013-12-17 00:23:09 +00:00
|
|
|
SOURCES-$(JOYSTICK) += input/joystick.c
|
2013-12-17 00:40:26 +00:00
|
|
|
SOURCES-$(LIBQUVI) += stream/resolve/resolve_quvi.c
|
|
|
|
SOURCES-$(LIBQUVI9) += stream/resolve/resolve_quvi9.c
|
2013-12-17 00:23:09 +00:00
|
|
|
SOURCES-$(LIRC) += input/lirc.c
|
2012-11-09 00:06:43 +00:00
|
|
|
SOURCES-$(OPENAL) += audio/out/ao_openal.c
|
|
|
|
SOURCES-$(OSS) += audio/out/ao_oss.c
|
|
|
|
SOURCES-$(PULSE) += audio/out/ao_pulse.c
|
|
|
|
SOURCES-$(PORTAUDIO) += audio/out/ao_portaudio.c
|
|
|
|
SOURCES-$(RSOUND) += audio/out/ao_rsound.c
|
2013-09-28 16:01:12 +00:00
|
|
|
SOURCES-$(SNDIO) += audio/out/ao_sndio.c
|
2014-03-16 08:21:21 +00:00
|
|
|
SOURCES-$(VDPAU) += video/vdpau.c video/out/vo_vdpau.c \
|
|
|
|
video/decode/vdpau.c
|
2013-11-05 21:06:48 +00:00
|
|
|
SOURCES-$(VDPAU_GL_X11) += video/out/gl_hwdec_vdpau.c
|
2013-08-14 13:47:18 +00:00
|
|
|
SOURCES-$(VDA) += video/decode/vda.c
|
2013-11-13 20:59:11 +00:00
|
|
|
SOURCES-$(VDA_GL) += video/out/gl_hwdec_vda.c
|
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 12:01:30 +00:00
|
|
|
SOURCES-$(VAAPI) += video/out/vo_vaapi.c \
|
2013-09-20 13:55:13 +00:00
|
|
|
video/decode/vaapi.c \
|
|
|
|
video/vaapi.c
|
|
|
|
SOURCES-$(VAAPI_VPP) += video/filter/vf_vavpp.c
|
2013-11-03 23:02:21 +00:00
|
|
|
SOURCES-$(VAAPI_GLX) += video/out/gl_hwdec_vaglx.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
|
|
|
SOURCES-$(X11) += video/out/vo_x11.c video/out/x11_common.c
|
|
|
|
SOURCES-$(XV) += video/out/vo_xv.c
|
2013-04-15 20:37:02 +00:00
|
|
|
SOURCES-$(WAYLAND) += video/out/vo_wayland.c video/out/wayland_common.c
|
2012-11-09 00:06:43 +00:00
|
|
|
|
2014-03-16 09:25:05 +00:00
|
|
|
SOURCES-$(LIBAVFILTER) += video/filter/vf_lavfi.c \
|
|
|
|
audio/filter/af_lavfi.c
|
2013-03-10 23:16:34 +00:00
|
|
|
|
2013-12-17 00:15:48 +00:00
|
|
|
SOURCES-$(LUA) += player/lua.c
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
|
2013-07-12 16:33:39 +00:00
|
|
|
SOURCES-$(DLOPEN) += video/filter/vf_dlopen.c
|
2013-07-09 07:28:05 +00:00
|
|
|
|
Replace talloc
There are multiple reasons to do this. One big reason is the license:
talloc is LGPLv3+, which forces mpv to be licensed as GPLv3+.
Another one is that our talloc copy contains modifications, which makes
it essentially incompatible with upstream talloc (in particular, our
version aborts on out of memory conditions - well, it wasn't my idea).
Updating from upstream is also a bit involved - the talloc source is
not really organized in a way to allow copying it into projects (and
this isn't an intended use-case).
Finally, talloc is kind of big and bloated. The replacement halves the
amount of code - mainly because we didn't use all talloc features. It's
even more extreme if you compare upstream talloc (~4700 lines) and the
new allocator without talloc compat (~900 lines).
The replacement provides all features we need. It also doesn't clash
with talloc. (The talloc compatibility wrapper uses macros to avoid
introducing linker-level symbols which could clash with libtalloc.)
It also tries to lower the overhead (only 4 words opposed to 10 words
in talloc for leaf nodes in release mode). Debugging features like leak
reporting can be enabled at compile time and add somewhat more overhead.
Though I'm not sure whether the overhead reduction was actually
successful: allocations with children need an "extra" header, which adds
plenty of overhead, and it turns out that almost half of all allocations
have children. Maybe the implementation could be simplified and the
extra header removed - even then, overhead would be lower than talloc's.
Currently, debugging features can be entirely deactivated by defining
NDEBUG - I'm not sure if anything defines this directly yet, though.
Unlike in talloc, the leak reporting stuff is thread-safe. (That's also
why it's far less elegant, and requires extra list pointers.)
Comes with a compatibility layer, so no changes to mpv source code
are needed. The idea is that we will pretend to be using talloc for
a while, so that we can revert to our old talloc implementation at
any time for debugging purposes.
Some inspiration was taken from Mesa's ralloc:
http://cgit.freedesktop.org/mesa/mesa/tree/src/glsl/ralloc.h
This is another talloc replacement, but lacks some features we need
(getting size of an allocation, debugging features, being able to
access children in the dtor).
There's some information in ta/README what will happen next and how the
transition is expected to progress.
2013-10-12 23:17:45 +00:00
|
|
|
SOURCES = audio/audio.c \
|
2013-11-10 22:24:50 +00:00
|
|
|
audio/audio_buffer.c \
|
2013-04-05 13:25:09 +00:00
|
|
|
audio/chmap.c \
|
2013-05-09 13:12:16 +00:00
|
|
|
audio/chmap_sel.c \
|
2012-11-03 13:06:53 +00:00
|
|
|
audio/fmt-conversion.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio/format.c \
|
|
|
|
audio/mixer.c \
|
|
|
|
audio/decode/ad_lavc.c \
|
|
|
|
audio/decode/ad_spdif.c \
|
|
|
|
audio/decode/dec_audio.c \
|
|
|
|
audio/filter/af.c \
|
|
|
|
audio/filter/af_center.c \
|
|
|
|
audio/filter/af_channels.c \
|
audio/filter: split af_format into separate filters, rename af_force
af_format is the old audio conversion filter. It could do all possible
conversions supported by the audio chain. However, ever since the
addition of af_lavrresample, most conversions are done by
libav/swresample, and af_format is used as fallback.
Separate out the fallback cases and remove af_format. af_convert24 does
24 bit <-> 32 bit conversions, while af_convertsignendian does sign and
endian conversions. Maybe the way the conversions are split sounds a bit
odd. But the former changes the size of the audio data, while the latter
is fully in-place, so there's at least different buffer management.
This requires a quite complicated algorithm to make sure all these
"partial" conversion filters can actually get from one format to
another. E.g. s24le->s32be always requires convertsignendian and
convert24, but af.c has no idea what the intermediate format should
be. So I added a graph search (trying every possible format and
filter) to determine required format and filter. When I wrote this,
it seemed this was still better than messing everything into
af_lavrresample, but maybe this is overkill and I'll change my
opinion. For now, it seems nice to get rid of af_format though.
The AC3->IEC61937 conversion isn't supported anymore, but I don't think
this is needed anywhere. Most AOs test all formats explicitly, or use
the AF_FORMAT_IS_IEC61937() macro (which includes AC3).
One positive consequence of this change is that conversions always
include dithering (done by libav/swresample), instead of possibly going
through af_format, which doesn't do anything fancy.
Rename af_force to af_format. It's essentially compatible with command
line uses of af_format. We retain a compatibility alias for af_force.
2013-10-21 23:20:43 +00:00
|
|
|
audio/filter/af_convert24.c \
|
|
|
|
audio/filter/af_convertsignendian.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio/filter/af_delay.c \
|
|
|
|
audio/filter/af_dummy.c \
|
|
|
|
audio/filter/af_equalizer.c \
|
|
|
|
audio/filter/af_extrastereo.c \
|
2013-10-23 16:10:27 +00:00
|
|
|
audio/filter/af_format.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio/filter/af_hrtf.c \
|
|
|
|
audio/filter/af_karaoke.c \
|
|
|
|
audio/filter/af_lavcac3enc.c \
|
2013-03-09 08:30:26 +00:00
|
|
|
audio/filter/af_lavrresample.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio/filter/af_pan.c \
|
|
|
|
audio/filter/af_scaletempo.c \
|
|
|
|
audio/filter/af_sinesuppress.c \
|
|
|
|
audio/filter/af_sub.c \
|
|
|
|
audio/filter/af_surround.c \
|
|
|
|
audio/filter/af_sweep.c \
|
2013-02-12 08:53:33 +00:00
|
|
|
audio/filter/af_drc.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio/filter/af_volume.c \
|
|
|
|
audio/filter/filter.c \
|
2013-11-18 17:48:00 +00:00
|
|
|
audio/filter/tools.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio/filter/window.c \
|
|
|
|
audio/out/ao.c \
|
|
|
|
audio/out/ao_null.c \
|
|
|
|
audio/out/ao_pcm.c \
|
2014-03-08 23:04:37 +00:00
|
|
|
audio/out/pull.c \
|
|
|
|
audio/out/push.c \
|
2013-12-17 01:39:45 +00:00
|
|
|
bstr/bstr.c \
|
|
|
|
common/asxparser.c \
|
|
|
|
common/av_common.c \
|
|
|
|
common/av_log.c \
|
|
|
|
common/av_opts.c \
|
|
|
|
common/codecs.c \
|
|
|
|
common/cpudetect.c \
|
|
|
|
common/common.c \
|
|
|
|
common/msg.c \
|
|
|
|
common/playlist.c \
|
|
|
|
common/playlist_parser.c \
|
|
|
|
common/version.c \
|
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 14:15:19 +00:00
|
|
|
demux/codec_tags.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
demux/demux.c \
|
|
|
|
demux/demux_edl.c \
|
|
|
|
demux/demux_cue.c \
|
|
|
|
demux/demux_lavf.c \
|
|
|
|
demux/demux_mf.c \
|
|
|
|
demux/demux_mkv.c \
|
2013-08-25 18:40:21 +00:00
|
|
|
demux/demux_playlist.c \
|
2013-07-12 20:52:10 +00:00
|
|
|
demux/demux_raw.c \
|
2013-08-25 18:40:21 +00:00
|
|
|
demux/demux_subreader.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
demux/ebml.c \
|
|
|
|
demux/mf.c \
|
2013-12-26 16:10:35 +00:00
|
|
|
input/cmd_list.c \
|
|
|
|
input/cmd_parse.c \
|
2014-01-04 16:36:13 +00:00
|
|
|
input/event.c \
|
2013-12-17 00:23:09 +00:00
|
|
|
input/input.c \
|
2013-12-26 16:10:35 +00:00
|
|
|
input/keycodes.c \
|
2013-12-17 01:39:45 +00:00
|
|
|
misc/charset_conv.c \
|
|
|
|
misc/ring.c \
|
2013-12-17 01:02:25 +00:00
|
|
|
options/m_config.c \
|
|
|
|
options/m_option.c \
|
|
|
|
options/m_property.c \
|
|
|
|
options/options.c \
|
|
|
|
options/parse_commandline.c \
|
|
|
|
options/parse_configfile.c \
|
|
|
|
options/path.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
osdep/io.c \
|
2013-05-17 17:54:37 +00:00
|
|
|
osdep/numcores.c \
|
|
|
|
osdep/timer.c \
|
2013-11-17 15:42:57 +00:00
|
|
|
osdep/threads.c \
|
2013-12-16 23:53:22 +00:00
|
|
|
player/audio.c \
|
2014-02-10 20:01:35 +00:00
|
|
|
player/client.c \
|
2013-12-16 23:53:22 +00:00
|
|
|
player/configfiles.c \
|
|
|
|
player/command.c \
|
2014-03-30 02:42:49 +00:00
|
|
|
player/discnav.c \
|
2013-12-16 23:53:22 +00:00
|
|
|
player/loadfile.c \
|
|
|
|
player/main.c \
|
|
|
|
player/misc.c \
|
|
|
|
player/osd.c \
|
|
|
|
player/playloop.c \
|
|
|
|
player/screenshot.c \
|
|
|
|
player/sub.c \
|
|
|
|
player/video.c \
|
|
|
|
player/timeline/tl_matroska.c \
|
|
|
|
player/timeline/tl_mpv_edl.c \
|
|
|
|
player/timeline/tl_cue.c \
|
2013-07-07 17:40:14 +00:00
|
|
|
stream/cookies.c \
|
2013-08-25 20:58:29 +00:00
|
|
|
stream/rar.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
stream/stream.c \
|
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 17:41:04 +00:00
|
|
|
stream/stream_avdevice.c \
|
2013-11-19 21:26:35 +00:00
|
|
|
stream/stream_edl.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
stream/stream_file.c \
|
|
|
|
stream/stream_lavf.c \
|
2013-06-27 15:21:46 +00:00
|
|
|
stream/stream_memory.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
stream/stream_mf.c \
|
|
|
|
stream/stream_null.c \
|
2013-08-25 20:58:29 +00:00
|
|
|
stream/stream_rar.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
sub/dec_sub.c \
|
|
|
|
sub/draw_bmp.c \
|
|
|
|
sub/find_subfiles.c \
|
|
|
|
sub/img_convert.c \
|
2013-11-24 11:58:06 +00:00
|
|
|
sub/osd.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
sub/sd_lavc.c \
|
2013-06-01 17:54:31 +00:00
|
|
|
sub/sd_lavc_conv.c \
|
2013-06-24 00:06:55 +00:00
|
|
|
sub/sd_lavf_srt.c \
|
2013-06-01 17:50:46 +00:00
|
|
|
sub/sd_microdvd.c \
|
2013-06-01 17:44:55 +00:00
|
|
|
sub/sd_movtext.c \
|
2013-06-01 17:50:46 +00:00
|
|
|
sub/sd_srt.c \
|
Replace talloc
There are multiple reasons to do this. One big reason is the license:
talloc is LGPLv3+, which forces mpv to be licensed as GPLv3+.
Another one is that our talloc copy contains modifications, which makes
it essentially incompatible with upstream talloc (in particular, our
version aborts on out of memory conditions - well, it wasn't my idea).
Updating from upstream is also a bit involved - the talloc source is
not really organized in a way to allow copying it into projects (and
this isn't an intended use-case).
Finally, talloc is kind of big and bloated. The replacement halves the
amount of code - mainly because we didn't use all talloc features. It's
even more extreme if you compare upstream talloc (~4700 lines) and the
new allocator without talloc compat (~900 lines).
The replacement provides all features we need. It also doesn't clash
with talloc. (The talloc compatibility wrapper uses macros to avoid
introducing linker-level symbols which could clash with libtalloc.)
It also tries to lower the overhead (only 4 words opposed to 10 words
in talloc for leaf nodes in release mode). Debugging features like leak
reporting can be enabled at compile time and add somewhat more overhead.
Though I'm not sure whether the overhead reduction was actually
successful: allocations with children need an "extra" header, which adds
plenty of overhead, and it turns out that almost half of all allocations
have children. Maybe the implementation could be simplified and the
extra header removed - even then, overhead would be lower than talloc's.
Currently, debugging features can be entirely deactivated by defining
NDEBUG - I'm not sure if anything defines this directly yet, though.
Unlike in talloc, the leak reporting stuff is thread-safe. (That's also
why it's far less elegant, and requires extra list pointers.)
Comes with a compatibility layer, so no changes to mpv source code
are needed. The idea is that we will pretend to be using talloc for
a while, so that we can revert to our old talloc implementation at
any time for debugging purposes.
Some inspiration was taken from Mesa's ralloc:
http://cgit.freedesktop.org/mesa/mesa/tree/src/glsl/ralloc.h
This is another talloc replacement, but lacks some features we need
(getting size of an allocation, debugging features, being able to
access children in the dtor).
There's some information in ta/README what will happen next and how the
transition is expected to progress.
2013-10-12 23:17:45 +00:00
|
|
|
ta/ta.c \
|
|
|
|
ta/ta_utils.c \
|
|
|
|
ta/ta_talloc.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
video/csputils.c \
|
|
|
|
video/fmt-conversion.c \
|
|
|
|
video/image_writer.c \
|
|
|
|
video/img_format.c \
|
|
|
|
video/mp_image.c \
|
2012-12-12 22:55:34 +00:00
|
|
|
video/mp_image_pool.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
video/sws_utils.c \
|
|
|
|
video/decode/dec_video.c \
|
|
|
|
video/decode/vd_lavc.c \
|
|
|
|
video/filter/vf.c \
|
|
|
|
video/filter/pullup.c \
|
|
|
|
video/filter/vf_crop.c \
|
|
|
|
video/filter/vf_delogo.c \
|
|
|
|
video/filter/vf_divtc.c \
|
|
|
|
video/filter/vf_dsize.c \
|
2012-11-15 14:16:12 +00:00
|
|
|
video/filter/vf_eq.c \
|
2012-11-09 00:06:43 +00:00
|
|
|
video/filter/vf_expand.c \
|
|
|
|
video/filter/vf_flip.c \
|
|
|
|
video/filter/vf_format.c \
|
|
|
|
video/filter/vf_gradfun.c \
|
|
|
|
video/filter/vf_hqdn3d.c \
|
|
|
|
video/filter/vf_ilpack.c \
|
|
|
|
video/filter/vf_mirror.c \
|
|
|
|
video/filter/vf_noformat.c \
|
|
|
|
video/filter/vf_noise.c \
|
|
|
|
video/filter/vf_phase.c \
|
|
|
|
video/filter/vf_pullup.c \
|
|
|
|
video/filter/vf_rotate.c \
|
|
|
|
video/filter/vf_scale.c \
|
|
|
|
video/filter/vf_screenshot.c \
|
|
|
|
video/filter/vf_softpulldown.c \
|
|
|
|
video/filter/vf_stereo3d.c \
|
|
|
|
video/filter/vf_sub.c \
|
|
|
|
video/filter/vf_swapuv.c \
|
|
|
|
video/filter/vf_unsharp.c \
|
|
|
|
video/filter/vf_yadif.c \
|
|
|
|
video/out/bitmap_packer.c \
|
|
|
|
video/out/aspect.c \
|
|
|
|
video/out/filter_kernels.c \
|
|
|
|
video/out/vo.c \
|
|
|
|
video/out/vo_null.c \
|
|
|
|
video/out/vo_image.c \
|
|
|
|
osdep/$(GETCH) \
|
|
|
|
osdep/$(TIMER) \
|
|
|
|
$(SOURCES-yes)
|
|
|
|
|
|
|
|
OBJECTS += $(addsuffix .o, $(basename $(SOURCES)))
|
|
|
|
OBJECTS-$(PE_EXECUTABLE) += osdep/mpv-rc.o
|
|
|
|
OBJECTS += $(OBJECTS-yes)
|
|
|
|
|
|
|
|
DEP_FILES = $(patsubst %.S,%.d,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SOURCES:.m=.d) $(SOURCES:.m=.d))))
|
|
|
|
|
2012-11-13 23:43:55 +00:00
|
|
|
ALL_TARGETS += mpv$(EXESUF)
|
2012-11-09 00:06:43 +00:00
|
|
|
|
2012-11-14 12:06:00 +00:00
|
|
|
INSTALL_BIN += install-mpv
|
|
|
|
INSTALL_BIN_STRIP += install-mpv-strip
|
|
|
|
INSTALL_MAN =
|
2013-09-09 02:23:06 +00:00
|
|
|
INSTALL_PDF =
|
2012-11-13 23:43:55 +00:00
|
|
|
|
|
|
|
ifeq ($(BUILD_MAN),yes)
|
2012-11-14 12:06:00 +00:00
|
|
|
INSTALL_MAN += install-mpv-man
|
|
|
|
ALL_TARGETS += DOCS/man/en/mpv.1
|
2012-11-13 23:43:55 +00:00
|
|
|
endif
|
manpage: merge new manpage
About a year ago, ubitux converted most of the old manpage from the
hard to maintain nroff format to reStructuredText. This was not merged
back into the master repository immediately. The argument was that the
new manpage still required work to be done. However, progress was very
slow. Even worse: the old manpage wasn't updated, because it was
scheduled for deletion, and updating it would have meant useless work.
Now the situation is that the new manpage still isn't finished, and the
old manpage is grossly out of sync with the player. This is not helpful
for users. Additionally, keeping the new manpage in a separate branch,
while the normal development repository for code had the old manpage,
was very inconvenient, because you couldn't just update the
documentation in the same commit as the code.
Even though the new manpage isn't finished yet, merging it now seems to
be the best course of action. Squash-merge the manpage development
branch [1], revision e89f5dd3f2, which branches from the mplayer2
master branch after revision 159102e0cb.
Committers:
* Clément Bœsch <ubitux@gmail.com> (Initial conversion to RST.)
* Uoti Urpala <uau@mplayer2.org> (Many updates.)
* Myself (Minor edits.)
Most text of the manpage has been directly taken from the old manpage,
because this is a conversion, not a complete rewrite.
[1] http://git.mplayer2.org/uau/mplayer2.git/log/?h=man
2012-08-02 19:37:33 +00:00
|
|
|
|
2013-09-09 02:23:06 +00:00
|
|
|
ifeq ($(BUILD_PDF),yes)
|
|
|
|
INSTALL_PDF += install-mpv-pdf
|
|
|
|
ALL_TARGETS += DOCS/man/en/mpv.pdf
|
|
|
|
endif
|
|
|
|
|
2008-04-28 17:54:14 +00:00
|
|
|
DIRS = . \
|
2012-11-09 00:06:43 +00:00
|
|
|
audio \
|
|
|
|
audio/decode \
|
|
|
|
audio/filter \
|
|
|
|
audio/out \
|
2013-12-17 07:48:34 +00:00
|
|
|
bstr \
|
|
|
|
common \
|
|
|
|
compat \
|
2013-12-17 00:23:09 +00:00
|
|
|
input \
|
2013-12-17 07:48:34 +00:00
|
|
|
player/timeline \
|
2012-11-09 00:06:43 +00:00
|
|
|
demux \
|
2013-12-17 07:48:34 +00:00
|
|
|
misc \
|
2008-04-08 18:25:30 +00:00
|
|
|
osdep \
|
2013-09-11 17:22:07 +00:00
|
|
|
osdep/ar \
|
2013-12-17 00:23:09 +00:00
|
|
|
player \
|
2008-04-24 13:38:12 +00:00
|
|
|
stream \
|
2013-12-17 07:48:34 +00:00
|
|
|
stream/resolve \
|
2011-01-16 18:03:08 +00:00
|
|
|
sub \
|
2013-12-17 07:48:34 +00:00
|
|
|
ta \
|
2012-11-09 00:06:43 +00:00
|
|
|
video \
|
|
|
|
video/decode \
|
|
|
|
video/filter \
|
|
|
|
video/out
|
2002-09-22 13:04:19 +00:00
|
|
|
|
2008-07-05 09:07:24 +00:00
|
|
|
|
2009-04-20 00:18:59 +00:00
|
|
|
ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2)))
|
|
|
|
ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(DIRS))
|
|
|
|
ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
|
2009-04-20 00:16:53 +00:00
|
|
|
|
2011-06-30 21:18:52 +00:00
|
|
|
###### brief build output #######
|
|
|
|
|
|
|
|
ifndef V
|
|
|
|
$(eval override CC = @printf "CC\t$$@\n"; $(CC))
|
|
|
|
$(eval override RM = @$(RM))
|
|
|
|
endif
|
|
|
|
|
2008-05-09 17:51:44 +00:00
|
|
|
###### generic rules #######
|
|
|
|
|
2012-11-13 23:43:55 +00:00
|
|
|
all: $(ALL_TARGETS)
|
2002-09-22 13:04:19 +00:00
|
|
|
|
2014-01-08 15:00:40 +00:00
|
|
|
%.pdf: %.rst
|
|
|
|
$(RST2PDF) -c --repeat-table-rows $< -o $@
|
2013-09-09 02:23:06 +00:00
|
|
|
|
manpage: merge new manpage
About a year ago, ubitux converted most of the old manpage from the
hard to maintain nroff format to reStructuredText. This was not merged
back into the master repository immediately. The argument was that the
new manpage still required work to be done. However, progress was very
slow. Even worse: the old manpage wasn't updated, because it was
scheduled for deletion, and updating it would have meant useless work.
Now the situation is that the new manpage still isn't finished, and the
old manpage is grossly out of sync with the player. This is not helpful
for users. Additionally, keeping the new manpage in a separate branch,
while the normal development repository for code had the old manpage,
was very inconvenient, because you couldn't just update the
documentation in the same commit as the code.
Even though the new manpage isn't finished yet, merging it now seems to
be the best course of action. Squash-merge the manpage development
branch [1], revision e89f5dd3f2, which branches from the mplayer2
master branch after revision 159102e0cb.
Committers:
* Clément Bœsch <ubitux@gmail.com> (Initial conversion to RST.)
* Uoti Urpala <uau@mplayer2.org> (Many updates.)
* Myself (Minor edits.)
Most text of the manpage has been directly taken from the old manpage,
because this is a conversion, not a complete rewrite.
[1] http://git.mplayer2.org/uau/mplayer2.git/log/?h=man
2012-08-02 19:37:33 +00:00
|
|
|
%.1: %.rst
|
2012-11-02 13:37:02 +00:00
|
|
|
$(RST2MAN) $< $@
|
manpage: merge new manpage
About a year ago, ubitux converted most of the old manpage from the
hard to maintain nroff format to reStructuredText. This was not merged
back into the master repository immediately. The argument was that the
new manpage still required work to be done. However, progress was very
slow. Even worse: the old manpage wasn't updated, because it was
scheduled for deletion, and updating it would have meant useless work.
Now the situation is that the new manpage still isn't finished, and the
old manpage is grossly out of sync with the player. This is not helpful
for users. Additionally, keeping the new manpage in a separate branch,
while the normal development repository for code had the old manpage,
was very inconvenient, because you couldn't just update the
documentation in the same commit as the code.
Even though the new manpage isn't finished yet, merging it now seems to
be the best course of action. Squash-merge the manpage development
branch [1], revision e89f5dd3f2, which branches from the mplayer2
master branch after revision 159102e0cb.
Committers:
* Clément Bœsch <ubitux@gmail.com> (Initial conversion to RST.)
* Uoti Urpala <uau@mplayer2.org> (Many updates.)
* Myself (Minor edits.)
Most text of the manpage has been directly taken from the old manpage,
because this is a conversion, not a complete rewrite.
[1] http://git.mplayer2.org/uau/mplayer2.git/log/?h=man
2012-08-02 19:37:33 +00:00
|
|
|
|
2010-02-23 23:33:10 +00:00
|
|
|
%.o: %.S
|
2010-07-01 23:18:16 +00:00
|
|
|
$(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
|
2010-02-23 23:33:10 +00:00
|
|
|
|
2008-12-06 02:41:45 +00:00
|
|
|
%.o: %.c
|
2010-07-01 23:18:16 +00:00
|
|
|
$(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
|
2008-04-29 08:53:08 +00:00
|
|
|
|
2008-12-06 02:41:45 +00:00
|
|
|
%.o: %.cpp
|
2010-07-01 23:18:16 +00:00
|
|
|
$(CC) $(DEPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
2008-04-29 08:53:08 +00:00
|
|
|
|
2008-12-06 02:41:45 +00:00
|
|
|
%.o: %.m
|
2010-07-01 23:18:16 +00:00
|
|
|
$(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
|
2010-02-23 23:33:10 +00:00
|
|
|
|
2008-07-06 13:26:30 +00:00
|
|
|
%-rc.o: %.rc
|
|
|
|
$(WINDRES) -I. $< $@
|
|
|
|
|
2014-02-10 20:25:22 +00:00
|
|
|
mpv$(EXESUF): $(OBJECTS) player/main_fn.o
|
2012-10-11 00:04:08 +00:00
|
|
|
mpv$(EXESUF):
|
2009-10-19 09:56:18 +00:00
|
|
|
$(CC) -o $@ $^ $(EXTRALIBS)
|
2008-08-07 12:35:34 +00:00
|
|
|
|
2013-12-17 00:23:09 +00:00
|
|
|
input/input.c: input/input_conf.h
|
|
|
|
input/input_conf.h: TOOLS/file2string.pl etc/input.conf
|
2012-08-01 20:52:28 +00:00
|
|
|
./$^ >$@
|
|
|
|
|
2013-01-24 15:57:21 +00:00
|
|
|
MKVLIB_DEPS = TOOLS/lib/Parse/Matroska.pm \
|
|
|
|
TOOLS/lib/Parse/Matroska/Definitions.pm \
|
|
|
|
TOOLS/lib/Parse/Matroska/Element.pm \
|
|
|
|
TOOLS/lib/Parse/Matroska/Reader.pm \
|
|
|
|
TOOLS/lib/Parse/Matroska/Utils.pm \
|
|
|
|
|
2012-11-09 00:06:43 +00:00
|
|
|
demux/ebml.c demux/demux_mkv.c: demux/ebml_types.h
|
2013-01-24 15:57:21 +00:00
|
|
|
demux/ebml_types.h: TOOLS/matroska.pl $(MKVLIB_DEPS)
|
2012-07-01 23:09:03 +00:00
|
|
|
./$< --generate-header > $@
|
|
|
|
|
2012-11-09 00:06:43 +00:00
|
|
|
demux/ebml.c: demux/ebml_defs.c
|
2013-01-24 15:57:21 +00:00
|
|
|
demux/ebml_defs.c: TOOLS/matroska.pl $(MKVLIB_DEPS)
|
2012-07-01 23:09:03 +00:00
|
|
|
./$< --generate-definitions > $@
|
2002-12-15 23:45:19 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
video/out/gl_video.c: video/out/gl_video_shaders.h
|
|
|
|
video/out/gl_video_shaders.h: TOOLS/file2string.pl video/out/gl_video_shaders.glsl
|
2012-07-28 15:31:55 +00:00
|
|
|
./$^ >$@
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2014-01-14 07:18:05 +00:00
|
|
|
osdep/macosx_application.m: osdep/macosx_icon.inc
|
|
|
|
osdep/macosx_icon.inc: TOOLS/file2string.pl TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns
|
|
|
|
./$^ >$@
|
|
|
|
|
x11: add window icon
The png file added to etc/ are taken from the link mentioned in commit
303096b, except that they have been converted to 16 bit, sRGB (with
color profile info dropped, if there was one), and transparent pixels
reset for better compression.
The file x11_icon.bin is generated by gen-x11-icon.sh. I'm adding it to
the git repo directly, because the script requires ImageMagick, and we
don't want to make building even more complicated.
The way how this is done is basically a compromise between effort
required in x11_common.c and in gen-x11-icon.sh. Ideally, x11_icon.bin
would be directly in the format as required by _NET_WM_ICON, but trying
to write the binary width/height values from shell would probably be a
nightmare, so here we go.
The zlib code in x11_common.c is lifted from demux_mkv.c, with some
modifications (like accepting a gzip header, because I don't know how to
make gzip write raw compressed data).
2013-09-01 21:26:44 +00:00
|
|
|
video/out/x11_common.c: video/out/x11_icon.inc
|
|
|
|
video/out/x11_icon.inc: TOOLS/file2string.pl video/out/x11_icon.bin
|
|
|
|
./$^ >$@
|
|
|
|
|
2012-07-28 21:03:19 +00:00
|
|
|
sub/osd_libass.c: sub/osd_font.h
|
2013-04-27 15:56:47 +00:00
|
|
|
sub/osd_font.h: TOOLS/file2string.pl sub/osd_font.otf
|
2012-07-28 21:03:19 +00:00
|
|
|
./$^ >$@
|
|
|
|
|
2013-12-17 00:15:48 +00:00
|
|
|
player/lua.c: player/lua/defaults.inc
|
2013-12-16 23:53:22 +00:00
|
|
|
player/lua/defaults.inc: TOOLS/file2string.pl player/lua/defaults.lua
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
./$^ >$@
|
|
|
|
|
2013-12-17 00:15:48 +00:00
|
|
|
player/lua.c: player/lua/assdraw.inc
|
2013-12-16 23:53:22 +00:00
|
|
|
player/lua/assdraw.inc: TOOLS/file2string.pl player/lua/assdraw.lua
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
./$^ >$@
|
|
|
|
|
2013-12-17 00:15:48 +00:00
|
|
|
player/lua.c: player/lua/osc.inc
|
2013-12-16 23:53:22 +00:00
|
|
|
player/lua/osc.inc: TOOLS/file2string.pl player/lua/osc.lua
|
2013-09-25 22:56:41 +00:00
|
|
|
./$^ >$@
|
|
|
|
|
2008-05-09 17:47:19 +00:00
|
|
|
# ./configure must be rerun if it changed
|
|
|
|
config.mak: configure
|
|
|
|
@echo "############################################################"
|
|
|
|
@echo "####### Please run ./configure again - it's changed! #######"
|
|
|
|
@echo "############################################################"
|
|
|
|
|
2011-02-19 17:01:07 +00:00
|
|
|
version.h .version: version.sh
|
|
|
|
./$<
|
|
|
|
|
|
|
|
# Force version.sh to run to potentially regenerate version.h
|
|
|
|
-include .version
|
2008-04-29 08:35:58 +00:00
|
|
|
|
2010-06-14 11:16:30 +00:00
|
|
|
%$(EXESUF): %.c
|
2010-06-14 11:24:55 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^
|
2008-07-04 14:35:44 +00:00
|
|
|
|
2010-09-04 00:20:08 +00:00
|
|
|
|
2008-05-09 17:51:44 +00:00
|
|
|
###### dependency declarations / specific CFLAGS ######
|
2006-07-13 01:20:14 +00:00
|
|
|
|
2013-12-17 07:48:34 +00:00
|
|
|
common/version.c osdep/mpv-rc.o: version.h
|
2008-04-08 18:25:30 +00:00
|
|
|
|
2013-07-30 14:04:01 +00:00
|
|
|
osdep/mpv-rc.o: osdep/mpv.exe.manifest etc/mpv-icon.ico
|
2010-07-04 07:13:18 +00:00
|
|
|
|
2013-09-10 13:16:20 +00:00
|
|
|
DOCS/man/en/mpv.1 DOCS/man/en/mpv.pdf: DOCS/man/en/af.rst \
|
|
|
|
DOCS/man/en/ao.rst \
|
|
|
|
DOCS/man/en/changes.rst \
|
|
|
|
DOCS/man/en/encode.rst \
|
|
|
|
DOCS/man/en/input.rst \
|
|
|
|
DOCS/man/en/options.rst \
|
|
|
|
DOCS/man/en/vf.rst \
|
|
|
|
DOCS/man/en/vo.rst
|
|
|
|
|
2008-05-27 11:31:57 +00:00
|
|
|
###### installation / clean / generic rules #######
|
2008-04-27 22:53:18 +00:00
|
|
|
|
Add mpv.desktop, let Makefile install the desktop file and the icons
The mpv.desktop file is taken from the Arch package [1]. It appears to
be based on the mplayer2 git mplayer.desktop file (e.g. very similar
MimeType field), with minor modifications applied by Arch package
maintainers.
Note that for now, this doesn't show a terminal (Terminal=false), which
might not always be ideal. For example, if the file is audio only, or
if VO initialization fails for some reason, mpv will run in the
background and play audio without showing a window. But users prefer
running it without terminal, and don't want to play audio files with
it.
Maybe a --force-window option will be added in the future, which would
always create a VO window, and compensate for these issues.
[1] https://aur.archlinux.org/packages/mpv-git/
2013-09-15 00:34:28 +00:00
|
|
|
install: $(INSTALL_BIN) install-data $(INSTALL_MAN) $(INSTALL_PDF)
|
|
|
|
install-no-man: $(INSTALL_BIN) install-data
|
|
|
|
install-strip: $(INSTALL_BIN_STRIP) install-data $(INSTALL_MAN) $(INSTALL_PDF)
|
|
|
|
install-strip-no-man: $(INSTALL_BIN_STRIP) install-data
|
manpage: merge new manpage
About a year ago, ubitux converted most of the old manpage from the
hard to maintain nroff format to reStructuredText. This was not merged
back into the master repository immediately. The argument was that the
new manpage still required work to be done. However, progress was very
slow. Even worse: the old manpage wasn't updated, because it was
scheduled for deletion, and updating it would have meant useless work.
Now the situation is that the new manpage still isn't finished, and the
old manpage is grossly out of sync with the player. This is not helpful
for users. Additionally, keeping the new manpage in a separate branch,
while the normal development repository for code had the old manpage,
was very inconvenient, because you couldn't just update the
documentation in the same commit as the code.
Even though the new manpage isn't finished yet, merging it now seems to
be the best course of action. Squash-merge the manpage development
branch [1], revision e89f5dd3f2, which branches from the mplayer2
master branch after revision 159102e0cb.
Committers:
* Clément Bœsch <ubitux@gmail.com> (Initial conversion to RST.)
* Uoti Urpala <uau@mplayer2.org> (Many updates.)
* Myself (Minor edits.)
Most text of the manpage has been directly taken from the old manpage,
because this is a conversion, not a complete rewrite.
[1] http://git.mplayer2.org/uau/mplayer2.git/log/?h=man
2012-08-02 19:37:33 +00:00
|
|
|
|
2007-01-30 11:02:19 +00:00
|
|
|
install-dirs:
|
2008-12-06 01:57:08 +00:00
|
|
|
if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
|
2007-01-30 11:00:54 +00:00
|
|
|
|
2008-05-18 17:16:43 +00:00
|
|
|
install-%: %$(EXESUF) install-dirs
|
2012-11-14 12:06:00 +00:00
|
|
|
$(INSTALL) -m 755 $< $(BINDIR)
|
|
|
|
|
|
|
|
install-%-strip: %$(EXESUF) install-dirs
|
|
|
|
$(INSTALL) -m 755 -s $< $(BINDIR)
|
2007-01-30 11:00:54 +00:00
|
|
|
|
2012-11-13 22:41:38 +00:00
|
|
|
install-mpv-man: install-mpv-man-en
|
2008-08-07 12:35:34 +00:00
|
|
|
|
2012-10-11 00:04:08 +00:00
|
|
|
install-mpv-man-en: DOCS/man/en/mpv.1
|
2008-12-06 01:57:08 +00:00
|
|
|
if test ! -d $(MANDIR)/man1 ; then $(INSTALL) -d $(MANDIR)/man1 ; fi
|
2012-10-11 00:04:08 +00:00
|
|
|
$(INSTALL) -m 644 DOCS/man/en/mpv.1 $(MANDIR)/man1/
|
2008-05-18 17:05:16 +00:00
|
|
|
|
2013-09-09 02:23:06 +00:00
|
|
|
install-mpv-pdf: install-mpv-pdf-en
|
|
|
|
|
|
|
|
install-mpv-pdf-en: DOCS/man/en/mpv.pdf
|
2013-09-23 12:09:15 +00:00
|
|
|
if test ! -d $(DOCDIR) ; then $(INSTALL) -d $(DOCDIR) ; fi
|
|
|
|
$(INSTALL) -m 644 DOCS/man/en/mpv.pdf $(DOCDIR)/
|
2013-09-09 02:23:06 +00:00
|
|
|
|
Add mpv.desktop, let Makefile install the desktop file and the icons
The mpv.desktop file is taken from the Arch package [1]. It appears to
be based on the mplayer2 git mplayer.desktop file (e.g. very similar
MimeType field), with minor modifications applied by Arch package
maintainers.
Note that for now, this doesn't show a terminal (Terminal=false), which
might not always be ideal. For example, if the file is audio only, or
if VO initialization fails for some reason, mpv will run in the
background and play audio without showing a window. But users prefer
running it without terminal, and don't want to play audio files with
it.
Maybe a --force-window option will be added in the future, which would
always create a VO window, and compensate for these issues.
[1] https://aur.archlinux.org/packages/mpv-git/
2013-09-15 00:34:28 +00:00
|
|
|
ICONSIZES = 16x16 32x32 64x64
|
|
|
|
|
|
|
|
define ICON_INSTALL_RULE
|
|
|
|
install-mpv-icon-$(size): etc/mpv-icon-8bit-$(size).png
|
|
|
|
$(INSTALL) -d $(prefix)/share/icons/hicolor/$(size)/apps
|
|
|
|
$(INSTALL) -m 644 etc/mpv-icon-8bit-$(size).png $(prefix)/share/icons/hicolor/$(size)/apps/mpv.png
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach size,$(ICONSIZES),$(eval $(ICON_INSTALL_RULE)))
|
|
|
|
|
|
|
|
install-mpv-icons: $(foreach size,$(ICONSIZES),install-mpv-icon-$(size))
|
|
|
|
|
|
|
|
install-mpv-desktop: etc/mpv.desktop
|
|
|
|
$(INSTALL) -d $(prefix)/share/applications
|
|
|
|
$(INSTALL) -m 644 etc/mpv.desktop $(prefix)/share/applications/
|
|
|
|
|
2013-12-28 15:32:49 +00:00
|
|
|
install-mpv-config: etc/encoding-profiles.conf
|
|
|
|
$(INSTALL) -d $(CONFDIR)
|
|
|
|
$(INSTALL) -m 644 etc/encoding-profiles.conf $(CONFDIR)
|
|
|
|
|
|
|
|
install-data: install-mpv-icons install-mpv-desktop install-mpv-config
|
Add mpv.desktop, let Makefile install the desktop file and the icons
The mpv.desktop file is taken from the Arch package [1]. It appears to
be based on the mplayer2 git mplayer.desktop file (e.g. very similar
MimeType field), with minor modifications applied by Arch package
maintainers.
Note that for now, this doesn't show a terminal (Terminal=false), which
might not always be ideal. For example, if the file is audio only, or
if VO initialization fails for some reason, mpv will run in the
background and play audio without showing a window. But users prefer
running it without terminal, and don't want to play audio files with
it.
Maybe a --force-window option will be added in the future, which would
always create a VO window, and compensate for these issues.
[1] https://aur.archlinux.org/packages/mpv-git/
2013-09-15 00:34:28 +00:00
|
|
|
|
2001-10-22 22:46:38 +00:00
|
|
|
uninstall:
|
2012-10-11 00:04:08 +00:00
|
|
|
$(RM) $(BINDIR)/mpv$(EXESUF)
|
|
|
|
$(RM) $(MANDIR)/man1/mpv.1
|
2012-11-13 22:41:38 +00:00
|
|
|
$(RM) $(MANDIR)/en/man1/mpv.1
|
2013-09-23 12:09:15 +00:00
|
|
|
$(RM) $(DOCDIR)/mpv.pdf
|
Add mpv.desktop, let Makefile install the desktop file and the icons
The mpv.desktop file is taken from the Arch package [1]. It appears to
be based on the mplayer2 git mplayer.desktop file (e.g. very similar
MimeType field), with minor modifications applied by Arch package
maintainers.
Note that for now, this doesn't show a terminal (Terminal=false), which
might not always be ideal. For example, if the file is audio only, or
if VO initialization fails for some reason, mpv will run in the
background and play audio without showing a window. But users prefer
running it without terminal, and don't want to play audio files with
it.
Maybe a --force-window option will be added in the future, which would
always create a VO window, and compensate for these issues.
[1] https://aur.archlinux.org/packages/mpv-git/
2013-09-15 00:34:28 +00:00
|
|
|
$(RM) $(prefix)/share/applications/mpv.desktop
|
|
|
|
$(RM) $(foreach size,$(ICONSIZES),$(prefix)/share/icons/hicolor/$(size)/apps/mpv.png)
|
2001-10-22 22:46:38 +00:00
|
|
|
|
2008-04-30 17:54:02 +00:00
|
|
|
clean:
|
2012-07-14 04:32:57 +00:00
|
|
|
-$(RM) $(call ADD_ALL_DIRS,/*.o /*.d /*.a /*.ho /*~)
|
manpage: merge new manpage
About a year ago, ubitux converted most of the old manpage from the
hard to maintain nroff format to reStructuredText. This was not merged
back into the master repository immediately. The argument was that the
new manpage still required work to be done. However, progress was very
slow. Even worse: the old manpage wasn't updated, because it was
scheduled for deletion, and updating it would have meant useless work.
Now the situation is that the new manpage still isn't finished, and the
old manpage is grossly out of sync with the player. This is not helpful
for users. Additionally, keeping the new manpage in a separate branch,
while the normal development repository for code had the old manpage,
was very inconvenient, because you couldn't just update the
documentation in the same commit as the code.
Even though the new manpage isn't finished yet, merging it now seems to
be the best course of action. Squash-merge the manpage development
branch [1], revision e89f5dd3f2, which branches from the mplayer2
master branch after revision 159102e0cb.
Committers:
* Clément Bœsch <ubitux@gmail.com> (Initial conversion to RST.)
* Uoti Urpala <uau@mplayer2.org> (Many updates.)
* Myself (Minor edits.)
Most text of the manpage has been directly taken from the old manpage,
because this is a conversion, not a complete rewrite.
[1] http://git.mplayer2.org/uau/mplayer2.git/log/?h=man
2012-08-02 19:37:33 +00:00
|
|
|
-$(RM) $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~)
|
2012-10-11 00:04:08 +00:00
|
|
|
-$(RM) $(call ADD_ALL_EXESUFS,mpv)
|
2014-01-08 15:00:40 +00:00
|
|
|
-$(RM) $(call ADDSUFFIXES,.pdf,DOCS/man/*/mpv)
|
2013-09-09 02:23:06 +00:00
|
|
|
-$(RM) DOCS/man/*/mpv.1
|
2012-08-01 21:21:55 +00:00
|
|
|
-$(RM) version.h
|
2013-12-17 00:23:09 +00:00
|
|
|
-$(RM) input/input_conf.h
|
2012-11-09 00:06:43 +00:00
|
|
|
-$(RM) video/out/vdpau_template.c
|
|
|
|
-$(RM) demux/ebml_types.h demux/ebml_defs.c
|
2013-03-01 20:19:20 +00:00
|
|
|
-$(RM) video/out/gl_video_shaders.h
|
x11: add window icon
The png file added to etc/ are taken from the link mentioned in commit
303096b, except that they have been converted to 16 bit, sRGB (with
color profile info dropped, if there was one), and transparent pixels
reset for better compression.
The file x11_icon.bin is generated by gen-x11-icon.sh. I'm adding it to
the git repo directly, because the script requires ImageMagick, and we
don't want to make building even more complicated.
The way how this is done is basically a compromise between effort
required in x11_common.c and in gen-x11-icon.sh. Ideally, x11_icon.bin
would be directly in the format as required by _NET_WM_ICON, but trying
to write the binary width/height values from shell would probably be a
nightmare, so here we go.
The zlib code in x11_common.c is lifted from demux_mkv.c, with some
modifications (like accepting a gzip header, because I don't know how to
make gzip write raw compressed data).
2013-09-01 21:26:44 +00:00
|
|
|
-$(RM) video/out/x11_icon.inc
|
2014-01-14 07:18:05 +00:00
|
|
|
-$(RM) osdep/macosx_icon.inc
|
2012-08-01 21:21:55 +00:00
|
|
|
-$(RM) sub/osd_font.h
|
2013-12-16 23:53:22 +00:00
|
|
|
-$(RM) player/lua/defaults.inc
|
|
|
|
-$(RM) player/lua/assdraw.inc
|
|
|
|
-$(RM) player/lua/osc.inc
|
2006-08-03 17:31:30 +00:00
|
|
|
|
2012-07-28 16:32:26 +00:00
|
|
|
distclean: clean
|
2013-07-16 11:28:28 +00:00
|
|
|
-$(RM) config.log old_build/config.h old_build/config.mak Makefile config.mak config.h TAGS tags
|
|
|
|
-rmdir old_build/
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2008-01-10 18:40:26 +00:00
|
|
|
TAGS:
|
2011-06-30 20:12:48 +00:00
|
|
|
$(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs etags -a
|
2008-01-10 18:40:26 +00:00
|
|
|
|
|
|
|
tags:
|
2011-06-30 20:12:48 +00:00
|
|
|
$(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a
|
2008-01-10 18:40:26 +00:00
|
|
|
|
2012-08-13 10:08:22 +00:00
|
|
|
osxbundle:
|
|
|
|
@TOOLS/osxbundle.py mpv
|
|
|
|
|
2013-04-08 19:44:46 +00:00
|
|
|
osxbundle-skip-deps:
|
|
|
|
@TOOLS/osxbundle.py --skip-deps mpv
|
|
|
|
|
2010-09-20 12:07:56 +00:00
|
|
|
-include $(DEP_FILES)
|
2008-04-24 21:58:45 +00:00
|
|
|
|
2012-11-13 22:52:08 +00:00
|
|
|
.PHONY: all *install* *clean .version
|
2010-06-22 13:15:34 +00:00
|
|
|
|
|
|
|
# Disable suffix rules. Most of the builtin rules are suffix rules,
|
|
|
|
# so this saves some time on slow systems.
|
|
|
|
.SUFFIXES:
|
2010-11-03 22:50:44 +00:00
|
|
|
|
|
|
|
# If a command returns failure but changed its target file, delete the
|
|
|
|
# (presumably malformed) file. Otherwise the file would be considered to
|
|
|
|
# be up to date if make is restarted.
|
|
|
|
|
|
|
|
.DELETE_ON_ERROR:
|