1
mirror of https://github.com/mpv-player/mpv synced 2024-10-18 10:25:02 +02:00
Commit Graph

36408 Commits

Author SHA1 Message Date
Rudolf Polzer
633fde4ae5 sd_lavc, sd_spu: make dvdsub stretching conditional on --stretch-dvd-subs.
We found that the stretching - although it usually improves the looks of
the fonts - is incorrect.

On DVD, subtitles can cover the full area of the picture, and they have
the same pixel aspect as the movie itself.

Too bad many commercially released DVDs use bitmap fonts made with the
wrong pixel aspect (i.e. assuming 1:1) - --stretch-dvd-subs will make
these more pretty then.
2013-11-07 12:56:07 +01:00
Rudolf Polzer
49caa0a775 sd_ass, sd_lavc: use the input video's pixel aspect for scaling subtitles.
The previous code used the output video's pixel aspect for stretching
purposes, breaking rendering with e.g. -vf scale in the chain. Now
subtitles are stretched using the input video's pixel aspect only,
matching the intentions of the original subtitle author.
2013-11-07 12:56:07 +01:00
wm4
dbb7927a1e ao_oss: fix previous ao_oss commit
Basically I introduced an inverted condition, and the line removed was
inactive before commit ce72aaa.
2013-11-06 22:28:17 +01:00
Stefano Pigozzi
057c2e25b0 travis: use clang for ffmpeg/libav compilation
I overlooked the fact that the ffmpeg/libav build system only supports `--cc`
and completly ignores $CC. Hopefully this makes the build times a little
faster.

Fixes #332
2013-11-06 20:56:28 +01:00
wm4
ce72aaae7b ao_oss: hide warning 2013-11-06 20:33:48 +01:00
bugmen0t
9db560b9a9 ao_oss: don't enable -softvol by default on OSSv4 2013-11-06 20:31:38 +01:00
bugmen0t
0cffd98e8e ao_oss: make no_persistent_volume volume work when seeking 2013-11-06 20:31:36 +01:00
wm4
d445147be9 osdep: handle SIGTERM
There's no reason why we should e.g. handle SIGQUIT, but not SIGTERM.

Note that sending SIGTERM twice still kills the player.
2013-11-06 20:29:16 +01:00
wm4
ac01e6a147 input.conf: clarify the magic how default key bindings are added
This is a confusing mechanism, so the explanation should bit more clear.
2013-11-06 20:27:19 +01:00
wm4
ce8bc1320d memcpy_pic: reformat
Besides cosmetic changes, also change memcpy_pic return type and remove
config.h include.
2013-11-06 20:27:13 +01:00
wm4
6d2c5fc99a vd_lavc: remove explicit crystalhd support
This removes "--hwdec=crystalhd".

I doubt anyone even tried to use this. But even if someone wants to
use it, the decoders can still be explicitly invoked with e.g.:

    --vd=lavc:h264_crystalhd

The only advantage our special code provided was fallback to
software decoding. (But I'm not sure how the ffmpeg crystalhd
pseudo-decoder actually behaves.)

Removing this will allow some simplifications as soon as we don't need
vdpau_old.c anymore.
2013-11-06 00:47:53 +01:00
wm4
3cfbe81038 input: remove unused key_down_event command
There's no real use-case for this, and is wasn't documented (didn't even
appear on the "undocumented commands" list).
2013-11-06 00:08:38 +01:00
wm4
9dc0dfbd54 input: disallow autorepeat by default for most commands
This drops autorepeated key events for a number of commands. This should
help with slow situations accidentally triggering too many repeats. (I'm
not sure if this actually happened to users - maybe.)

It's not clear whether MP_CMD_COMMAND_LIST (multiple commands on one
binding separated by ';') should be repeated, or whether it should try
to do something clever. For now, disallow autorepeat with it.
2013-11-06 00:05:12 +01:00
wm4
01d12a51f1 gl_header_fixes: fix inverted condition
Could possibly leading to failing compilation on systems with headers
that miss the vdpau extension.
2013-11-05 22:39:19 +01:00
wm4
db6a4eec0a vo_opengl: support for vdpau hardware decoding
This uses vdpau OpenGL interop to convert a vdpau surface to a texture.

Note that this is a bit weak and primitive. Deinterlacing (or any other
form of vdpau postprocessing) is not supported. vo_opengl chroma scaling
and chroma sample position are not supported. Internally, the vdpau
video surfaces are converted to a RGBA surface first, because using the
video surfaces directly is too complicated. (These surfaces are always
split into separate fields, and the vo_opengl core expects progressive
frames or frames with weaved fields.)
2013-11-05 22:28:15 +01:00
wm4
5cca9143ab vdpau: move device and video surface management from vo_vdpau.c to vdpau.c
The goal is being able to use vdpau decoding independently from
vo_vdpau.c.
2013-11-05 22:13:05 +01:00
wm4
ff5a908328 vo_opengl: redo aspects of initialization, change hwdec API
Instead of checking for resolution and image format changes, always
fully reinit on any parameter change. Let init_video do all required
initializations, which simplifies things a little bit.

Change the gl_video/hardware decoding interop API slightly, so that
hwdec initialization gets the full image parameters.

Also make some cosmetic changes.
2013-11-05 22:05:23 +01:00
wm4
91472b84c2 vo_opengl/vaapi: use IMGFMT_RGB0
More correct, might make things slightly faster (probably
insignificant).
2013-11-05 22:05:23 +01:00
wm4
d6de87d1d3 video: make IMGFMT_RGB0 etc. exist even if libavutil doesn't support it
These formats are helpful for distinguishing surfaces with and without
alpha. Unfortunately, Libav and older version of FFmpeg don't support
them, so code will break. Fix this by treating these formats specially
on the mpv side, mapping them to RGBA on Libav, and unseting the alpha
bit in the mp_imgfmt_desc struct.
2013-11-05 22:05:23 +01:00
wm4
890d8ea194 manpage: fix incorrect default for --osc 2013-11-05 22:05:23 +01:00
wm4
7df03a1c9e vo_xv: fix compilation of SHM not available 2013-11-05 22:05:22 +01:00
Stefano Pigozzi
f2d67a48c9 travis: update ffmpeg stable to 1.2.4 tarball
This is the last release in the 1.2.4 line.
2013-11-05 21:28:29 +01:00
Timothy Gu
327c88f4c9 travis: Update libav stable tarball
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2013-11-05 21:21:36 +01:00
wm4
ed02cbf92f playlist: rewrite PLS parser
Somehow the new parser ends up much smaller. Much of it is because we
don't parse some additional information. We just skip it, instead of
parsing it and then throwing it away.

More importantly, we use the physical order of entries, instead of
trying to sort them by entry number. Each "File" entry is followed by a
number that is supposed to be the entry number, and "File1" is first.
(Should it turn out that this is really needed, an additional field
should be added to playlist_entry, and then qsort().)
2013-11-04 23:55:41 +01:00
wm4
b74edd4069 demux_mkv: fix compiler warnings
Make TOOLS/matroska.pl output structs with fields sorted by name in
ebml_types.h to make the order of fields deterministic. Fix warnings in
demux_mkv.c caused by the first struct fields switching between scalar
and struct types due to non-deterministic ebml_types.h field order.
Since it's deterministic now, this shouldn't change anymore.

The warnings produced by the compilers are bogus, but we want to silence
them anyway, since this could make developers overlook legitimate
warnings.

What commits 7b52ba8, 6dd97cc, 4aae1ff were supposed to fix. An earlier
attempt sorted fields in the generated C source file, not the header
file. Hopefully this is the last commit concerning this issue...
2013-11-04 23:49:22 +01:00
Paweł Forysiuk
f330884b0a Adjust wayland defines 2013-11-04 21:28:34 +01:00
wm4
2826dcff8f vdpau: drop required/deprecated access to a libavcodec struct field
Before the bitstream_buffers field was deprecated, you had to free it,
otherwise you would leak memory.

(Although vdpau.c uses a new API, they managed to introduce a new
deprecation this quickly. This is a complaint.)

This introduces a memory leak of 12 bytes per file on every file on some
_older_ libavcodec versions. This is minor enough that I don't care.
2013-11-04 19:59:03 +01:00
wm4
859964e0db stream_lavf: don't duplicate list of rtmp protocols
Assume a rtmp prefix means rtmp instead.
2013-11-04 19:57:39 +01:00
wm4
41fedab2d9 stream_lavf: support more libavformat protocols 2013-11-04 19:57:13 +01:00
wm4
bb22bee315 vo_opengl: cosmetics/fix typos 2013-11-04 19:46:28 +01:00
wm4
383d8a8b60 vo_opengl: reserve 4 texture units for video instead of 3
Video has up to 4 textures, if you include obscure formats with alpha.
This means alpha formats could always overwrite the first scaler
texture, leading to corrupted video display. This problem was recently
brought to light, when commit 571e697 started to explicitly unbind all 4
video textures, which broke rendering for non-alpha formats as well.

Fix this by reserving the correct number of texture units.
2013-11-04 19:46:15 +01:00
Stefano Pigozzi
78a9bc4a7d osx: fix -Wshadow warnings on platform specific code 2013-11-04 08:33:35 +01:00
Stefano Pigozzi
9087500179 Merge remote-tracking branch 'origin/have_configure' 2013-11-04 08:31:58 +01:00
wm4
5b6eab01af vo_opengl: fix use of uninitialized memory
Pretty bad, although it should actually not cause any misbehavior. Comes
from the hardware decoding interop commit.
2013-11-04 01:20:11 +01:00
wm4
3a831b2c01 fix HAVE_PTHREADS being undefined on windows 2013-11-04 00:48:43 +01:00
wm4
00de1320b0 fix HAVE_JACK being undefined
Holy inconsistency, let's just kill it with waf.
2013-11-04 00:48:29 +01:00
wm4
222cfe7fe6 define HAVE_COREAUDIO on platforms other than OSX 2013-11-04 00:43:47 +01:00
wm4
3813b13796 fix weird DPMS->EXT replacement 2013-11-04 00:43:27 +01:00
wm4
f7b2d644ef Merge branch 'master' into have_configure
Conflicts:
	configure
2013-11-04 00:43:06 +01:00
Paweł Forysiuk
25affdcc88 Fix -Wshadow warning about seek function in playloop.c
mpvcore/player/playloop.c: In function 'seek':
mpvcore/player/playloop.c:209:54: warning: declaration of 'seek' shadows a global declaration [-Wshadow]
mpvcore/player/playloop.c:209:12: warning: shadowed declaration is here [-Wshadow]
mpvcore/player/playloop.c: In function 'queue_seek':
mpvcore/player/playloop.c:360:25: warning: declaration of 'seek' shadows a global declaration [-Wshadow]
mpvcore/player/playloop.c:209:12: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: wm4 <wm4@nowhere>
2013-11-04 00:13:24 +01:00
wm4
2d58fb3b8e vo_opengl: add support for VA-API OpenGL interop
VA-API's OpenGL/GLX interop is pretty bad and perhaps slow (renders a
X11 pixmap into a FBO, and has to go over X11, probably involves one or
more copies), and this code serves more as an example, rather than for
serious use. On the other hand, this might be work much better than
vo_vaapi, even if slightly slower.
2013-11-04 00:11:43 +01:00
wm4
571e697a7c vo_opengl: add infrastructure for hardware decoding OpenGL interop
Most hardware decoding APIs provide some OpenGL interop. This allows
using vo_opengl, without having to read the video data back from GPU.

This requires adding a backend for each hardware decoding API. (Each
backend is an entry in gl_hwdec_vaglx[].) The backends expose video data
as a set of OpenGL textures.

Add infrastructure to support this. The next commit will add support for
VA-API.
2013-11-04 00:11:07 +01:00
wm4
6f17410f88 mp_image: add helper for copying image attributes
This enw function is similar to mp_image_set_params(), but doesn't force
setting "hard" parameters like image size and format.
2013-11-03 23:55:16 +01:00
Stefano Pigozzi
37388ebb0e configure: uniform the defines to #define HAVE_xxx (0|1)
The configure followed 5 different convetions of defines because the next guy
always wanted to introduce a new better way to uniform it[1]. For an
hypothetic feature 'hurr' you could have had:

  * #define HAVE_HURR 1   / #undef HAVE_DURR
  * #define HAVE_HURR     / #undef HAVE_DURR
  * #define CONFIG_HURR 1 / #undef CONFIG_DURR
  * #define HAVE_HURR 1   / #define HAVE_DURR 0
  * #define CONFIG_HURR 1 / #define CONFIG_DURR 0

All is now uniform and uses:
  * #define HAVE_HURR 1
  * #define HAVE_DURR 0

We like definining to 0 as opposed to `undef` bcause it can help spot typos
and is very helpful when doing big reorganizations in the code.

[1]: http://xkcd.com/927/ related
2013-11-03 21:59:54 +01:00
ChrisK2
3b5f8ea571 tools: add --no-cache --no-config to mpv_identify.sh 2013-11-03 20:48:49 +01:00
wm4
388f43f6f7 player: fix quvi 0.9 playlist loading
The code made no sense at all.
2013-11-03 19:22:13 +01:00
wm4
a49ab7cc2f demux: make determining seek capability generic
Instead of having each demuxer do it (only demux_mkv actually did...),
let generic code determine whether the file is seekable. This requires
adding exceptions to demuxers where the stream is not seekable, but the
demuxer is.

Sort-of try to improve handling of unseekable files in the player. Exit
early if the file is determined to be unseekable, instead of resetting
all decoders and then performing a pointless seek.

Add an exception to allow seeking if the file is not seekable, but the
stream cache is enabled. Print a warning in this case, because seeking
outside the cache (which we can't prevent since the demuxer is not aware
of this problem) still messes everything up.
2013-11-03 19:21:47 +01:00
wm4
847cbe9d5d demux: remove movi_start/movi_end fields
Pointless, using stream->start_pos/end_pos instead.

demux_mf was the only place where this was used specially, but we can
rely on timestamps instead for this case.
2013-11-03 18:50:00 +01:00
wm4
22274f7982 stream: more consistent checks for whether stream is seekable
Never check s->seek (except in init), because it'd have to check
s->flags anyway. Also, for fast skippable streams (like pipes), don't
set the bit that indicates support for seek forward.

Make sure s->end_pos is always 0 for unseekable streams. Lots of code
outside of stream.c uses this to check seeking support.
2013-11-03 17:46:36 +01:00
wm4
84f7e213ab stream: reconnecting doesn't make sense if stream is not seekable
This stops mpv from being stuck in reconnecting at the end of the file
with some unseekable streams.

Test URL: http://playerservices.streamtheworld.com/pls/CBC_R1_VCR_H.pls
2013-11-03 17:30:34 +01:00