Commit Graph

44722 Commits

Author SHA1 Message Date
wm4 5a33242854 ao_wasapi_changenotify: use %ls instead of %S for wchar_t
%ls is C99. %S is supported by some systems, including MinGW/MSVC, but
no reason to use it.
2017-04-20 07:38:03 +02:00
wm4 05e6d423d9 ao_wasapi_changenotify: fix potential race condition
IMMDeviceEnumerator_RegisterEndpointNotificationCallback() will start
listening for notifications, and is the point at which callbacks can
start firing. These callbacks will read the fields we set after the
register calls, which is a potential race condition. Move it upwards.
2017-04-20 07:33:13 +02:00
wm4 5ae25ae424 client API: add MPV_ENABLE_DEPRECATED symbol
(Of course this is on by default, because otherwise we'd randomly break
downstream applications.)
2017-04-20 06:19:55 +02:00
wm4 f41e50530f options: change --audio-file-auto default to not to load any files
There have been user complaints, and I'm annoyed by this behavior
myself.
2017-04-20 05:29:04 +02:00
Avi Halachmi (:avih) 150c988e88
osc: add user_opts.boxmaxchars for box layout title limit
The default of 80 is conservative to allow relatively wide fonts, but
with many common fonts a bigger number can be used without overflow.
2017-04-19 20:35:58 +01:00
Ricardo Constantino 6ccc40aa03
sub/osd_font.otf: fix fontforge errors/warnings 2017-04-19 20:18:24 +01:00
Ricardo Constantino 05c8707a0b
osc: add volume icons to osd font and use them
Glyphs taken and based on U+1F507 to U+1F50A from Symbola, which
is available under public domain: http://users.teilar.gr/~g1951d/
2017-04-19 20:18:23 +01:00
Ricardo Constantino a047e636ab
man/osc: document volume and fullscreen buttons 2017-04-19 20:18:23 +01:00
Ricardo Constantino 9d6c208afa
osc: move volume left of fullscreen button 2017-04-19 20:18:23 +01:00
Ricardo Constantino fe937e866d
osc: bottom/topbar: add fullscreen button 2017-04-19 20:18:23 +01:00
Ricardo Constantino a477c864a4
osc: add volume button
Click to toggle mute, mouse wheel to change volume.
OSD is shown on volume change.
2017-04-19 20:18:23 +01:00
Ricardo Constantino 00ab5a15be
osc: support handling mouse wheel events 2017-04-19 20:18:23 +01:00
Ricardo Constantino e870b7ad66
osc: simplify checks in key handler
Use a helper function for these safety checks.
2017-04-19 20:18:23 +01:00
Ricardo Constantino 82bf4567f9
osc: fix last potential race condition on key events 2017-04-19 20:18:15 +01:00
Nicolas F 676570a643 manpage: replace gendered pronouns 2017-04-19 16:05:56 +02:00
wm4 dcb5800357 osx: fix deadlock on exit with libmpv on OSX
There is explicit code to handle the libmpv case, but it expects that
a dispatch queue is running. This is not necessarily the case. E.g.
edit the simple.c mpv example not to do any playback and to destroy
the mpv handle immediately. It will freeze on exit, because nothing
will release the mpv_handle.

I'm not sure how this should be fixed, so disable it for now in
library mode.
2017-04-19 12:55:44 +02:00
wm4 e335e33239 codec_tags: minor simplification
At least this doesn't duplicate the libavcodec PCM codec names.
2017-04-18 05:35:50 +02:00
wm4 080b930742 codec_tags: remove some more leftovers
I think these became redundant some time ago, and would only matter if
someone put QT tags into WAVEFORMATEX headers using mkv avi muxing.
2017-04-18 05:34:16 +02:00
wm4 ce4ab483b5 ass_mp: reallocate cached subtitle image data on format changes
When the format of the subtitle bitmaps changes, such as with taking
screenshots with vo_vaapi (RGBA for the VO vs. Y8 for screenshots), the
cache image obviously needs to be recreated.

Fixes #4325.
2017-04-18 05:34:10 +02:00
Akemi f7637db377 cocoa: fix retrieval of unfs window size while animating
due to the System inherent fullscreen animation the option and the
actual fullscreen state can be out of sync, leading to a wrongly
reported unfs window size in the time of the animation.

just always fall back to the window size, we keep track of, when we
either are in fullscreen or are currently switching to it.

Fixes #4323
2017-04-17 02:45:26 +02:00
wm4 bba08e38ff vo_opengl: move X11 backends before Wayland
Wayland is still too amateurish, and multiple features don't work,
including critical ones. There is no solution in sight, so prefer X11.
(Which seems to mostly work ok via xwayland.)

Once all problems are solved, the defaults can be switched back.
2017-04-16 02:35:12 +02:00
Dan Oscarsson 1a0c340a5e sub: minor sdh filter fixes
When doing harder filtering not require a space after : results
in lines with a clock (like 10:05) to be taken as a speaker label.
So require a space after : even when doing harder filtering as
missing space is very uncommon.
Some like to add text in parentheses in the speaker label,
like XXX (loud):  or just (loud):
allow parentheses when doing harder filtering
2017-04-15 16:38:38 +02:00
wm4 bbfafb5614 Fix use of ISC license
The license text refers a "above copyright notice", so I guess it'd be
good to actually provide such a notice.

Add the license to some files that were missing it (since in theory, our
Copyright file says that such files are LGPL by default).

Remove the questionable remarks about the license in the client API.
2017-04-15 16:20:00 +02:00
wm4 3709ce6718 demux: estimate total packet size, deprecate packet number limits
It's all explained in the DOCS changes. Although this option was always
kind of obscure and pointless. Until it is removed, the only reason for
setting it would be to raise the static default limit, so change its
default to INT_MAX so that it does nothing by default.
2017-04-14 19:19:44 +02:00
wm4 3e8510d515 player: fix a corner case in previous commit
The previous commit set "mpctx->playback_active = false;" before unload
hooks were processed. This was intentional, but could in theory cause
playback_active to be set to true again, and actually it's plain wrong
if playback was exited in the middle it. There needs to be something
else that forces playback_active to be set to false while in this
unloading state.
2017-04-14 19:06:31 +02:00
wm4 b586bc2dbe player: fix core-idle and eof-reached update notifcations
Make mpv_observe_property() work correctly on them even with
--keep-open-pause=no.

This also changes the situations in which the screensaver is
enabled/disabled subtly.
2017-04-14 18:58:48 +02:00
wm4 419624fb06 player: unmess pause state handling
Merge the pause_player() and unpause_player() functions. Make sure the
pause events are emitted properly. We can now set the internal pause
state based on a predicate, instead of e.g. handle_pause_on_low_cache()
making a mess to trigger the internal pause state as wanted.

Preparation for some more changes.
2017-04-14 18:22:45 +02:00
Dan Oscarsson ae0a40259f player: add --keep-open-pause=no option
Instead of pausing if --keep-open is active, stop
at end but continue playing if seeking backwards.
And then stop again when end is reached.

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

Over the PR, the option was renamed, and the manpage additions were
slightly changed/enhanced.
2017-04-14 17:43:34 +02:00
wm4 7b84297699 vo_opengl: minor cosmetics 2017-04-14 17:35:27 +02:00
wm4 dc5dfa5c92 win32: fix mismatched free/talloc_free
Might fix #4315.
2017-04-12 14:12:41 +02:00
wm4 7497b633e9 win32: rewrite getcwd() using GetFullPathNameW
_wgetcwd is apparently not available in all runtimes. Well, whatever.
2017-04-11 13:54:10 +02:00
wm4 4c516a064a osc: use "loop-playlist" instead of "loop" property 2017-04-11 12:44:41 +02:00
wm4 e0d93178b9 win32: add UTF-8 getcwd() wrapper 2017-04-11 12:19:41 +02:00
wm4 e2464b832b command, manpage: some leftover mentions of renamed --loop option 2017-04-11 12:15:38 +02:00
wm4 844008004f command: update sub-fps etc. options on runtime changes
Un-special-case the sub-speed property, and apply subtitle speed updates
in more cases. In particular, this respects runtime changes of the
sub-fps option.

(A minor consequence of this is that the subtitle speed is recomputed
more often even in cases when it's not necessary. Also, the subtitle
update is slightly "delayed" rather than strictly instant. Both of
these likely are absolutely not observable by the user, although the
subtitle speed verbose log message will be printed more often if the
subtitle format is MicroDVD.)
2017-04-10 21:22:26 +02:00
wm4 a1b1972ec6 manpage: group --loop options together 2017-04-10 21:19:47 +02:00
wm4 6dea8fceda options: deprecate --loop
Also "announce" the plans to undeprecate it with changed semantics
later. The deprecation period is needed to warn script authors and
client API users (etc.) of the change.

This is done because everyone seems to expect --loop to loop the current
file, not the playlist. Even in cases when only 1 file is on the
playlist, the --loop-file semantics seem to be preferred.
2017-04-10 21:19:13 +02:00
wm4 759ac6cc93 vo_opengl: add option for caching shaders on disk
Mostly because of ANGLE (sadly).

The implementation became unpleasantly big, but at least it's relatively
self-contained.

I'm not sure to what degree shaders from different drivers are
compatible as in whether a driver would randomly misbehave if it's fed
a binary created by another driver. The useless binayFormat parameter
won't help it, as they can probably easily clash. As usual, OpenGL is
pretty shit here.
2017-04-08 16:43:56 +02:00
wm4 e7940ddbf3 vo_opengl: fix a confused comment 2017-04-08 16:43:56 +02:00
wm4 71caa0b79b vo_opengl: remove two unused symbols 2017-04-08 16:43:56 +02:00
Ricardo Constantino bb3e152fdc
encoding_profiles.conf: update and remove deprecated stuff
- libfaac and libvo_aacenc were removed from FFmpeg
- add libopus profile
- modify vp8's ovcopts and add vp9
- switch enc-f-webm to vp9 + opus

- remove obsolete devices profiles using deprecated filters
2017-04-07 16:31:00 +01:00
Ricardo Constantino aa4b0e319b
wscript: don't make dvdread-common an option
This just checks if dvdread or dvdnav are enabled so it can
compile dvdread code.

Change description to be clearer on what this does differently from
--enable-dvdread.
2017-04-07 16:26:02 +01:00
wm4 eb83ee4a4a vo_opengl: add our own copy of OpenGL headers
gl_headers.h is basically header_fixes.h done consequently. It contains
all OpenGL defines (and some typedefs) we need. We don't include GL
headers provided by the system anymore.

Some care has to be taken by certain windowing APIs including all of
gl.h anyway. Then the definitions could clash. Fortunately, redefining
preprocessor symbols to the same content is allowed and ignored. Also,
redefining typedefs to the same thing is allowed in C11. Apparently the
latter is not allowed in C99, so there is an imperfect attempt to avoid
the typedefs if required API symbols are apparently present already.

The nost risky part about this are the standard typedefs and GLAPIENTRY.
The latter is different only on win32 (and at least consistently so).
The typedefs are mostly based on stdint.h typedefs, which khrplatform.h
clumsily emulates on platforms which don't have it. The biggest
difference is that we define GLsizeiptr directly to ptrdiff_t, instead
of checking for the _WIN64 symbol and defining it to long or long long.

This also typedefs GLsync to __GLsync, just like the khronos headers.
Although symbols prefixed with __ are implementation reserved, khronos
also violates this rule, and having the same definition as khronos will
avoid problems on duplicate definitions.

We can simplify the build scripts too. The ios-gl check seems a bit
wrong now (what we really want to test for is EAGLContext), but I can't
test and thus can't improve it.

cuda_dynamic.h redefined two GL symbols; just include the new headers
directly instead.
2017-04-07 15:09:27 +02:00
wm4 b7b12c36af demux_lavf: disable half-working mp4 edit list support in libavcodec
Instead, enable the "old" code, which uses this for gapless info (audio
padding/trailing) only.
2017-04-07 13:12:10 +02:00
wm4 bcfdcd6226 vd_lavc: fix return value in receive_frame()
Pointed out by uau. Not sure why gcc doesn't warn (it uses ((void*)0)
for NULL).
2017-04-07 12:24:26 +02:00
wm4 c9d3a79187 vo_opengl: add a generic EGL function loader function
This is pretty trivial, but also quite annoying due to details like
mismatching eglGetProcAddress() function signature (most callers just
cast the function pointer), and ARM/Linux hacks. So move them all to one
place.
2017-04-06 14:50:19 +02:00
wm4 4e6867c771 vo_opengl: fix windows build if GLES3 is detected
With the recent GLES3 header detection, and if ANGLE is in the search
path, the ANGLE headers will be used over the desktop GL ones. It
appears the ANGLE headers do not include <windows.h>, which leads to the
dxinterop code to fail building. Oops.

Fix this by including <windows.h> is dxinterop is compiled in.
2017-04-06 13:19:59 +02:00
wm4 258d6b4a35 wscript: avoid compose_checks in one case
Avoid it where we can, because it tends to have unexpected side-effects.
(Probably not in this case, but still a reason to avoid it.)
2017-04-06 08:42:18 +02:00
wm4 ebecf9c2d6 vo_opengl: header_fixes.h: merge IOS GLES block
It appears we expect IOS to provide GLES 3. The IOS block contains all
symbols from the GLES block. Weirdly not all, so it's possible that some
symbols will be redefined, which is annoying, but harmless. I don't have
an iOS setup to test, otherwise it's likely that a modification of the
IOS include statements would take care of this.
2017-04-06 08:40:17 +02:00
wm4 755ce9dac5 build: replace android-gl check with a standard GLES3 check
There's no reason to make it Android specific, as it uses standard
include paths.
2017-04-06 08:35:47 +02:00