Commit Graph

37938 Commits

Author SHA1 Message Date
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
Martin Herkt 2b7bc2dfc9 options: rename audio-related options/properties
Renamed options:
--audiofile       → --audio-file
--audiofile-cache → --audio-file-cache
--channels        → --audio-channels
--format          → --audio-format
--srate           → --audio-samplerate

Renamed properties:
samplerate → audio-samplerate
channels   → audio-channels
2014-05-04 02:46:11 +02:00
Martin Herkt 8d7d6caeaf options: rename subtitle-related options
--ass           → --sub-ass
--autosub       → --sub-auto
--autosub-match → --sub-auto-match
--sub           → --sub-file
--subcp         → --sub-codepage
--subfps        → --sub-fps
2014-05-04 02:46:11 +02:00
Martin Herkt 32c63fc119 options: rename input-related options
--ar              → --input-appleremote
--consolecontrols → --input-terminal
--media-keys      → --input-media-keys
--joystick        → --input-joystick
--lirc            → --input-lirc
--lircconf        → --input-lirc-conf
--mouse-movements → --input-cursor
--right-alt-gr    → --input-right-alt-gr
2014-05-04 02:46:05 +02:00
Martin Herkt e24d736404 DOCS: update changes.rst
Better to tell users straight away that mpv should not be treated
as just another MPlayer.
2014-05-03 22:08:32 +02:00
wm4 6589c5424e video: remove a corner case by introducing another one
When loading a video, and a script reacts to MPV_EVENT_VIDEO_RECONFIG,
and the script inserts a video filter, the first frame can be skipped.
This happens simply because the first frame is (usually) still queued in
the video filter chain, and changing the filter chain will drop all
queued frames. So this is just a corner case that just happens in a
weird situation.

But it's still annoying when having such a script, and starting
something where the first frame is very visible, and not starting in
paused mode. (All in all, a corner case.) Do this by immediately queuing
1 filtered frame to the VO immediately after reconfig, instead of
leaving it to the video loop doing it as "incremental" work. Simply
fallthrough to the next case. We must not overwrite "r" in this case,
because that contains the current status.

Note that the first frame will not be filtered using the inserted
filter.
2014-05-03 16:33:07 +02:00
wm4 ae4613cd3b video: fix video end condition
This wasn't really fine, and could (perhaps) cause weird corner cases on
reinit or when the player was paused.

Before eb9d20, video_left was also set to true if vo->frame_loaded was
set, and this variable basically indicated whether the previous
update_video() call was successful. This was overlooked when changing
everything. Simply always call update_video(), it should be equivalent.
2014-05-03 15:29:48 +02:00
wm4 c9ed70b666 video: rename a variable
Cosmetic change, reduce the diff of the following commit.
2014-05-03 15:27:17 +02:00
wm4 bc07c86da5 vf_vapoursynth: fix aspect ratio passed to vapoursynth
This was recently either changed or clarified in vapoursynth.

Pass the aspect ratio as pixel aspect to VS.
2014-05-03 15:17:13 +02:00
wm4 4bd9bdf5c9 input: fix stack overflow when checking for abort cmd
This can happen when the input stream is somehow blocking on network,
and the user still send input in one way or another, and one of the
commands is a compound command ("cmd a ; cmd b").
2014-05-02 17:43:56 +02:00
wm4 1279ebf5c5 client API: fix inverted condition
Oops. Sigh.
2014-05-02 17:23:25 +02:00
wm4 3b755642c8 manpage: adjust description of vdpau deint sub-option 2014-05-02 17:08:19 +02:00
wm4 0d47509025 manpage: deprecated vo_vdpau postprocessing options
This seems a bit silly, but the way vf_vdpaupp works, this is cleaner.
2014-05-02 16:57:39 +02:00
wm4 5d9ea7f22f manpage: document vf_vdpaupp 2014-05-02 16:41:01 +02:00
wm4 33a945cc7e video: removed unused stuff 2014-05-02 14:48:52 +02:00
wm4 d81a374c89 player: remove extremely obscure undefined behavior
Apparently the value of a pointer is "indeterminate" after a free()
call, even if you never dereference the pointer after the free. Since
talloc_free() calls free(), this applies here.
2014-05-02 14:45:56 +02:00
wm4 2386e183fe client API, video: signal reconfig at the right time
Filter reconfig can now happen a few frames before VO reconfig.
2014-05-02 01:28:52 +02:00
wm4 585d8c6856 input: increase number of maximum sections
This is because Lua scripts creating key bindings create 2 input
sections per script.

Probably fixes #759.
2014-05-02 01:27:17 +02:00
wm4 beaa7c7153 lua: remove "lua/" prefix from script names
This affects the return value of mp.script_name, the "client name"
(what's returned by mpv_client_name()) and all associated features, as
well as the mpv terminal output module prefix when scripts print
something.

As discussed in #748.
2014-05-02 01:25:58 +02:00
wm4 eb9d203946 video: change everything
Change how the video decoding loop works. The structure should now be a
bit easier to follow. The interactions on format changes are (probably)
simpler. This also aligns the decoding loop with future planned changes,
such as moving various things to separate threads.
2014-05-02 01:09:58 +02:00
wm4 346daec403 manpage: fix the alternative suggested for stream-path
${filename} didn't make much sense, since that doesn't include the path
components, and can be otherwise mangled.
2014-05-02 01:09:58 +02:00
wm4 50ebcf1a43 video: handle colorspace and aspect overrides separately
Now the video filter code handles these explicitly, which should
increase robustness (or at least find bugs earlier).
2014-05-02 01:09:55 +02:00
wm4 f4eaceee0f vf: sanitize filter input, instead of overriding it
vf_fix_img_params() takes care of overwriting image parameters that are
normally not set correctly by filters. But this makes no sense for input
images. So instead, check that the input is correct.

It still has to be done for the first input image, because that's used
to handle some overrides (see video_reconfig_filters()).
2014-05-02 01:09:03 +02:00
wm4 4049532501 vf: add alternate functions for retrieving filter output
These replace vf_read_output_frame(), although we still emulate that
function. This change is preparation for another commit (and this is
basically just to reduce the diff and signal/noise ratio in that
commit).
2014-05-02 01:08:06 +02:00
wm4 9243249a0e vf: expose input parameters; clear parameters on failure
Preparation (and simplification) for following commits.
2014-05-02 01:08:05 +02:00
wm4 2a9b1d19ba vf: mark auto-inserted conversion filters in verbose output
Nota that this flag is not set for other auto-inserted filters (like
deinterlacing or rotation).
2014-05-02 01:08:05 +02:00
wm4 ffde8083f6 vf_lavfi: reinit after libavfilter EOF
Basically, if we feed the filter a new image even after the EOF state
has been reached (e.g. because the input stream "recovered"), we want
the filter to restart, instead of returning an error forever.
2014-05-02 01:08:05 +02:00
wm4 bd230a8d47 vo: verify format of queued image
Currently, only the configured format is accepted, so assert that the
playback core code (which handles format changes) is correct.
2014-05-02 01:08:05 +02:00
wm4 a014a2402d video: fix screenshots with anamorphic video
(Again.)

This was caused by mp_image_set_params() not properly copying d_w/d_h,
because mp_image_set_size() resets them.
2014-05-02 01:08:05 +02:00
wm4 50538c0ea2 vf_vdpaupp: always provide past and future fields
Some non-deinterlacing filters (potentially denoising) also use
additional frames for filtering. The vdpau docs suggest providing at
least 1 future and 2 past _fields_, which means we need to provide 1
past frame (the future field is already the other field of the current
field, and both fields are in the same frame).

We can easily achieve this by buffering an additional frame in the non-
deint case.
2014-05-02 01:08:05 +02:00
wm4 586ea206da vo_vdpau: keep colorspace flags
Since vdpau_mixer.c initializes the YUV conversion using the mp_image
flags, these images should have all flags set properly.
2014-05-02 01:08:05 +02:00
wm4 6775487a46 video: move video frame queue from vo_vdpau.c to vo.c
Remove the special casing of vo_vdpau vs. other VOs. Replace the
complicated interaction between vo.c and vo_vdpau.c with a simple queue
in vo.c. VOs other than vdpau are handled by setting the length of the
queue to 1 (this is essentially what waiting_mpi was).

Note that vo_vdpau.c seems to have buffered only 1 or 2 frames into the
future, while the remaining 3 or 4 frames were past frames. So the new
code buffers 2 frames (vo_vdpau.c requests this queue length by setting
vo->max_video_queue to 2). It should probably be investigated why
vo_vdpau.c kept so many past frames.

The field vo->redrawing is removed. I'm not really sure what that would
be needed for; it seems pointless.

Future directions include making the interface between playloop and VO
simpler, as well as making rendering a frame a single operation, as
opposed to the weird 3-step sequence of rendering, drawing OSD, and
flipping.
2014-05-02 01:08:05 +02:00
wm4 d6dc8642ae vo_vdpau: always use mp_image for internal buffer queue 2014-05-02 01:08:05 +02:00
wm4 90a039a599 command, vo_vdpau: respect vdpau deint sub-option
This is a horrible hack to keep compatibility with the vo_vdpau deint
sub-option.
2014-05-02 01:08:05 +02:00
wm4 3f060a19d8 command: redo deinterlace filter probing
Give up on the deint_filters[] array, and probe using explicit code
instead. Add additional checks to test the pixel format to avoid
annoying warnings when a hardware deinterlacer is inserted when the
current video chain is obviously incompatible.
2014-05-02 01:08:04 +02:00
wm4 c42795f1ea command: make enabling deinterlacing with vdpau work
This restores the capability of enabling deinterlacing with the
'cycle deinterlace' command with vo_vdpau, and also makes it work
with vo_opengl.
2014-05-02 01:08:04 +02:00
wm4 1efb5fd465 vf_vdpaupp: allow toggling deinterlace
Basically makes the 'D' key work again. (But only if the filter is
already inserted.)
2014-05-02 01:08:04 +02:00
wm4 ffbf6037cb vo_vdpau: apply vo_vdpau postprocessing options
The previous commits changed vo_vdpau so that these options are set by
vf_vdpaupp, and the corresponding vo_vdpau were ignored. But for
compatibility, keep the "old" options working.

The value of this is questionable - maybe the vo_vdpau options should
just be removed. For now, at least demonstrate that it's possible.

The "deint" suboption still doesn't work, because the framerate doubling
logic required for some deint modes was moved to vf_vdpaupp. This
requires more elaborate workarounds.
2014-05-02 01:08:04 +02:00
wm4 fd63f2f037 vdpau_mixer: allow overriding frame opts
So a caller can override the filter options dictated by vf_vdpaupp.
2014-05-02 01:08:04 +02:00
wm4 ec28a281b9 vo_vdpau: support vf_vdpaupp
This is slightly incomplete: the mixer options, such as sharpen and
especially deinterlacing, are ignored. This also breaks automatic
enabling of interlacing with 'D' or --deinterlace. These issues will be
fixed later in the following commits.

Note that we keep all the custom vdpau queue stuff. This will also be
simplified later.
2014-05-02 01:08:04 +02:00
wm4 d8385091a6 vo_opengl: make it work with vf_vdpaupp
This uses mp_vdpau_mixer_render(). The benefit is that it makes vdpau
deinterlacing just work. One additional minor advantage is that the
video mixer creation code is factored out (although that is a double-
edged sword).
2014-05-02 01:08:04 +02:00
wm4 073ee146ea vf_vdpaupp: allow non-vdpau input
So you can use vdpau deinterlacing without using vdpau hardware
decoding.

vf_vavpp does something similar.
2014-05-02 01:08:04 +02:00
wm4 ec60669cd1 vdpau: add a postprocessing pseudo-filter
This factors out some code from vo_vdpau.c, especially deinterlacing
handling. The intention is to use this for vo_vdpau.c to make the logic
significantly easier, and to use it for vo_opengl (gl_hwdec_vdpau.c) to
allow selecting deinterlace and postprocessing modes.

As of this commit, the filter actually does nothing, since both vo_vdpau
and vo_opengl treat the generated images as normal vdpau images. This
will change in the following commits.
2014-05-02 01:08:02 +02:00
wm4 7fc999b577 vo: document draw_image 2014-04-30 22:25:11 +02:00
wm4 cb411ac520 vo_lavc: remove code with no effect
This field will also removed in the future.
2014-04-30 22:24:48 +02:00
wm4 ee574c67ea video: improve error messages 2014-04-30 22:20:08 +02:00