Commit Graph

38033 Commits

Author SHA1 Message Date
wm4 bd2bcc4399 player: minor reshuffling of video code 2014-05-07 21:48:36 +02:00
wm4 725e956b11 player: limit max. fallback frame duration
It's calculated from the demuxer reported FPS, which is not very
reliable. Limit the damage a completely insane and broken value could
cause.
2014-05-07 21:41:14 +02:00
wm4 eada87853e player: handle video reconfig slightly different again
Now we avoid calling update_video() twice on reconfig (once to check
whether there are still new frames, and again to actually do the
reconfig). Instead, we check whether there's still something going on
before calling update_video() at all, and depending on that
update_video() will be allowed to reconfig or not.

This will simplify some things later.
2014-05-07 21:39:17 +02:00
wm4 6a8a0e3aa9 player: reset last_frame_duration on init 2014-05-07 21:38:46 +02:00
wm4 ca343d82a6 video/out: remove unused config() parameters
This was cleaned up yesterday.
2014-05-07 21:34:05 +02:00
Martin Herkt b9474ab875 waf: make shlib tasks less noisy 2014-05-07 21:16:07 +02:00
wm4 5704958573 vo: remove old stuff 2014-05-06 23:20:33 +02:00
wm4 f0ee4e8766 vo_wayland: always assume resize on reconfigure
It doesn't look like vo_wayland_config() necessarily sets this flag, so
it seems safer to trigger an explicit resize. This accounts for the case
when playing a new file with different size than the one before.
2014-05-06 23:18:57 +02:00
wm4 b51664c04a wayland: don't use VOCTRL_UPDATE_SCREENINFO
Not very tested. Appears to work.
2014-05-06 23:16:18 +02:00
wm4 41b1ed7b2e win32: don't use VOCTRL_UPDATE_SCREENINFO
Not very tested. At least it compiles.
2014-05-06 23:04:33 +02:00
wm4 836893fed9 cocoa: don't use VOCTRL_UPDATE_SCREENINFO 2014-05-06 22:00:17 +02:00
wm4 a9dece9f20 manpage: fix typo in previous commit 2014-05-06 20:43:20 +02:00
wm4 3c45156448 manpage: adjustments to file-size property 2014-05-06 20:39:00 +02:00
Andrey Morozov dc8684805b command: rename stream-length to file-size, format file size
Signed-off-by: wm4 <wm4@nowhere>
2014-05-06 20:36:42 +02:00
wm4 f4bbd4c1df vo_sdl: don't use VOCTRL_UPDATE_SCREENINFO 2014-05-06 20:35:19 +02:00
wm4 5eaefaa98a x11: don't use VOCTRL_UPDATE_SCREENINFO
See previous commit.
2014-05-06 20:24:35 +02:00
wm4 feb1f8f18f video/out: separate out code to compute window size
Currently, vo_reconfig() calculates the requested window size and sets
the vo->dwidth/dheight fields _if_ VOCTRL_UPDATE_SCREENINFO is
implemented by the VO or the windowing backend. The window size can be
different from the display size if e.g. the --geometry option is used.
It will also set the vo->dx/dy fields and read vo->xinerama_x/y.

It turned out that this is very backwards and actually requires the
windowing backends to workaround these things. There's also
MPOpts.screenwidth/screenheight, which used to map to actual options,
but is now used only to communicate the screen size to the vo.c code
calculating the window size and position.

Change this by making the window geometry calculations available as
separate functions. This commit doesn't change any VO code yet, and just
emulates the old way using the new functions. VO code will remove its
usage of VOCTRL_UPDATE_SCREENINFO and use the new functions directly.
2014-05-06 20:22:32 +02:00
wm4 587f42b56c Fix bogus copyright text
This file was copied from gl_hwdec_vaglx.c to have a basic skeleton, but
no actual code is left from it.
2014-05-06 20:14:53 +02:00
wm4 771199e6d4 demux_playlist: don't require header for m3u
Because the http playlist URL I had for testing claimed to be m3u by
file extension and mime type, but didn't have the header.

Note that this actually changes behavior only in the case the format is
detected by mime type. Then p->force will be set before calling the
parser, and the header becomes optional.
2014-05-06 20:11:15 +02:00
wm4 690b5c5161 demux_playlist: add some mime types 2014-05-06 20:09:55 +02:00
wm4 8bb61f97b4 demux_playlist: allow recognizing format by mime type
This commit just adds basic support. The following commit will add
actual mime types.
2014-05-06 20:09:46 +02:00
wm4 b7669d533b mixer: don't restore volume with different --softvol-max settings
Changing --softvol-max and then resuming would change the volume level
on resume to something different than the original volume. This is
because the user volume setting is always between 0-100, and 100
corresponds to --softvol-max gain.

Avoid that changing -softvol-max and resuming an older file could lead
to a too loud volume level by refusing to restore if --softvol-max
changed.
2014-05-06 20:09:36 +02:00
Kevin Mitchell 0467e13725 TOOLS/lua: add cycle-deinterlace-pullup script
Override the shift+d hotkey to add a pullup step to the cycle.
2014-05-06 10:02:41 -07:00
Kevin Mitchell 6e62779e98 TOOLS/lua: conform to whitespace coding-style 2014-05-06 09:59:59 -07:00
wm4 088031f691 options: fix "-" (stdin) input
Input through stdin requires disabling the terminal layer, and commit
32c63f forgot to rename the option correctly.
2014-05-06 01:06:07 +02:00
wm4 7267588a98 vo: fix previous commit
Commit 433161 actually broke vo_opengl (and maybe others), because
config_ok is not necessarily set correctly yet _during_ reconfig. So a
vo_get_src_dst_rects() call during reconfig did nothing.
2014-05-06 01:04:51 +02:00
wm4 73c7938d74 command: remove ifdefs for deint filters
Doesn't have much of a purpose.
2014-05-06 00:47:28 +02:00
wm4 4331617bce vo: don't crash when changing panscan before first configuration
When the VO was not initialized with vo_reconfig(), or if the last
vo_reconfig() failed, changing panscan would cause a crash due to
vo_get_src_dst_rects() dereferencing vo->params (NULL if not
configured).

Just do nothing if that happens, as there is no video that could be
displayed anyway.
2014-05-06 00:33:59 +02:00
wm4 143cf79a96 vo: get rid of config_count field
Doesn't really seem to be much of use. Get rid of the remaining uses of
it.

Concerning vo_opengl_old, it seems uninitGl() works fine even if called
before initialization.
2014-05-06 00:21:15 +02:00
wm4 a8b267540e common: change mp_snprintf_append semantics
Make it more suitable for chaining. This means a function formatting a
value to a string using a static buffer can work exactly like
mp_snprintf_append itself.

Also rename it to mp_snprintf_cat, because that's shorter.
2014-05-05 23:56:12 +02:00
wm4 7fb5df0d3e options: print replacement for renamed/replaced options
Basically, extract the option table from DOCS/man/en/changes.rst, and
search the table if an option wasn't found. If there's an entry about
it, print it. Hopefully this behavior is slightly more userfriendly.

This is strictly bound to option names. It doesn't work for option
values, nor does it attempt to emulate the old option.
2014-05-05 23:56:01 +02:00
wm4 7c01dee153 options: let unknown option case be handled by final option parser
If an option is completely missing, let m_config_parse_option() handle
this case, instead of erroring out early.

Needed for the following commit.
2014-05-05 23:55:47 +02:00
Kevin Mitchell 20b5fecdf1 TOOLS/lua: use double quotes unless there's a good reason 2014-05-04 12:59:21 -07:00
Kevin Mitchell c91373a202 TOOLS/lua/autocrop: handle case of user hitting hotkey while cropdetection already running 2014-05-04 12:54:03 -07:00
Kevin Mitchell 74984aaff1 TOOLS/lua: no longer gsub out "lua/" prefix, now that its no longer there 2014-05-04 12:29:32 -07:00
wm4 040c050f2d audio: fix the exact value that is used for the wait time
The comment says that it wakes up the main thread if 50% has been
played, but in reality the value was 0.74/2 => 37.5%. Correct this. This
probably changes little, because it's a very fuzzy heuristic in the
first place.

Also move down the min_wait calculation to where it's actually used.
2014-05-04 20:41:00 +02:00
wm4 fb2e8387d4 demux_lavf: one more hack for mp3 from network
mp3 has a hack lowering the probescore for format detection. This is
because detecting mp3s is hard due to their nature, and the fact that
ID3v2 tags are sometimes several megabytes big.

When playing mp3 from network, the mime-type is usually set, and that
matches the format hack entry meant for webradios, overriding the normal
mp3 entry. This can lead to network mp3s not being detected. Lower the
network case to the same probescore as on-disk mp3s. The difference is
that for network mp3s, we don't load the full probe-buffer, and we lower
the amount of audio the demuxer will read to collect data on opening
(0.5 seconds instead of typically 5 seconds).
2014-05-04 20:38:46 +02:00
wm4 767bcdc322 ao_null: fix unit mismatch with latency option
It's in seconds, but the code used it as sample count.
2014-05-04 16:57:32 +02:00
wm4 70ffbbe927 vf: print for which filter initialization failed 2014-05-04 16:07:43 +02:00
wm4 aa2a9c3e42 manpage: fix vf_scale options 2014-05-04 16:07:01 +02:00
wm4 ca7d8681fb stream_bluray: remove unused variables
They were used for printing slave mode stuff, which was recently
removed.
2014-05-04 13:13:31 +02:00
wm4 f5a564d417 vf_vdpaupp: make code clarity improvements
This shouldn't change anything functionally, except that it buffers 1
frame less in the first-field deinterlacing mode.
2014-05-04 11:03:21 +02:00
wm4 a7fe47e495 vdpau: deduplicate video surface upload code
This was a minor code duplication between vf_vdpaupp.c and vo_vdpau.c.

(In theory, we could always require using vf_vdpaupp with vo_vdpau, but
I think it's better if vo_vdpau can work standalone.)
2014-05-04 10:51:14 +02:00
wm4 94441ed139 options: merge ---sub-auto-match with --sub-auto
There's no reason why these should be separate.
2014-05-04 10:31:24 +02:00
wm4 f26fe90c8a manpage: improve --input-cursor description 2014-05-04 10:18:49 +02:00
Martin Herkt 48bd03dd91 options: remove deprecated --identify
Also remove MSGL_SMODE and friends.

Note: The indent in options.rst was added to work around a bug in
ReportLab that causes the PDF manual build to fail.
2014-05-04 02:46:11 +02:00
Martin Herkt 81c076b2f8 options: remove obsolete --fsmode-dontuse 2014-05-04 02:46:11 +02:00
Martin Herkt 9d9bba8f13 options: rename device-specific options
--dvdangle → --dvd-angle
--tvscan   → --tv-scan
2014-05-04 02:46:11 +02:00
Martin Herkt 11eaa52529 options: rename msg-related options
--msgcolor    → --msg-color
--msglevel    → --msg-level
--msgmodule   → --msg-module
--msgtime     → --msg-time (also document this one)
--playing-msg → --term-playing-msg
--status-msg  → --term-status-msg
2014-05-04 02:46:11 +02:00
Martin Herkt b54c963258 options: rename video-related options/properties
Renamed options:
--aspect    → --video-aspect
--fstype    → --x11-fstype
--native-fs → --fs-missioncontrol
--name      → --x11-name

Renamed properties:
aspect → video-aspect
2014-05-04 02:46:11 +02:00