Commit Graph

41053 Commits

Author SHA1 Message Date
Adrian Sadłocha 18f30787f2 TOOLS/umpv: fix typo in docstring 2015-04-17 13:37:47 +02:00
wm4 00c18b32bf vf_crop, vf_expand: remove ancient and useless messages
These are redundant.
2015-04-16 22:46:52 +02:00
wm4 e207c24b32 vf_mirror: replace internal implementation with libavfilter
Currently, libavfilter's equivalent vf_hflip is probably not faster or
anything, but there's still no reason to keep the internal code.
2015-04-16 22:43:15 +02:00
wm4 baaa27d6db vo: fix non-sense in init code
I assume this was intended to generate an initial change event in order
to make the user read the initial values.
2015-04-16 22:31:09 +02:00
wm4 e0bb60a708 vo: cosmetics: reindent VO list
And also undoxygenify a comment. (There used to be some inconsistent
doxygen comments in MPlayer time; they are being removed on sight.)
2015-04-16 22:29:25 +02:00
wm4 f4292ebf52 vf_screenshot: remove this filter
It's entirely useless, especially now that vo.c handles screenshots in a
generic way, and requires no special VO support. There are some
potential weird use-cases, but actually I've never seen it being used.
2015-04-16 22:16:04 +02:00
wm4 547976633f command: let screenshot_to_file command overwrite files
The old behavior does not make too much sense after all. If you don't
want to file to be overwritten, the user can check this manually.

This is a change in behavior - let's hope nobody actually relied on it.
2015-04-16 22:06:47 +02:00
wm4 533b0c70e1 video: do not show decoder framedrops if they're not requested
libavcodec makes it impossible to distinguish dropped frames (requested
with AVCodecContext.skip_frame), and cases when the decoder simply does
not return a frame by default (such as with VP9, which has invisible
reference frames).

This confuses users when decoding VP9 video. It's basically a cosmetic
issue, so just paint it over by ignoring them if framedropping is
disabled.
2015-04-16 21:55:10 +02:00
Marcin Kurczewski 9cabef3974 vo_drm: add missing documentation 2015-04-16 21:43:01 +02:00
Marcin Kurczewski 7ee18376a9 vo_drm: add KMS/DRM renderer support
Signed-off-by: wm4 <wm4@nowhere>
2015-04-16 21:07:25 +02:00
wm4 d55c41501f subprocess: move implementation for deatched subprocesses 2015-04-15 22:43:02 +02:00
wm4 95c1487c93 subprocess-posix: always connect stdin to /dev/null
It appears youtube-dl sometimes asks for a password on stdin. This won't
work, because mpv already uses the terminal.

(I wonder if this could be simpler, like simply closing FD 0, but let's
not. The FD would be reused by something random.)
2015-04-15 22:42:20 +02:00
wm4 dd12040ebe x11: actually disable screensaver
We already use 2 screensaver APIs when attempting to disable the
screensaver: XResetScreenSaver() (from xlib) and XScreenSaverSuspend
(from the X11 Screen Saver extension). None of these actually work.

On modern desktop Linux, we are expected to make dbus calls using some
freedesktop-defined protocol (and possibly we'd have to fallback to a
Gnome specific one). At least xscreensaver doesn't respect the "old"
APIs either.

Solve this by running the xdg-screensaver script. It's a terrible, ugly
piece of shit (just read the script if you disagree), but at least it
appears to work everywhere. It's also simpler than involving various
dbus client libraries.

I hope this can replace the --heartbeat-cmd option, and maybe we could
remove our own DPMS/XSS code too.
2015-04-15 22:40:19 +02:00
wm4 e6d7e55012 options: --hr-seek=always is the same as --hr-seek=yes
It seems this choice was never documented. "always" is actually older
than "yes", so just declare it a compatibility value for "yes". (Also
move it before "always" in the C code to make this clear.)
2015-04-15 14:27:40 +02:00
Kevin Mitchell 3f8b8b8c0c manpage: clarify --af=format 2015-04-15 04:27:57 -07:00
Kevin Mitchell e1e46cc81a manpage: remove extra newline at end of af.rst 2015-04-15 04:27:57 -07:00
wm4 2896afaa39 ao_alsa: fallback to stereo channel layout if everything else fails
mp_chmap_from_channels_alsa() doesn't always succeed - there are a bunch
of channel counts for which no defined ALSA layout exists. Fallback to
stereo in this case. (Normally, this code path shouldn't happen at all.)
2015-04-14 21:19:01 +02:00
wm4 7d40a33ed9 mapage: update --hwdec=vaapi description again
Supposedly this is not an issue anymore after we've changed the code to
use texture-from-pixmap.
2015-04-14 21:18:36 +02:00
wm4 d8a0356b3b player: silence spam in verbose mode when playing audio with cover art
When playing cover art, it conceptually reaches EOF as soon as the image
was put on the VO, causing the EOF message to be repeated every time new
audio was decoded. Just silence the message.
2015-04-14 14:36:15 +02:00
wm4 0ded54dd89 input.conf: unmap menu key
This was mapped to a broken command, so it did nothing but printing an
error message. The intended binding (cycling OSD level) doesn't seem to
useful either, so just drop it.
2015-04-14 14:33:37 +02:00
wm4 d704d61c61 vo_opengl: change dwmflush option values
Use a choice instead of an integer. This is incompatible, but I'm not
adding any compatibility since this option was added recently.
2015-04-14 14:29:05 +02:00
wm4 9e0cd3b3e7 options: don't let --vf-clr etc. take an argument
It was ignored before. Passing an argument makes no sense, and might be
mistaken for some form of --vf-del, so complain about it.

This also affects --af-clr and the vf/af commands.
2015-04-13 20:30:17 +02:00
wm4 3823d5eb7e vo_rpi: explicitly reference MMAL VC driver
This is optional, but ensures that linking with -Wl,--as-needed does
not drop the MMAL VC driver. The driver normally "registers" itself
in the library constructor, but since no symbols are explicitly
referenced, the linker could remove it with as-needed enabled.
2015-04-13 18:35:18 +02:00
Martin Herkt 77c96f111c
man/options: make --audio-display easier to find
I tried to find that option by searching for terms like “cover art”
and got nothing. I imagine most users would look for similar terms.
Hope this helps.
2015-04-13 18:30:11 +02:00
robin007bond 3b2cc79d2f DOCS/contribute.md: Add guideline for pull requests
This commit is to prevent changes being merged into upstream, without
being known if it is tested or not.

Signed-off-by: wm4 <wm4@nowhere>
2015-04-13 15:11:09 +02:00
robin007bond 5b1c3e4b50 OSX/mpv.app/mpv.conf: Use pseudo-gui
The player is now forced to use the pseudo-gui profile.

Fixes #1808 and #1754.

Signed-off-by: wm4 <wm4@nowhere>
2015-04-13 14:26:55 +02:00
Marcin Kurczewski f43017bfe9 Update license headers
Signed-off-by: wm4 <wm4@nowhere>
2015-04-13 12:10:01 +02:00
wm4 ab2a27ae01 af_lavrresample: minor simplification
The in/out pointers usually have not much meaning outside of
AF_CONTROL_REINIT. Also remove the redundant casts.
2015-04-12 18:07:05 +02:00
wm4 f8a98fc133 af_lavrresample: allow resetting output sample format
It must be allowed to set format==0.
2015-04-12 18:07:05 +02:00
wm4 e466a735a3 audio/filter: fully renegotiate audio formats on every reconfig
It could happen that a lavrresample filter would keep its old output
format when the decoder changed its output format. This simply happened
because the output format was never reset.

Normally, this was not an issue, because lavrresample filters only
inserted for format conversion were removed on format changes. But if
--no-audio-pitch-correction is set and playback speed is changed, then
there is a "permanent" lavrresample filter in the filter chain, which
shows this behavior.

Fix by explicitly resetting output formats for all filters which support
it.

Note: this can crash with libswresample in some cases. I'm not sure if
this is mpv's fault or libswresample's, but since it works with
libavresample, I'm going to assume it's not our's.
2015-04-12 18:06:23 +02:00
robin a8e8176ab1 DOCS/waf: Edit --enable-feature sentences
The gender specific pronoun is changed, since we shouldn't assume the
gender of the user.

The sentence itself is also changed to be more correct in general.
2015-04-12 16:58:06 +02:00
wm4 544c56bf22 vo_opengl: slightly simplify check_gl_features()
Not sure why this was so roundabout; probably to keep spam down if the
user's OpenGL drivers are crap (but then just don't enable extended
features), or because the "Disabling..." text was so repetitious.

But there doesn't seem to be a good reason after all. Also, this could
already overflow the fixed size disabled[] array. Just print the
messages directly.
2015-04-11 19:24:54 +02:00
wm4 2b679020f7 vo_opengl: unify blend-subtitles-res and blend-subtitles 2015-04-11 19:22:10 +02:00
wm4 3bfdc20aa1 vo_opengl: fix blend-subtitles-res=video & anamorphic video
Since scaling the video changes the aspect ratio, we have to compensate
for this when rendering subtitles.
2015-04-11 15:53:00 +02:00
wm4 ea11b09bc3 manpage: mention how pseudo-gui mode is enabled on win32 2015-04-11 13:59:34 +02:00
James Ross-Gowan 96d0a3f56c main-fn-win: fix handle validity check for XP
Apparently the standard handles can be set to bogus values on XP. Use
GetFileType to check whether they refer to an actual file/pipe/etc. The
logic used by is_valid_handle() is now pretty similar to what the CRT
uses to check for valid stdio handles.
2015-04-11 14:35:50 +10:00
James Ross-Gowan 1e3aad5f87 win32: use pseudo-gui profile when started without stdio
If mpv is started from Explorer or the Start Menu, it will have no
console and no standard IO handles. In this case, it's fairly safe to
enable the pseudo-gui profile.
2015-04-11 14:35:09 +10:00
James Ross-Gowan 527911d2a2 win32: only attach to the console from mpv.com
Previously, mpv.exe used the --terminal option to decide whether to
attach to the parent process's console, which made it impossible to tell
whether mpv would attach to the console before the config files were
parsed. Instead, make mpv always attach to the console when launched
from the console wrapper (mpv.com) and never attach otherwise. This will
be useful for the next commit, which will use the presence of the
console to decide whether to use the pseudo-gui profile.

This change should also be an improvement in behavior. The old code
would attach to the parent process's console, regardless of whether it
was mpv.com or some other program like cmd.exe. This could be confusing,
since mpv.exe is marked as a Windows GUI program and shouldn't write
text to its parent process's console when launched directly. (See #768.)

Visual Studio does something similar with its devenv.com wrapper.
devenv.exe only attaches to the console when launched from devenv.com.
2015-04-11 14:34:33 +10:00
James Ross-Gowan ac7ecbe30c win32: use a platform-specific unicode entry-point
Add a platform-specific entry-point for Windows. This will allow some
platform-specific initialization to be added without the need for ugly
ifdeffery in main.c.

As an immediate advantage, mpv can now use a unicode entry-point and
convert the command line arguments to UTF-8 before passing them to
mpv_main, so osdep_preinit can be simplified a little bit.
2015-04-11 14:27:25 +10:00
Niklas Haas 6f46bafbd0
vo_opengl: add blend-subtitles-res
This can be used to draw the subtitles at the video's native res, which
can make them look more natural and increases performance.
2015-04-10 22:22:55 +02:00
wm4 abf100f81d manpage: document pseudo-gui stuff 2015-04-10 21:24:12 +02:00
wm4 37a71e57d4 mp_image: remove redundant flags field
Because gcc (and clang) is a goddamn PITA and unnecessarily warns if
the universal initializer for structs is used (like mp_image x = {})
and the first member of the struct is also a struct, move the w/h
fields to the top.
2015-04-10 21:06:25 +02:00
wm4 41151122e7 mp_image: remove redundant chroma_x/y_shift fields 2015-04-10 21:02:16 +02:00
wm4 b3495d9ccf mp_image: remove redundant plane_w/h fields
Seems relatively painful in this case, but they are morally wrong.
2015-04-10 20:58:26 +02:00
wm4 cf55fa6471 player: use config parser for setting up pseudo-gui profile 2015-04-10 20:40:50 +02:00
wm4 1e692cb043 player: change pseudo-gui settings
Remove --keep-open. Switch to --idle=once. This effectively makes the
player quit after end of playback, but still shows the idle screen if it
was started with no files.
2015-04-10 20:31:21 +02:00
wm4 6efd095dfd vo_opengl: use correct texture coordinates for nv12 2015-04-10 19:10:07 +02:00
wm4 77869e5914 ao_coreaudio: fix inverted condition
And also use the correct type for the printf call below.
2015-04-10 13:51:13 +02:00
wm4 46eb04f3c2 player: do not accidentally init terminal
Starting the command line player with --no-terminal, the terminal was
sitll initialized. This happened because update_logging() used the
option value before the options were parsed. Fix by moving down the
initialization to before the point where it's actually needed.
2015-04-10 13:07:24 +02:00
wm4 be6cca7849 README: remove dead link 2015-04-10 12:50:02 +02:00