Commit Graph

41121 Commits

Author SHA1 Message Date
wm4 9b5a7241e8 input: remove Linux joystick support
Why did this exist in the first place? Other than being completely
useless, this even caused some regressions in the past. For example,
there was the case of a laptop exposing its accelerometer as joystick
device, which led to extremely fun things due to the default mappings of
axis movement being mapped to seeking.

I suppose those who really want to use their joystick to control a media
player (???) can configure it as mouse device or so.
2015-03-24 16:04:44 +01:00
wm4 1e659a9f0f input: remove classic LIRC support
It's much easier to configure remotes as X11 input devices.
2015-03-24 16:04:44 +01:00
wm4 d5318e5e09 audio: remove internal libmpg123 wrapper
We've been prefering the libavcodec mp3 decoder for half a year now.
There is likely no benefit at all for using the libmpg123 one. It's just
a maintenance burden, and tricks users into thinking it's a required
dependency.
2015-03-24 16:04:44 +01:00
wm4 170a2e0568 demux_lavf: print seek failures in verbose mode
Don't bother with making these visible by default, because often they
are bogus and/or useless.
2015-03-24 15:39:51 +01:00
wm4 8c8d6e6878 audio: increase maximum amount of audio skipped for seeking
Precise seeking requires skipping audio, since the demuxer usually
doesn't seek precisely enough. There is a sanity check that prevents
skipping more than 300 seconds of audio. This still fails with very
large mp3s. For example, with a 1GB sized mp3 with Xing headers, entries
will be 4 MB apart on average, and occasionally much more.

Just bump the limit. I'm not even sure why it was added in the first
place; I suppose it's most important for files with real PTS resets.
2015-03-24 15:38:51 +01:00
James Ross-Gowan 603a0f733f subprocess-win: clarify argument escaping logic
This bit always seemed confusing to me.
2015-03-24 15:53:36 +11:00
James Ross-Gowan 54cc610fde subprocess-win: handle empty arguments correctly 2015-03-24 15:40:01 +11:00
Jari Vetoniemi 3f4e154ec6 vo_wayland: fix null dereference
If compositor sends configure event before back_buffer is allocated, it
will cause null dereference.
2015-03-23 21:53:32 +01:00
Jari Vetoniemi 3a6ade7a84 vo_opengl: do not block on wayland
When not receiving frame callbacks, we should not draw anything to avoid
blocking the OpenGL renderer. We do this by extending gl context api, by
introducing new optional function 'is_active', that indicates whether
OpenGL renderers should draw or not.

This fixes issue #249.
2015-03-23 21:53:32 +01:00
Jari Vetoniemi c10fb4ce9f vo_wayland: define opaque region
This allows compositor to optimize rendering, as it will know mpv is not
transparent.
2015-03-23 21:53:32 +01:00
Jari Vetoniemi 3714430cdf vo_wayland: share frame callbacks.
Define frame callback logic in wayland_common.c
As this should be used by opengl renderer as well.

Preferably drawing should be skipped entierly when no frame callbacks
are received. However, for now only swap buffers is skipped.
2015-03-23 21:53:32 +01:00
Patrick Hipp dd08aa7364 TOOLS: add a lua scripts for extracting and setting starttime with ytdl
Signed-off-by: wm4 <wm4@nowhere>
2015-03-23 20:46:22 +01:00
Patrick Hipp c48de9e399 TOOLS: add a lua script for a -stay on top only during playback- mode
Signed-off-by: wm4 <wm4@nowhere>
2015-03-23 20:45:12 +01:00
wm4 53f24ac5ad audio: prefer libdcadec by default if present
If you enable this library in FFmpeg, you probably really want it to be
used.
2015-03-23 18:46:26 +01:00
wm4 e52f7d3da8 mp_image: reject 0-sized images
Like FFmpeg/Libav do. It seems not all code can actually deal with this
situation, so it's better to shift the special-cases to code which needs
it (possibly OSD code; screenshots of 0x0 windows would just fail).
2015-03-23 18:38:19 +01:00
Niklas Haas cfb5e0cea6 vo_opengl: fix XYZ input gamma
This seems to have been a mistranslation from the original code, which
multiplied the gamma by 2.6 (*not* the color itself).
2015-03-23 18:36:48 +01:00
wm4 f92c7fa807 demux_mkv_timeline: don't continue if reopening file failed
Could theoretically dereference "d" later in the loop. It's on an error
codepath, so just give up.
2015-03-23 18:24:28 +01:00
wm4 68b71346ec m_option: remove dead initialization 2015-03-23 18:17:38 +01:00
wm4 a09e5dd891 vo_vdpau: remove some minor code duplication
The way-too-big API call for clearing the screen can be easily shared
between two completely different codepaths.
2015-03-23 18:15:40 +01:00
wm4 7363b0439f vo_vdpau: check vdpau API return value 2015-03-23 18:12:05 +01:00
wm4 180e35a175 vdpau: remove dead assignment
I guess we don't really care whether this particular function succeeds.
If it fails, it must be completely broken anyway and it would not matter
much to us.
2015-03-23 18:09:40 +01:00
wm4 b5e67ca178 client API: remove dead assignment
Probably a leftover from an earlier refactoring. Now data is always in
the format MPV_FORMAT_NODE.
2015-03-23 18:07:33 +01:00
wm4 9d84b2c07d vo_opengl: remove dead assignment 2015-03-23 18:04:56 +01:00
wm4 16a5c6c535 ta: memcpy(ptr, NULL, 0) is undefined 2015-03-23 18:03:45 +01:00
wm4 ab37a77b36 m_property: memcpy(ptr, NULL, 0) is undefined 2015-03-23 18:02:28 +01:00
wm4 a5c66601ff video: use less technical language for PTS warning
"Non-monotonic" isn't even 100% correct; it's missing "strictly" (for
briefness I guess), and also the message is printed if the PTS jumps
forward. So just print something that is likely a bit easier to
understand.
2015-03-23 17:46:42 +01:00
wm4 331b21f267 encode: make --audio-channels=auto work
Basically requested. Not that anyone cares.
2015-03-23 17:41:50 +01:00
wm4 2a2391d3d8 manpage: ipc: make requirements for newlines more explicit
Clarifying because someone asked.
2015-03-23 17:41:19 +01:00
wm4 6c2f25a7b0 video: fix update of vo-configured property
It obviously needs to be updated after the VO was destroyed.
2015-03-23 16:34:14 +01:00
wm4 167b75c50c vo_opengl_cb: don't render OSD while VO is not created
Unlike other VOs, this rendered OSD even while no VO was created
(because the renderer lives as long as the API user wants). Change this,
and refactor the code so that the OSD object is accessible only while
the VO is created.

(There is a short time where the OSD can still be accessed even after VO
destruction - this is not a race condition, though it's inelegant and
unfortunately unavoidable.)
2015-03-23 16:32:59 +01:00
wm4 67bdad9a43 vo_opengl: move OSD rendering to separate function
Also reindent the few lines that call into the actual renderer to remove
the "draw_osd" goto.
2015-03-23 16:28:33 +01:00
Sai Ke WANG 3f3d71b0a8 command: use mp_set_playlist_entry
Signed-off-by: wm4 <wm4@nowhere>
2015-03-22 14:28:52 +01:00
wm4 612b8a8ab3 vo_opengl: fix video equalizer gamma controls
It was ignored.
2015-03-22 13:28:47 +01:00
wm4 7205e75079 af_bs2b: fix option default value
--af=bs2b:help abort()ed because the default value of the "profile"
option is not represented by any choice. Fix it by adding an "unset"
choice. (It's a bit odd because there's already a "default" choice,
which is not default, but I don't care enough about this filter.)

Fixes #1712.
2015-03-22 13:28:20 +01:00
wm4 6f5db977c0 vo_opengl: fix background color option
gl_video_set_options() didn't update it, so the default value set on
initialization was used. Fix by always setting the clear color before
the clear command; it's slightly easier to follow too.
2015-03-21 17:32:59 +01:00
wm4 d790dbc3b5 vo_opengl: fix bicubic_fast scaler 2015-03-21 17:29:34 +01:00
wm4 72e67064a3 vd_lavc: less confusing message when hardware decoding won't work
Codecs for hardware acceleration are not blacklisted, but whitelisted.
Also, if this emssage is printed, the codec might not have any hardware
acceleration support in the first place.
2015-03-20 22:14:14 +01:00
wm4 23a3fa8e90 demux_lavf: assume h264/hevc raw streams have no timestamps
There are obscure methods to add timestamps to such streams, but assume
they're unused.
2015-03-20 22:10:00 +01:00
wm4 fe0c37b007 player: better handling of video with no timestamps
Trying to handle such video is almost worthless, but it was requested by
at least 2 users.

If there are no timestamps, enable byte seeking by setting
ts_resets_possible. Use the video FPS (wherever it comes from) and the
audio samplerate for timing. The latter was already done by making the
first packet emit DTS=0; remove this again and do it "properly" in a
higher level.
2015-03-20 22:08:12 +01:00
wm4 29083ae31b vo_xv: remove pointless cast 2015-03-20 00:46:56 +01:00
wm4 25c8bf8754 vf_expand: fix memory leak on memory allocation failure
Isn't it ironic.
2015-03-20 00:38:29 +01:00
wm4 055720fbce player: fix seekability test
Commit 39ed9b7d9 got this wrong, because these shitty flags are so
goddamn confusing.
2015-03-20 00:36:42 +01:00
wm4 6b53897d75 mp_image: do not assume trailing stride padding exists
Normally, the size of an mage plane is assumed to be stride*height. But
in theory, if stride is larger than width*bpp, the last line might not
be padded, simply because it's not necessary. FFmpeg's or mpv's image
allocators always guarantee that this padding exists (it wastes some
insignificant memory for avoiding such subtle issues), but some other
libraries might not.

I suspect one such case might be Xv via vo_xv (see #1698), although my X
server appears to provide full padding. In any case, it can't harm.
2015-03-20 00:34:15 +01:00
wm4 5f2a8474ae video: uninline memcpy_pic functions
There's literally no reason why these functions have to be inline (they
might be performance critical, but then the function call overhead isn't
going to matter at all).

Uninline them and move them to mp_image.c. Drop the header file and fix
all uses of it.
2015-03-20 00:21:23 +01:00
wm4 145922a070 video: replace pointless macro
Some old absurdity.
2015-03-20 00:12:03 +01:00
wm4 713a8c1a89 mp_image: remove unneeded things
(But I'd really prefer removing our own refcounting mechanism fully.)
2015-03-20 00:09:18 +01:00
wm4 9c21082835 manpage: remove "experimental" notice from dxva2 code
It's relatively stable now.

Also fix a typo in an unrelated place (better not waste commits on
typos).
2015-03-19 23:48:32 +01:00
wm4 aaa42f82dc stream_lavf: workaround broken rtmp "timeout" option
The libavformat rtmp protocol's "timeout" option has two problems:
1) Unlike all other protocols, it's in seconds and not microseconds
2) It enables "listen" mode, which breaks playback

Make the --network-timeout do nothing in the rtmp case.

Fixes #1704.
2015-03-19 16:41:48 +01:00
wm4 47c131bb0c player: warn against non-monotonic video PTS only once
For some reason there were two points in the code where it warned
against non-monotonic video PTS. The one in video.c triggered on PTS
going backwards or making large jumps forwards, while dec_video.c
triggered on PTS going backwards or PTS not changing. Merge them into a
single check, which warns against all cases.
2015-03-18 22:26:49 +01:00
wm4 39ed9b7d96 player: refuse to write resume file with unseekable files
In fact this should happen on resume, not on saving, but it's simpler
this way.

Fixes #1701.
2015-03-18 22:15:02 +01:00