Commit Graph

39924 Commits

Author SHA1 Message Date
wm4 c3275f7e53 stream_cdda: don't return number of tracks as number of titles
Apparently, we treat different tracks as titles, so returning the number
of titles (which is user-visible as "disc-titles" property) is
completely misguided.
2014-12-13 20:25:56 +01:00
wm4 8b7418db97 dvd: drop last chapter
Apparently, libdvdnav always reports a last chapter that points to the
exact end of the title. This is useless for us.

Again, same possible caveats as with the previous commit.
2014-12-13 20:25:56 +01:00
wm4 13ae78d207 dvd: add an extra chapter at position 0
This way, chapter 0 will always point to the start of the title.

At least this is the intention; it's likely that DVDs as well as
libdvdnav do random things that lead to random results.
2014-12-13 20:25:56 +01:00
Mihai Moldovan 8c927376a1 osxbundle: don't use sed but pure python
GNU sed and BSD sed don't share the same options for editing files in-place,
so a workaround is needed.

The most simple way is to use a pure python implementation of applying the
changes.
2014-12-13 11:20:29 +01:00
Ben Boeckel 8c3dc7334b DOCS: add missing close bracket 2014-12-12 18:14:07 -05:00
wm4 82317593e9 options: add option for ignoring patch in resume mechanism
Whatever.

Fixes #1281.
2014-12-13 00:04:08 +01:00
wm4 98e400216d player: add a --keep-open=always mode
The --keep-open behavior was recently changed to act only on the last
file due to user requests (see commit 735a9c39). But the old behavior
was useful too, so bring it back as an additional mode.

Fixes #1332 (or rather, should help with it).
2014-12-12 23:45:16 +01:00
wm4 2768ded1b9 options: fix parsing for --ab-loop-*
Editing mistake. Oops.
2014-12-12 23:22:50 +01:00
wm4 2b337d67a4 Check some mallocs
Fixes #1337.
2014-12-12 17:28:22 +01:00
wm4 5012e5156d DOCS/crosscompile-mingw: update
Unrecommend mingw-w64-cmake, point out MXE host requirements.
2014-12-12 01:08:51 +01:00
wm4 d17c3b63c3 command: add properties for current bitrate
Fixes #1192.
2014-12-12 01:00:58 +01:00
wm4 47452443c5 demux: don't always make --cache-secs override --demuxer-readahead-secs
It's confusing. Whether the new behavior is less confusing... whatever.
2014-12-12 01:00:51 +01:00
wm4 3dc8f63baa options: make --no-... options work for OPT_REPLACED too
Do this by automatically adding the option, if the aliased option name
also has a "no-..." variant.

Could be easier by manually adding "no-..." variants to the option list,
but this seems better because you can't just forget it.
2014-12-11 23:23:50 +01:00
selsta 29f28fd948 DOCS/contribute.md: remove unintentional headline
The # from the IRC channel made it appear as a headline.
2014-12-11 21:33:01 +01:00
James Ross-Gowan 8a270250e8 pipe-win32: possible fix for Windows XP deadlock
This fixes a hang with the VirtualBox OpenGL drivers. It might help
with #1325 as well.
2014-12-11 23:38:15 +11:00
wm4 d01cf36c74 manpage: fix mistake in --video-zoom mention
Fixes #1331.
2014-12-11 13:01:16 +01:00
wm4 d054289f66 options: add slightly more sophistcated mechanism for option deprecation 2014-12-11 01:04:15 +01:00
wm4 eb36bd6945 lua: don't ignore key press events for script key bindings
Meh.
2014-12-10 18:36:05 +01:00
wm4 efd3f6f0d2 command: fix crash with some forms of script_binding
"script_binding name ..." just crashed it. Oops.
2014-12-10 18:28:09 +01:00
wm4 f0cdd673a8 player: update chapter marks when switching files
This wasn't done, so the chapter marks of the previous file were
visible. It's harmless, but looks unpolished, so fix it.
2014-12-10 17:52:21 +01:00
wm4 ccd4a732ab player: set a specific window title in idle mode
Instead of "(unavailable)".
2014-12-10 17:51:45 +01:00
wm4 d1aabb6316 m_option: never return NOPTS value as number from properties
MP_NOPTS_VALUE (basically INT64_MIN) is basically an special timestamp
value that means "unset" or "unknown". Its exact value is internal, and
should never be returned or interpreted by any API.

So return "no" instead (what is also what the parser accepts).
2014-12-10 17:15:43 +01:00
wm4 56eb2b71b8 vo: fix some nonsense
Commit d38bc531 is incorrect: the 50ms queue-ahead value and the flip
queue offset have different functions. The latter is about calling
flip_page in advance, so the change attempted to show video frames 50ms
in advance on all VOs.

The change was for vo_opengl_cb, but that can be handled differently.
2014-12-10 17:00:18 +01:00
wm4 c6dc0c6d99 command: add "idle" property
Yes, it's redundant with events.
2014-12-10 14:42:57 +01:00
wm4 10a2f69347 emux_mkv: fix possible uninitialized reads with short files
These actually are harmless. Even if the data the reader is working on
is essentially random, it's treated like untrusted input data, so there
should be no harm.

But it upsets tools like valgrind.

Probably fixes #1329.
2014-12-10 14:37:35 +01:00
wm4 f6d7230a6f manpage: update the ao_alsa example (no-block was removed)
Also, don't use the "hw" device, but "plughw". ALSA docs say never to
use "hw".
2014-12-09 22:57:25 +01:00
wm4 543ef1fd2e DOCS/client_api_examples: remove nonsense
I thought setSamples() was some funky abstraction to set the number of
components, but it's actually something else.

Also fix the include paths.
2014-12-09 22:53:34 +01:00
wm4 5beac919d0 vo_opengl: fix linkage type
Can happen on Windows, I suppose.
2014-12-09 22:37:32 +01:00
wm4 2413fc1cba vo_opengl: make shader text output slightly nicer
It was missing an indentation in some cases.
2014-12-09 22:30:49 +01:00
wm4 56882eaee4 vo_opengl: don't crash if framebuffers are not available
In theory, vo_opengl supports operation without framebuffers. But this
has been broken for a while now (commit cc00b3ff is a contender). It
crashed because it unconditionally called gl->BindFramebuffer() (which
is NULL if framebuffers are missing).

Since this function is actually only called to set the default
framebuffer, the simplest way to deal with this is to provide a dummy
function, insteas of uglifying the code with additional if branches.
2014-12-09 22:28:16 +01:00
wm4 5f0a2b5908 options: enable --ytdl by default
Let's see who complains...
2014-12-09 21:55:27 +01:00
wm4 900c2e9f78 player: change interaction between revert_seek and ab-loops
The result isn't quite what I imagined, because the A-point is never
marked as a seek point (so you can't jump between A and B), but it's
still slightly better than before.
2014-12-09 21:55:27 +01:00
wm4 273565c525 vo_opengl_cb: simplify reconfigure, render transparent if unconfigured
I think that's expected; mpv shouldn't draw anything while no video is
active. This doesn't blend transparently, though.

Also document the vo_opengl_cb thing.
2014-12-09 21:55:27 +01:00
wm4 0125fb6714 vo_opengl: make background color configurable
This mainly affects the black bars that are drawn if the window and
video aspect ratios mismatch.
2014-12-09 21:55:27 +01:00
wm4 ef709d19d4 options: --wid can be set at any time
After being bitten by this, I decided that this mostly unnecessary
requirement sucks.

Allowing this makes it easier to use libmpv, because it can be set after
mpv_initialize(). The latest reasonable time an API user can set this
variable is before actually loading a file.

The previous 2 commits make sure nothing bad can happen if the option is
changed at runtime even if a VO is active. The Cocoa backend should be
fine and doesn't need a change.
2014-12-09 21:55:27 +01:00
wm4 a8cce88663 w32: copy WinID option
See previous and next commit.
2014-12-09 21:55:21 +01:00
wm4 fbccddb48b x11: copy WinID option
For the purpose of making "--wid" setable at any time.
2014-12-09 21:55:18 +01:00
wm4 fb855b8659 client API: expose OpenGL renderer
This adds API to libmpv that lets host applications use the mpv opengl
renderer. This is a more flexible (and possibly more portable) option to
foreign window embedding (via --wid).

This assumes that methods like context sharing and multithreaded OpenGL
rendering are infeasible, and that a way is needed to integrate it with
an application that uses a single thread to render everything.

Add an example that does this with QtQuick/qml. The example is
relatively lazy, but still shows how relatively simple the integration
is. The FBO indirection could probably be avoided, but would require
more work (and would probably lead to worse QtQuick integration, because
it would have to ignore transformations like rotation).

Because this makes mpv directly use the host application's OpenGL
context, there is no platform specific code involved in mpv, except
for hw decoding interop.

main.qml is derived from some Qt example.

The following things are still missing:
- a way to do better video timing
- expose GL renderer options, allow changing them at runtime
- support for color equalizer controls
- support for screenshots
2014-12-09 17:59:04 +01:00
wm4 d38bc531cc vo: include normal render-ahead time in flip_queue_offset
A small refactor; shouldn't change any behavior.

Do this so immediate display can be achieved.
2014-12-09 17:59:04 +01:00
James Ross-Gowan 349d19dda9 w32_common: fix GUID linking in Cygwin 2014-12-09 21:07:47 +11:00
wm4 ca1ec30a4b player: restore ab-loop settings with playback resume
Fixes #1324.
2014-12-09 08:32:01 +01:00
Stefano Pigozzi f93e8bb490 cocoa: fix crash
fixes #1323

Doesn't leak unless we switch video tracks on and off while in fullscreen.
2014-12-08 23:02:09 +01:00
wm4 f78488b1f0 input.conf: add example for aspect ratio cycling
This is requested oftem, but I don't know if it should be an actual
default binding.
2014-12-08 19:02:40 +01:00
wm4 e40792c820 demux_mkv: support svq3
The most awesome codec, not.

The actual code for svq3 is actually just the part that checks for
MKV_V_QUICKTIME (no other QT-muxed codecs are supported). The rest is
minor refactoring, that actually improves the code in general.

This is just enough to support the 2 svq3-in-mkv sample files I have.
2014-12-08 18:52:32 +01:00
wm4 6a88de05a7 build: fix --disable-libass
Still supported, but obviously untested.

You shouldn't use this option anyway.
2014-12-08 18:17:20 +01:00
wm4 b9f5daf9c3 player: make chapter seek to end jump to last frame with --keep-open
There were complaints that a chapter seek past the last chapter was
quitting the player. Change the behavior to what is expected: the last
frame.

If no chapters are available, this still does nothing.
2014-12-08 17:27:07 +01:00
wm4 8927d5942c vo_opengl: enable fancy-downscaling for opengl-hq again
I guess most problems with it have been fixed.

It's still slower than necessary, though.
2014-12-08 17:09:39 +01:00
wm4 08e9bbe3dd vo_opengl: use all filter sizes possible with the shaders
Not all filter sizes the shaders could handle were in the filter_sizes
list. The shader can handle any multiple of 4 (the sizes 2 and 6 are
special-cased to keep it simple).

Add all possible filter sizes, up to 64. 64 is ridiculously high anyway.
Most of the larger filter sizes are completely useless for upscaling,
but help with the fancy-downscaling option. (Although it would still be
more efficient to use cascaded scalers to handle downscaling better.)

I considered doing something less stupid than the hardcoded array, but
it seems this is still the simplest solution.
2014-12-08 17:08:26 +01:00
wm4 9c484cb080 vo_opengl: refactor: instantiate scaler functions at runtime
Before this commit, the convolution scaler shader functions were pre-
instantiated in the shader file. For every filter size, a corresponding
function (with the filter size as suffix) had to be present.

Change this, and make the C code emit the necessary bits.

This means the shader code is much reduced. (Although hopefully it
doesn't make shader compilation faster - it would require a really dumb
compiler if it spends its time on dead code.)

It also makes it more flexible, which is the main goal.

The DEF_SCALER0 stuff is needed because the C code writes the header of
the shader, at a point where scaler macros are not defined yet.
2014-12-08 16:24:38 +01:00
wm4 4a95be014b vo_opengl: never use 1D textures for lookup textures
This was a microoptimization for small filters which need 4 or less
weights per sample point. When I originally wrote this code, using a 1D
texture seemed to give a slight speed gain, but now I couldn't measure
any difference.

Remove this to simplify the code.
2014-12-08 15:23:21 +01:00