Commit Graph

40037 Commits

Author SHA1 Message Date
Diogo Franco (Kovensky) b7a1243c73 Update RELEASE_NOTES 2015-02-03 14:39:20 +09:00
wm4 ef23df3c84 win32: don't resize when window is minimized
At least the opengl-hq VO allocates additional resources when
downscaling a lot, which is just a waste.

Also see #1547 (although I doubt that this is the cause; if it is,
a real fix will be required).
2015-02-03 14:36:37 +09:00
wm4 32e84b7c91 options: slightly improve help output for choice and flag options 2015-02-03 14:36:36 +09:00
wm4 bae322888d build: disable pdf build by default
rst2pdf keeps having sporadic layouting failures, causing build
failures.
2015-02-03 14:36:36 +09:00
wm4 405113bb51 build: fix v4l2 support on NetBSD
It was accidentally broken. Tested by a NetBSD user. May help with other
BSDs.
2015-02-03 14:36:36 +09:00
wm4 20246a0df3 player: print desync message on negative A/V-sync too
At least there is _some_ problem if this happens. It would mean that
audio is playing slower than video. Normally, video is synced to audio,
so if audio stops playback completely, video will not advance at all.
But using things like --autosync, it's well possible that this kind of
desync happens.
2015-02-03 14:36:36 +09:00
wm4 d0c3df3276 player: use correct type for some relative times
We use double for these things everywhere, just this code didn't. It
likely doesn't matter much, and this code is for an optional feature
too.
2015-02-03 14:36:36 +09:00
wm4 e8df9ec4b7 av_common: add comment about using now-deprecated libavcodec field
FFmpeg and Libav have the stupid practice of replacing and deprecating
API symbols on the same day. So with FFmpeg git, this is useless and
will print a compile time warning, while it's required with all stable
releases, and might lead to decoding errors with xvid/avi (apparently).

Add a comment before someone writes a patch and I have to explain it all
over again.
2015-02-03 14:36:36 +09:00
wm4 57e57429ea README: mention that youtube-dl integration requires Lua 2015-02-03 14:36:36 +09:00
Martin Herkt 70eacdee27 manpage: fix rst2pdf build
Uhhh… What???
2015-02-03 14:25:59 +09:00
Diogo Franco (Kovensky) c4e4d9cbba Release v0.7.3 2015-01-27 10:23:08 +09:00
Diogo Franco (Kovensky) fa53c3fc7b Update RELEASE_NOTES 2015-01-27 10:21:22 +09:00
wm4 c61f76829f player: fix framestep over timeline segment boundaries
This was subtly broken by commit a937ba20. Instead of framestepping over
the timeline segment boundary, it would just unpause playback, because
seeking now resets mpctx->step_frames. This was especially apparent when
doing something like "mpv *.jpg --merge-files".

Fix by restoring the step_frames field specifically if the seek is done
for switching segment boundaries. Hopefully the number fields which need
such an exception on seeking won't grow and turn this code into a mess.
2015-01-27 10:20:19 +09:00
wm4 30e77e0fc5 options: list correct default value for --screenshot-template
Make the default value part of the option metadata, instead of doing
this in the screenshot code. Makes more sense with --list-options and
the command.c option metadata properties.
2015-01-27 10:20:19 +09:00
Diogo Franco (Kovensky) 328a0f9c80 manpage: fix typo 2015-01-26 16:10:24 +09:00
wm4 4f2104961e manpage: describe some more config directory artifacts
Conflicts:
	DOCS/man/mpv.rst
2015-01-26 16:10:24 +09:00
Diogo Franco (Kovensky) c2ef2bcb90 Update RELEASE_NOTES 2015-01-26 16:10:24 +09:00
Ben Boeckel 86229e8714 ao_pulse: plug a memory leak 2015-01-26 16:10:24 +09:00
wm4 295fdeb086 lua: do not use math.pow()
It's the first thing that breaks with Lua 5.3. I don't know if there
are other failures because I don't care enough.
2015-01-26 16:10:24 +09:00
wm4 909c4d7711 input: fix dangling pointer
Removes undefined behavior that showed up as crap when running with -v.
2015-01-26 16:10:24 +09:00
wm4 0f83f1e4b3 ytdl: implement user-agent and cookie overrides
For some sites, youtube-dl sends a special user-agent. If we don't send
the same user-agent, the server will reject mpv's connection attempt.
This was observed with trailers.apple.com. Fix it by forcing the
user-agent youtube-dl uses.

Some sites set cookies when doing a website access, and require the
client to provide these cookies when downloading the actual media. This
is needed at least by nicovideo.jp. Fix by adding youtube-dl's cookies
to our request headers.

Both of these require a very recent youtube-dl version (youtube-dl added
the necessary headers a few hours ago). The script still works with
older youtube-dl versions, though.
2015-01-26 16:10:24 +09:00
Vítor Galvão 9c83e8483e youtube-dl_mpv.sh: unquote ${video_url} 2015-01-25 17:00:21 +09:00
wm4 e0e58e18c0 input: handle mixing key press and up/down events better 2015-01-25 17:00:21 +09:00
James Ross-Gowan 6f9eb960c7 ao_wasapi: fix try_format logic in shared mode
The MSDN documentation for IsFormatSupported says a return code of
AUDCLNT_E_UNSUPPORTED_FORMAT means the function "succeeded but the
specified format is not supported in exclusive mode." This seems to
imply that the format is supported in shared mode, and that's what the
old code assumed, however try_format would incorrectly return success
with some drivers.

The remarks section of the documentation contradicts that assumption. It
says that in shared mode, if the audio engine does not support the
caller-specified format or any similar format, ppClosestMatch is set to
NULL and the function returns AUDCLNT_E_UNSUPPORTED_FORMAT. This is the
same as in exclusive mode, so treat AUDCLNT_E_UNSUPPORTED_FORMAT the
same regardless of opt_exclusive. In shared mode, the format selection
code will fall back to the mix format, which should always be supported.
2015-01-25 17:00:21 +09:00
xylosper a4b21b5a13 player: some fixes for property notification
`core-idle` depends on seeking state `mpctx->restart_complete`,
so make `core-idle` notified whenever `seeking` is notified, too.

`paused-for-cache` can be changed on MPV_EVENT_CACHE_UPDATE obviously.

Finally, `MPV_EVENT_PLAYBACK_RESTART` should be notified after
`mpctx->restart_complete` changed.

Conflicts:
	player/command.c
2015-01-25 17:00:21 +09:00
Vítor Galvão 799458a5b1 youtube-dl_mpv.sh: use curly braces and double quotes consistently 2015-01-25 17:00:21 +09:00
wm4 c774f2c3bb vo_opengl: improve terminal messages with lscale suboption errors
Make it more apparent what the hell the user did wrong.
2015-01-25 17:00:21 +09:00
wm4 9e6091a5b1 vo_opengl: guarantee correct reinitialization on setting options
At least the scale_sep_fbo could have been uninitialized or initialized
incorrectly when switching between scalers (e.g. from bilinear to
lanczos). Calling check_resize() should take care of this.
2015-01-25 17:00:21 +09:00
wm4 74c2146092 vo_vdpau: don't render to an output surface if it could be busy
There was a case when we could have rendered to an output surface while
it's still used for display. Not sure why the API doesn't do this
automatically.
2015-01-25 17:00:21 +09:00
wm4 7af2cb08e2 vo_direct3d: disable shaders if unavailable
Apparently, extremely crappy graphics drivers don't allow you to use
shaders. Simply disable use of shaders if this happens, and use the
"old" method instead.

One unexpectedly tricky thing is that you need a d3d_device to create
a shader, which in turn requires a window, so the initialization order
changes.

Conflicts:
	video/out/vo_direct3d.c
2015-01-25 17:00:21 +09:00
wm4 155ecb2c14 vo: never autoselect vo_null
Same deal as with commit d44b4ccb.

Conflicts:
	video/out/vo.c
2015-01-25 17:00:21 +09:00
wm4 2a2dc4d73c ao_alsa: reinitialize if device got broken
Apparently, physically disconnecting the audio device (consider USB
audio) breaks the ALSA device handle forever. It will signal ENODEV.
Fortunately, it's easy for us to handle this, and we can just use
existing mechanisms that will make the playback core close and reopen
the AO. Whether the immediate reopening will actually succeeds really is
ALSA's problem, though.
2015-01-25 17:00:21 +09:00
wm4 d855be5ec1 vf_scale: replace ancient fallback image format selection
If video output and VO don't support the same format, a conversion
filter needs to be insert. Since a VO can support multiple formats, and
the filter chain also can deal with multiple formats, you basically have
to pick from a huge matrix of possible conversions.

The old MPlayer code had a quite naive algorithm: it first checked
whether any conversion from the list of preferred conversions matched,
and if not, it was falling back on checking a hardcoded list of output
formats (more or less sorted by quality). This had some unintended side-
effects, like not using obvious "replacement" formats, selecting the
wrong colorspace, selecting a bit depth that is too high or too low, and
more.

Use avcodec_find_best_pix_fmt_of_list() provided by FFmpeg instead. This
function was made for this purpose, and should select the "best" format.

Libav provides a similar function, but with a different name - there is
a function with the same name in FFmpeg, but it has different semantics
(I'm not sure if Libav or FFmpeg fucked up here).

This also removes handling of VFCAP_CSP_SUPPORTED vs.
VFCAP_CSP_SUPPORTED_BY_HW, which has no meaning anymore, except possibly
for filter chains with multiple scale filters.

Fixes #1494.
2015-01-25 17:00:21 +09:00
wm4 141728832b stream: reject overly long URLs 2015-01-25 17:00:20 +09:00
wm4 a8b364cad3 stream_lavf: escape disallowed characters in http URLs
In my opinion, libavformat should be doing this. But a patch handling a
very safe case rejected, so I suppose we have to do it manually. (This
patch was only escaping spaces, which can never work because they break
the basic syntax of the HTTP protocol.)

This commit attempts to do 2 things:
- Try to guess whether libavformat will use the URL for http. This is
  not always trivial, because some protocols will recursively pass part
  of the user URL to http in some way.
- Try to fix invalid URLs. We fix only the simplest case: only
  characters that are never valid are escaped. This excludes invalid
  escape codes, which happen with freestanding '%' characters.

Fixes #1495.
2015-01-25 17:00:20 +09:00
wm4 c282cd679c vo_opengl: fix typo 2015-01-25 17:00:20 +09:00
wm4 1f815558b8 build: reduce worst case with mismatching FFmpeg pkg-config files
Handles mismatching libavfilter/libavdevice and libavcodec slightly
better.

libavfilter and libavdevice are optional, and thus are checked
separately and at a later point of the build. But if a user system has
at least 2 FFmpeg installations, and one of them lacks libavfilter or
libavdevice, the build script will pick up the libavfilter/libavdevice
package of the "other" FFmpeg installation. The moment waf picks these
up, all include paths will start pointing at the "wrong" FFmpeg, and the
FFmpeg API checks done earlier might be wrong too, leading to obscure
and hard to explain compilation failures.

Just moving the libavfilter/libavdevice checks before the FFmpeg API
checks somewhat deals with this issue. Certainly not a proper solution,
but since the change is harmless, and there is no proper solution, and
the change doesn't actually add anything new, why not.

Conflicts:
	wscript
2015-01-25 17:00:20 +09:00
wm4 a0de98871b README: extend dependecy list, link Windows compilation docs
Also, fix vo.rst, don't want to waste a separate commit on this.

Conflicts:
	DOCS/man/vo.rst
2015-01-25 17:00:20 +09:00
wm4 3711327430 audio: don't force any parameters if spdif is used
The existing code only ignored --audio-channels, but not --audio-rate or
--audio-format if spdif passthrough is used. Setting these makes no
sense.
2015-01-25 17:00:20 +09:00
wm4 7d523cd47a ao_coreaudio: reset possibly random errno value
In general, you need to check errno when using strtol(), but as far as I
know, strtol() won't reset errno on success. This has to be done
manually. The code could have failed sporadically if strtol() succeeded,
and errno was already set to one of the checked values.

(This strtol() still isn't fully error checked, but I don't know if it's
intentional, e.g. for parsing a numeric prefix only.)
2015-01-25 17:00:20 +09:00
wm4 224abe9e23 vo: restore framedrop
Fix inverted condition in commit 234d6329.
2015-01-25 17:00:20 +09:00
wm4 c6d54cccb5 player: mention mpv encoding support for transcoding in desync. warning 2015-01-25 17:00:20 +09:00
wm4 081368dabf video: fix waiting for last frame/format reconfig
We still need to send the VO a duration in these cases. Disabling
framedrop has logically absolutely nothing to do with these cases; it
was overlooked in commit 918b06c4.

So we always send the frame duration (or a guess for it), and check
whether framedropping is actually enabled in the VO code. (It would
be cleaner to send framedrop as a flag, but I don't care about that
right now.)
2015-01-25 17:00:20 +09:00
wm4 3b5b2144c3 demux: return EOF when reading from unselected stream
Normally the player doesn't read from unselected streams, so this should
be a no-op. But unfortunately, some broken files can severely confuse
the player, and assign the same demuxer stream to multiple front-end
tracks. Then selecting one of the tracks would deselect the other track,
with the end result that the demuxer stream for the selected track is
deselected. This could happen with mkv files that use the same track
number (which is of course broken). timeline_set_part() sets the tracks
using demuxer_stream_by_demuxer_id(), using the broken non-unique IDs.

The observable effect was that the player never quit, because
demux_read_packet_async() told the caller to wait some longer for new
packets. Fix by returning EOF instead.

Fixes #1481.
2015-01-25 17:00:20 +09:00
Stefano Pigozzi a80166f22a cocoa: don't set application icon in libmpv 2015-01-25 17:00:20 +09:00
wm4 126b7c4739 player: respect --untimed on last frame
The last video frame is another case that has a separate code path,
although it's pretty similar to the one in commit 73e5aa87. Fix this
in a different way, which also takes care of the last frame case,
although without context the code becomes slightly more tricky.

As further cleanup, move the decision about framedropping itself to
the same place, so the check in vo.c becomes much simpler. The check
for the vo->driver->encode flag, which is remvoed completely, was
redundant too.

Fixes #1480.
2015-01-25 17:00:20 +09:00
wm4 f8b842cdf3 manpage: fix osd-ass-cc examples
The "\\" escape was rendered as "\" on the website. I'm hoping quoting
this in ``...`` will render it correctly.

Also add an example for show_text, which awkwardly does not require
escaping the "\".
2015-01-25 17:00:19 +09:00
wm4 ad9ea546d3 player: respect --untimed on video format changes
If the video format changes (e.g. different frame size), a special code
path is entered to wait until the currently displayed frame is done.
Otherwise, the frame before the change would be destroyed by the
vo_reconfig() call.

This code path didn't respect --untimed; correct this.

Fixes #1475.
2015-01-25 17:00:19 +09:00
ChrisK2 c63d929261 OSC: Reset all styles for idle message 2015-01-25 17:00:19 +09:00
wm4 595c4cf872 osc: fix disabling OSC
Upon the "DEL" key binding or the "disable-osc" message, the OSC should
stay permanently invisible. This was recently broken (not sure by what),
because other code accidentally reenables it anyway, which resulted in
the OSC appearing again when moving the mouse.
2015-01-25 17:00:19 +09:00