Commit Graph

9684 Commits

Author SHA1 Message Date
wm4 fd7bf67019 DOCS/client_api_examples: qtexample: don't require Qt 5.x
Exclude the worthless Qt 5.0-only demo code on Qt 4.x.
2014-10-17 22:36:23 +02:00
Alessandro Ghedini e0f0f6fe26 manpage: add JSON IPC documentation 2014-10-17 20:46:31 +02:00
Stefano Pigozzi eb902efb04 cocoa: allow mouse events to bubble up with no-input-cursor
Previously we didn't report events to the core, but still prevented the events
to travel on the responder chain.
2014-10-17 19:19:45 +02:00
wm4 01e1d0948d options: don't load per-file config files by default
Generally useless feature, and might be slightly dangerous if paths
can "escape" from the profile dir. (Normally this shouldn't be
possible, though.)
2014-10-17 02:55:31 +02:00
wm4 41b2927f39 sub: adjustments to --ass-style-override option
Now requires newest libass git. Since this feature wasn't part of a
libass release yet, I'm not bothering making the mpv code compatible
with as how it was previously implemented (it will just be disabled
with any older libass).

CC: @mpv-player/stable (because mpv-build uses libass git, and this
                        breaks the feature)
2014-10-17 02:06:08 +02:00
wm4 63f103e05d DOCS/client_api_examples: qtexample: set a magic Qt flag
Otherwise, other magic Qt stuff can be magically broken.

(No, I don't know the real reasons for this.)
2014-10-16 21:19:30 +02:00
wm4 b836a2295c DOCS/client_api_examples: qtexample: embedding works on Cocoa 2014-10-16 21:18:01 +02:00
shdown f7c76120c0 manpage: fix reference to a defunct option
The change was made with faad40aad9.
2014-10-16 21:17:01 +02:00
wm4 bc0ed90481 command: allow setting per-file options at runtime
The intended use-case is for doing this at load time, after the load
command was issued. (See following commit.)
2014-10-15 22:39:33 +02:00
wm4 aa14143578 stream_lavf: expose concat://
Apparently there's an use for this; see #1178.

I won't redocument obscure FFmpeg features, so add a hint to the
manpage that some protocols are documented in FFmpeg instead.
2014-10-14 18:50:18 +02:00
wm4 cb6be26181 DOCS/client_api_examples: qtexample: remove debugging code
Forgotten.
2014-10-14 13:20:24 +02:00
wm4 2ad0be8592 DOCS/client_api_examples: qtexample: stuff
Dump chapters and track list to the log for demo purposes.

Compile in debug mode.
2014-10-13 23:55:57 +02:00
wm4 1c5dbdbfc2 client API: add qthelper.hpp
This provides some helper functions and classes for C++/Qt. As the top
of qthelper.hpp says, this is built on top of the client API, and is a
mere helper provided for convenience.

Maybe this should be a separate library, but on the other hand I don't
see much of a point in that. It's also header-only, but C++ people like
such things. This makes it easier for us, because we don't need to care
about ABI compatibility.

The client API doesn't change, but bump it so that those who are using
this header can declare a proper dependency.
2014-10-13 23:54:19 +02:00
wm4 6c34081095 DOCS/edl-mpv: minor clarification 2014-10-12 01:33:10 +02:00
wm4 3093d93e1f vf_vapoursynth: add standalone Lua scripting 2014-10-12 01:33:10 +02:00
Stefano Pigozzi c2eca2e4b7 libmpv/cocoa: allow clients to use mpv event system
This allows mpv's view to take key and send events to mpv's core.
To set key status correctly, clients must call -[NSWindow selectNextKeyView:]
during reconfig on the main thread. All is 'documented' in the cocoabasic
example.

If someone knows a better way to handle giving key to the embedded view,
let me know!
2014-10-12 00:19:44 +02:00
wm4 c5c21abf78 lua: add command_native() function
This is the Lua equivalent of mpv_command_node().
2014-10-11 00:33:09 +02:00
wm4 63e2b6c4ae client API: add mpv_command_node[_async]
Allows passing native types as arguments.

Also some minor doc improvements, including giving some (natural)
improvements to mpv_free_node_contents().

Note: mpv_command_node_async() is completely untested.
2014-10-11 00:33:09 +02:00
wm4 2f28e071c8 command: make audio device list available to the client API 2014-10-10 19:49:10 +02:00
wm4 d4b2a96d90 Revert "player: --save-position-on-quit should always work"
This reverts commit 45c8b97efb.

Some else complained (github issue #1163).

The feature requested in #1148 will be implemented differently in
the following commit.
2014-10-10 14:27:45 +02:00
Stefano Pigozzi dba2b90d9a libmpv/cocoa: don't start the event monitor
The event monitor is used to get keyboard events when there is no window, but
since it is a global monitor to the current process, we don't want it in a
library setting.
2014-10-09 22:14:41 +02:00
Stefano Pigozzi ca353fcf92 libmpv/cocoa: make global events work and get rid of is_cplayer
After @frau's split of macosx_events from macosx_application, `is_cplayer' is
not needed anymore. At the moment only global events such as Media Keys and
Apple Remote work, because the VO-level ones were hardcoded to be disabled.
(that will be fix in a later commit ).
2014-10-09 22:14:41 +02:00
Alessandro Ghedini d1e8bb0f9b manpage: fix --audio-pitch-correction description
Add closing ">" and specify what is the default value.
2014-10-09 22:07:41 +02:00
wm4 35649a990a audio: add device selection & listing with --audio-device
Not sure how good of an idea this is.

This commit doesn't add support for this to any AO yet; the AO
implementations will follow later.
2014-10-09 21:21:31 +02:00
wm4 8989019271 manpage: improve --wid description
In particular, add a basic description of how Cocoa embedding works.
2014-10-09 20:17:52 +02:00
wm4 e294656cb1 client API: rename --input-x11-keyboard to --input-vo-keyboard
Apparently we need this for Cocoa too. (The option was X11 specific in
the hope that only X11 would need this hack.)
2014-10-09 18:28:37 +02:00
Stefano Pigozzi 69fa956f50 cocoa: allow to embed into an arbitrary NSView
Basically add if guards on all the problematic features. I'm still thinking
about a better way to handle this, but for the time being, this will do.
2014-10-08 19:38:35 +02:00
wm4 0ec5d35d57 client API: introduce numeric log levels
Maybe using strings for log levels was a mistake (too broad and too
impractical), so I'm adding numeric log level at least for the receiver
side. This makes it easier to map mpv log levels to other logging
systems.

I'm still too stingy to add a function to set the log level by a numeric
value, though.

The numeric values are not directly mapped to the internal mpv values,
because then almost every file in mpv would have to include the client
API header.

Coalesce this into API version 1.6, since 1.6 was bumped just yesterday.
2014-10-08 14:17:33 +02:00
wm4 ab5d58c3d9 DOCS/client_api_examples: qtexample: add a log window
For the purpose of demonstration.

Also make the windows larger. I'm not exactly sure how Qt determines
the default window sizes, but here they are a bit tiny, so force them
larger.
2014-10-08 13:34:06 +02:00
wm4 f73778ad82 msg, client API: buffer partial lines
The API could return partial lines, meaning the message could stop
in the middle of a line, and the next message would have the rest of
it (or just the next part of it). This was a pain for the user, so do
the nasty task of buffering the lines ourselves.

Now only complete lines are sent. To make things even easier for the
API user, don't put multiple lines into a single event, but split them.

The terminal output code needed something similar (inserting a prefix
header on start of each line). To avoid code duplication, this commit
refactors the terminal output so that lines are split in a single
place.
2014-10-08 13:11:55 +02:00
wm4 3cbd79b35b command: add cache-buffering-state property 2014-10-07 22:13:36 +02:00
wm4 128bb68d29 client API: clarify pause/unpause events, modify core-idle property
Whether you consider the semantics weird or not depends on your use
case, but I suppose it's a bit confusing anyway. At this point, we keep
MPV_EVENT_PAUSE/UNPAUSE for compatibility only.

Make the "core-idle" property somewhat more useful in this context.
2014-10-07 21:01:19 +02:00
James Ross-Gowan 9541537e32 DOCS/client_api_examples: qtexample: set the locale
QApplication sets the locale, so change the LC_NUMERIC category back to
"C" for libmpv.

See: http://qt-project.org/doc/qt-5/qcoreapplication.html#locale-settings
2014-10-07 08:45:48 +02:00
wm4 45c8b97efb player: --save-position-on-quit should always work
Now any action that stops playback of a file (even playlist navigation)
will save the position. Normal EOF is of course excluded from this, as
well as commands that just reload the current file.

The option name is now slightly off, although you could argue what the
word "quit" means.

Fixes #1148 (or at least this is how I understood it).
2014-10-06 22:07:35 +02:00
Stefano Pigozzi c6b68c28f4 cocoa: remove --fs-missioncontrol
This is the first of a series of commits that will change the Cocoa way in a
way that is easily embeddable inside parent views. To reach that point common
code must avoid referencing the parent NSWindow since that could be the host
application's window.
2014-10-05 18:07:27 +02:00
Stefano Pigozzi 7968814470 cocoa: fix some pointer casts to be 32bit safe
credits: wm4
2014-10-05 15:22:17 +02:00
Stefano Pigozzi c8ed4736ef cocoa/libmpv: allow to embed mpv GL view in another window
This is just temporary code but is a good base for future work (and baby
steps are required for these changes). The 'final destination' is embedding
the video view into any NSView but that requires some more work (the mechanism
will be the same: pass the view's pointer casted to int64_t through -wid).

For instance we will need to remove as much usage of the window instance
as possible, and use nil guards where not possible. For this reason I will
remove stuff like the mission control fullscreen feature (it's a cute feature
but annoying to support and quite limited, go make your GUIs), and a way to
lookup the current screen directly from the NSView absolute coordinates
(this is needed for ICC detection mostly, and reporting back the screen to
mpv's core).

Moreover the current view.m will need to be separated into 2 views: the actual
video view that will be embedded, and a parent view that will not be embedded
and will be responsibile for tracking events.
2014-10-05 14:28:33 +02:00
Stefano Pigozzi 3137b7ac5f examples/cocoa: never instance NSApplication with new
Cocoa expects the you instance NSApplications only through the singleton
method sharedApplication.
2014-10-05 10:06:46 +02:00
Stefano Pigozzi 11609ab389 examples/cocoa: set activation policy to mimic nib applications 2014-10-05 09:33:56 +02:00
wm4 80e10b0058 manpage: changes: random corrections and additions 2014-10-04 22:39:08 +02:00
wm4 36ee9a5e90 manpage: changes: move internal changes section to the end 2014-10-04 22:19:07 +02:00
wm4 bd169a313c options: add --no-keepaspect-window
Seems silly, but was requested.
2014-10-04 22:17:36 +02:00
Alessandro Ghedini a17ecd30ca manpage: refactor MPlayer -> mpv changes section
Merge duplicate entries, organize entries in subsections, reword some entries.
2014-10-04 15:15:29 +02:00
wm4 54fd93856a x11: stupid workaround for XMonad
--x11-netwm=yes now forces NetWM fullscreen, while --x11-netwm=auto
(detect whether NetWM fullsctreen support is available) is the old
behavior and still the default.

See #888.
2014-10-04 15:03:02 +02:00
Kevin Mitchell d4d37245a6 manpage: improve consistency with new ~/.config/mpv default
Signed-off-by: wm4 <wm4@nowhere>
2014-10-04 01:29:12 +02:00
Stephen Caraher a037313c10 man: replaced : with , in broken --lua-opts osc example
--lua-opts is a key-value list, so the option parser accepts only commas.

Signed-off-by: wm4 <wm4@nowhere>
CC: @mpv-player/stable
2014-10-03 14:24:07 +02:00
wm4 4332105352 command: allow passing memory addresses to overlay_add
For the sake of libmpv. Might make things much easier for the user,
especially on Windows. On the other hand, it's a bit sketchy that a
command exists that makes the player access arbitrary memory regions.
(But do note that input commands are not meant to be "secure" and never
were - for example, there's the "run" command, which obviously allows
running random shell commands.)
2014-10-03 01:24:48 +02:00
wm4 44d5a26bd6 manpage: remove non-existing ratio-pos property
Use percent-pos instead, which is exactly the same, except with the
range 0.0-100.0.

I'm not sure how this got there; it was probably introduced and then
removed again as percent-pos got more precise.

CC: @mpv-player/stable
2014-10-02 18:37:22 +02:00
wm4 7ffb621434 manpage: redocument audio delay key bindings
Fixes #1131.
CC: @mpv-player/stable
2014-10-02 03:14:54 +02:00
wm4 ae2e2b9740 audio: enable pitch correction by default when playing fast
Apparently this is what users want. When playing with normal speed,
nothing is done. When playing slower than normal, resampling is used
instead, because scaletempo (which does the pitch correction) adds
too many artifacts.
2014-10-02 02:58:52 +02:00
Kevin Mitchell 61ebe6137e man: fix to->too typo 2014-09-30 11:24:38 -07:00
wm4 4ea05577bd audio: remove --audiodrop
This would play some silence in case video was slower than audio. If
framedropping is already enabled, there's no other way to keep A/V
sync, short of changing audio playback speed (which would give worse
results). The --audiodrop option inserted silence if there was more
than 500ms desync.

This worked somewhat, but I think it was a silly idea after all. Whether
the playback experience is really bad or slightly worse doesn't really
matter. There also was a subtle bug with PTS handling, that apparently
caused A/V desync anyway at ridiculous playback speeds.

Just remove this feature; nobody is going to use it anyway.
2014-09-30 18:05:55 +02:00
Otto Modinos cbfb6de667 lua: add mpv/lua directories to the lua path
Signed-off-by: wm4 <wm4@nowhere>
2014-09-28 20:23:38 +02:00
wm4 34fc0720f7 DOCS/client_api_examples: qtexample: remove broken resizing
The intention was to adjust the window size to video size. It never
worked well; it prevented the user to make the window smaller. For
unknown reason it stopped resizing properly as well.

This is just a cheap example, and I don't intend to fight with Qt, so
replace the "demonstration" behavior by something slightly lamer.
2014-09-28 20:18:18 +02:00
wm4 3273db1ef7 client API, X11: change default keyboard input handling again
Commit 64b7811c tried to do the "right thing" with respect to whether
keyboard input should be enabled or not. It turns out that X11 does
something stupid by design. All modern toolkits work around this native
X11 behavior, but embedding breaks these workarounds.

The only way to handle this correctly is the XEmbed protocol. It needs
to be supported by the toolkit, and probably also some mpv support. But
Qt has inconsistent support for it. In Qt 4, a X11 specific embedding
widget was needed. Qt 5.0 doesn't support it at all. Qt 5.1 apparently
supports it via QWindow, but if it really does, I couldn't get it to
work.

So add a hack instead. The new --input-x11-keyboard option controls
whether mpv should enable keyboard input on the X11 window or not. In
the command line player, it's enabled by default, but in libmpv it's
disabled.

This hack has the same problem as all previous embedding had: move the
mouse outside of the window, and you don't get keyboard input anymore.
Likewise, mpv will steal all keyboard input from the parent application
as long as the mouse is inside of the mpv window.

Also see issue #1090.
2014-09-28 20:11:00 +02:00
wm4 9ac86d9e99 audio: decouple demux and audio decoder/filter sample formats
For a while, we used this to transfer PCM from demuxer to the filter
chain. We had a special "codec" that mapped what MPlayer used to do
(MPlayer passes the AF sample format over an extra field to ad_pcm,
which specially interprets it).

Do this by providing a mp_set_pcm_codec() function, which describes a
sample format in a generic way, and sets the appropriate demuxer header
fields so that libavcodec interprets it correctly. We use the fact that
libavcodec has separate PCM decoders for each format. These are
systematically named, so we can easily map them.

This has the advantage that we can change the audio filter chain as we
like, without losing features from the "rawaudio" demuxer. In fact, this
commit also gets rid of the audio filter chain formats completely.
Instead have an explicit list of PCM formats. (We could even just have
the user pass libavcodec PCM decoder names directly, but that would be
annoying in other ways.)
2014-09-24 22:55:50 +02:00
wm4 735a9c39d7 player: change --keep-open semantics
By popular request.
2014-09-24 01:56:53 +02:00
wm4 b745c2d005 audio: drop swapped-endian audio formats
Until now, the audio chain could handle both little endian and big
endian formats. This actually doesn't make much sense, since the audio
API and the HW will most likely prefer native formats. Or at the very
least, it should be trivial for audio drivers to do the byte swapping
themselves.

From now on, the audio chain contains native-endian formats only. All
AOs and some filters are adjusted. af_convertsignendian.c is now wrongly
named, but the filter name is adjusted. In some cases, the audio
infrastructure was reused on the demuxer side, but that is relatively
easy to rectify.

This is a quite intrusive and radical change. It's possible that it will
break some things (especially if they're obscure or not Linux), so watch
out for regressions. It's probably still better to do it the bulldozer
way, since slow transition and researching foreign platforms would take
a lot of time and effort.
2014-09-23 23:09:25 +02:00
wm4 9fe076f02a player: allow passing number of loops to --loop-file
E.g. --loop-file=2 will play the file 3 times (one time normally, and 2
repeats).

Minor syntax issue: "--loop-file 5" won't work, you have to use
"--loop-file=5". This is because "--loop-file" still has to work for
compatibility, so the "old" syntax with a space between option name and
value can't work.
2014-09-22 22:56:00 +02:00
wm4 58db0a55f3 options: remove --volstep
It's just confusing; users are encouraged to edit input.conf instead
(changing the argument to the "add" command).

Update input.conf to keep the old behavior.
2014-09-21 15:41:33 +02:00
wm4 b12a287227 manpage: clarify vf_pp docs
Make the note about quoting more prominent.
Add a warning that this filter is useless for new files.
2014-09-21 11:10:52 +02:00
wm4 68b7217d41 vo_vdpau: better integration with the generic framedrop code
vo_vdpau uses its own framedrop code, mostly for historic reasons. It
has some tricky heuristics, of which I'm not sure how they work, or if
they have any effect at all, but in any case, I want to keep this code
for now. One day it might get fully ported to the vo.c framedrop code,
or just removed.

But improve its interaction with the user-visible framedrop controls.
Make --framedrop actually enable and disable the vo_vdpau framedrop
code, and increment the number of dropped frames correctly.

The code path for other VOs should be equivalent. The vo_vdpau behavior
should, except for the improvements mentioned above, be mostly
equivalent as well. One minor change is that frames "shown" during
preemption are always count as dropped.

Remove the statement from the manpage that vo_vdpau is the default; this
hasn't been the case for a while.
2014-09-20 15:17:12 +02:00
wm4 f64199fcdc manpage: document terminal status line components
(The classic MPlayer documentation had this in separate files, but we
deleted them ages ago.)
2014-09-20 00:50:04 +02:00
wm4 ea2b19f646 player: allow overriding OSD message for all OSD levels
Until now, you could override only level 3 with --osd-status-msg. Extend
this, add add --osd-msg1 to --osd-msg3 (one for each OSD level). OSD
level 0 always means disable OSD, so that isn't included.

--osd-msg3 corresponds to --osd-status-msg, but they're not exactly the
same. To allow more customization, --osd-msgN do not include the OSD
symbol. The symbol can be manually added with "${osd-sym-cc}". We keep
the "old" option for some short-term compatibility.

--osd-msg1 should be particularly useful; for example you could do:

    --osd-msg1='${?pause==yes:${osd-sym-cc}}'

to display a "paused" symbol when paused, and nothing during normal
playback. (Although admittedly, the syntax is quite a bit of work.)
2014-09-18 01:23:33 +02:00
wm4 6c3d25e6f5 command: allow using ASS tags on OSD messages
We don't allow this by default, because it would be silly if random
external data (like filenames or file tags) could accidentally trigger
them.

Add a property that magically disables this ASS tag escaping.

Note that malicious input could still disable ASS tag escaping by
itself. This would be annoying but harmless.
2014-09-18 00:49:55 +02:00
wm4 a522441bbe command: add osd-sym-cc property
This allows you to reproduce the OSD symbol.
2014-09-18 00:12:59 +02:00
wm4 60f5e53f60 options: change --volstep to 2
With default settings, this allows you to hit the 100% mark (with
default --softvol-max in the middle) even if you've reached min or max
volume before. This is because 50 is not divisible by 3 (old default)
but by 2 (new default).

Not really sure why there still can be issues with higher --softvol-max
and --volstep=1, but this is where I stop caring.
2014-09-16 19:12:02 +02:00
Aleksey Andreev 9e1ea9b3cd manpage: fix typo in input.rst
Signed-off-by: wm4 <wm4@nowhere>
2014-09-15 23:23:26 +02:00
wm4 cfdeb9d8ce input.conf: map ESC to exiting fullscreen
Apparently making ESC exit fullscreen mode is the more popular
convention compared to ESC quitting the program.

It was also concluded that ESC should do nothing when the windows is
already in normal state.

See discussion in #973.
2014-09-15 23:22:21 +02:00
wm4 930c61b64c DOCS/client_api_examples: qtexample: resize to video size
This is pretty imperfect, but it's just a demo.

The main purpose is clarifying how and when to get the video size.

In theory, retrieving the properties this way has a race condition:
after reading dwidth, the video could resize again. But the worst that
can happen are mismatching dwidth/dheight values, and the
MPV_EVENT_VIDEO_RECONFIG event would be immediately received again,
which would fix the mismatch. You could read the full video-out-params
property to absolutely avoid it, but it's not worth the trouble.
2014-09-15 18:38:42 +02:00
wm4 ac2047e02e manpage: clarify description of dwidth/dheight 2014-09-15 18:29:53 +02:00
wm4 e0b4daf3ad input: use libwaio for pipe input on Windows
Use libwaio to read from pipes (stdin or named pipes) on Windows. This
liberates us from nasty issues, such as pipes (as created by most
programs) not being possible to read in a non-blocking or event-driven
way. Although it would be possible to do that in a somewhat sane way
on Vista+, it's still not easy, and on XP it's especially hard. libwaio
handles these things for us.

Move pipe.c to pipe-unix.c, and remove Windows specific things. Also
adjust the input.c code to make this work cleanly.
2014-09-14 16:24:01 +02:00
wm4 2dd819705d input: "quit_watch_later" and "stop" are abort commands
This means they get special handling for asynchronously aborting
playback, even if the player is "stuck".

Also document "stop". It seems somewhat useful for client API users
(although that will be implemented properly only in the following
commits.)
2014-09-13 14:10:10 +02:00
wm4 f93dd45ac1 manpage: document shift+pgup/pgdwn bindings 2014-09-13 01:14:07 +02:00
wm4 017b3fa9db lua: synchronously wait until scripts are loaded
This makes the player wait until each script is loaded. Do this to give
the script a chance to setup all its event handlers. It might also be
useful to allow a script to change options that matter for playback.

While waiting for a script to be loaded, the player actually accepts
input. This is needed because the scripts can execute player commands
anyway while they are being "loaded". The player won't react to most
commands though: it can't quit or navigate the playlist in this state.

For deciding whether a script is finally loaded, we use a cheap hack: if
mpv_wait_event() is called, it's considered loaded. Let's hope this is
good enough. I think it's better than introducing explicit API for this.
Although I'm sure this will turn out as too simplistic some time in the
future, the same would probably happen with a more explicit API.
2014-09-06 17:02:47 +02:00
Stefano Pigozzi a1d3afb395 vo_corevideo: remove this VO
This was kept in the codebase because it is slightly faster than --vo=opengl
on really old Intel cards (from the GMA era). Time to kill it, and let it rest.

Fixes #1061
2014-09-06 14:10:22 +02:00
James Ross-Gowan 5c3f3fd3da win32: add tmpfile() replacement
The Windows version of tmpfile is actually pretty broken. It tries to
create the file in the root directory of the current drive, which means
on Vista and up, it normally fails due to insufficient permissions.
Replace it with a version that uses GetTempPath.

Also remove the Windows-specific note about automatic deletion of the
cache file. FILE_FLAG_DELETE_ON_CLOSE is available in NT, and it should
be pretty reliable.
2014-09-05 17:51:44 +02:00
wm4 545c2d7206 manpage: fix sub_add description
It is in fact selected. The manpage wasn't updated when this was
changed.
2014-09-05 02:42:25 +02:00
wm4 a7d737a698 audio: make buffer size configurable
Really only for testing.
2014-09-05 01:53:10 +02:00
wm4 bf74a4cc46 player: add --media-title option
Requested by ChrisK2.
2014-09-02 22:28:11 +02:00
wm4 2da246b9f7 player: add --osd-playing-msg option 2014-09-02 00:12:52 +02:00
wm4 5f14543668 player: simplistic HLS bitrate selection
--hls-bitrate=min/max lets you select the min or max bitrate. That's it.
Something more sophisticated might be possible, but is probably not even
worth the effort.
2014-09-01 23:47:27 +02:00
wm4 8d92128f6b command: remove broken quvi-format property
Never really worked, and libquvi is probably a lost cause anyway.
2014-09-01 23:27:33 +02:00
Martin Herkt 27a065182c man: fix a whole bunch of typos 2014-09-01 04:27:13 +02:00
wm4 866e0e1670 player: always load playlists
Until now, you had to use --load-unsafe-playlists or --playlist to get
playlists loaded. Change this and always load playlists by default.

This still attempts to reject unsafe URLs. For example, trying to invoke
libavdevice pseudo-demuxer is explicitly prevented. Local paths and any
http links (and some more) are always allowed.
2014-08-31 19:49:39 +02:00
wm4 64b7811c28 x11: when using --wid, inherit event flags from parent window
When embedding a X window, it's hard to control whether it receives
mouse/keyboard input or not. It seems the X protocol itself makes this
hard (basically due to the outdated design mismatching with modern
toolkits), and we have to take care of these things explicitly.

Simply do this by manually querying and using the parent window event
flags.

This restores some MPlayer behavior (it doesn't add back exactly the
same code, but it's very similar).

This probably has some potential to interfere with libmpv embedding, so
bump the client API minor.

CC: @mpv-player/stable (if applied, client-api-changes.rst has to be
    adjusted to include the 0.5.2 release)
2014-08-31 14:48:26 +02:00
Otto Modinos a910b5c6df lua: expose mp_getcwd through mp.utils 2014-08-31 00:58:27 +02:00
wm4 8956878448 manpage: be more explicit about "estimated-..." properties
In particular, use the note markup. The issue about rounded timestamps
is mostly with respect to Matroska (which usually rounds them to
milliseconds), which somewhat adds to the reliability issue.
2014-08-31 00:22:01 +02:00
wm4 8599c959fe video: initial Matroska 3D support
This inserts an automatic conversion filter if a Matroska file is marked
as 3D (StereoMode element). The basic idea is similar to video rotation
and colorspace handling: the 3D mode is added as a property to the video
params. Depending on this property, a video filter can be inserted.

As of this commit, extending mp_image_params is actually completely
unnecessary - but the idea is that it will make it easier to integrate
with VOs supporting stereo 3D mogrification. Although vo_opengl does
support some stereo rendering, it didn't support the mode my sample file
used, so I'll leave that part for later.

Not that most mappings from Matroska mode to vf_stereo3d mode are
probably wrong, and some are missing.

Assuming that Matroska modes, and vf_stereo3d in modes, and out modes
are all the same might be an oversimplification - we'll see.

See issue #1045.
2014-08-30 23:24:46 +02:00
wm4 c80adac077 cache_file: add a mode that creates a temporary file
Since we have to be portable, our options for creating temporary files
are somewhat limited. tmpfile() happens to be available everywhere, so
use that. This function doesn't allow having a "visible" filename or
location, so we use the magic string "TMP" for this.
2014-08-30 20:03:31 +02:00
wm4 829fdef219 player: reduce default demuxer cache
A (hopefully) temporary hack to make stream switching delays tolerable.
It's not clear how this should be handled (either executing a precise
seek on track switching, or always enabling all streams), so get this
issue out of the way for now by picking a rather low value.
2014-08-30 19:37:21 +02:00
wm4 948dfe651d manpage: document that --cache-file doesn't work with ordered chapters 2014-08-30 19:17:44 +02:00
wm4 ce93ee8bd0 manpage: fix minor grammar issue 2014-08-29 20:56:08 +02:00
wm4 e47a9bd721 command: export demuxer cache info properties 2014-08-28 17:49:10 +02:00
wm4 0b428e4482 player: redo how stream caching and pausing on low cache works
Add the --cache-secs option, which literally overrides the value of
--demuxer-readahead-secs if the stream cache is active. The default
value is very high (10 seconds), which means it can act as network
cache.

Remove the old behavior of trying to pause once the byte cache runs
low. Instead, do something similar wit the demuxer cache. The nice
thing is that we can guess how many seconds of video it has cached,
and we can make better decisions. But for now, apply a relatively
naive heuristic: if the cache is below 0.5 secs, pause, and wait
until at least 2 secs are available.

Note that due to timestamp reordering, the estimated cached duration
of video might be inaccurate, depending on the file format. If the
file format has DTS, it's easy, otherwise the duration will seemingly
jump back and forth.
2014-08-27 03:39:04 +02:00
Bin Jin 08b5dccd12 vo_opengl: add parameter to gaussian filter
Add a new parameter 'p' to gaussian filter. The new formula used
 a different base taken from fmtconv plugin, so that the
 new parameter is exactly same as the one used in Avisynth and
 Vapoursynth.

 The new default value is 2 / log(2) * 10, with the default value it
 conforms to the original kernel taken from vector-agg.
2014-08-26 22:19:32 +02:00
Bin Jin b3e788d3f4 vo_opengl: add radius options for filters
Add two new options, make it possible for user to set the radius
for some of the filters with no fixed radius.

Also add three new filters with the new radius parameter supported.
2014-08-26 22:19:30 +02:00
Bin Jin f14722a40f vo_opengl: add cparam1 and cparam2 options
Although cscale is rarely used, it's possible that params of cscale
are accidentally set to lparam1 and lparam2, which might cause
unexpected results.
2014-08-26 22:19:27 +02:00
Otto Modinos cc971c06f4 manpage: mention that mp.commandv doesn't expand properties
The little lua snippet at #488 as well as the actual implementation
seems to indicate that not expanding properties is indeed the correct
behavior.  Document that.

Signed-off-by: wm4 <wm4@nowhere>
2014-08-25 22:18:25 +02:00
wm4 12509fabc7 options: compatibility hack for --slave-broken
Seems some programs were still relying on it. Whatever, it's not hard to
support.

CC: @mpv-player/stable
2014-08-25 00:48:55 +02:00
wm4 26500425f6 ao_dsound: raise default buffer size to 200ms, make it configurable 2014-08-22 16:12:47 +02:00
Bin Jin aeb3f08280 manpage: remove duplicated content
Probably be accidentally added in b6b8bffd.

CC: @mpv-player/stable
Signed-off-by: wm4 <wm4@nowhere>
2014-08-22 14:22:06 +02:00
Alexander Preisinger 631be0774d options.rst: fix warning 2014-08-20 16:44:19 +02:00
Andrey Morozov 1cb15316b0 command: add estimated-frame-count & estimated-frame-number properties
Signed-off-by: wm4 <wm4@nowhere>
2014-08-19 21:47:14 +02:00
wm4 39b8b0a41f manpage: fix opengl-hq defaults
The FBO format was changed some time ago.

CC: @mpv-player/stable
2014-08-18 02:05:06 +02:00
wm4 0cee4498f1 DOCS/tech-overview.txt: some updates 2014-08-18 01:21:13 +02:00
wm4 761037dcc6 video: enable framedropping by default 2014-08-17 02:51:13 +02:00
wm4 925c431ff7 demux: enable thread by default
And change the defaults for the other queue options to reduce latency.
2014-08-16 17:15:51 +02:00
wm4 b822faa6cf demux: add option to control the readahead buffer by a duration value
--demuxer-readahead-secs now controls how much the demuxer should
readahead by an amount of seconds. This is based on the raw packet
timestamps. It's not always very exact. For example, h264 in Matroska
does not store any linear timestamps (only PTS values which are going
to be reordered by the decoder), so this heuristic is usually off by
several hundred milliseconds.

The decision whether to readahead is basically OR-ed with the other
--demuxer-readahead-packets options. Change the manpage descriptions
to subtly convey these semantics.
2014-08-16 17:10:08 +02:00
wm4 4f984b987c video: add --display-fps switch to control framedrop FPS
Since the display FPS is currently detected on X11 only (and even there
it's known to be wrong on certain setups), it seems like a good idea to
make this user-configurable.
2014-08-16 00:05:02 +02:00
wm4 07aba86b37 audio: add a mode to insert silence on severe A/V desync
This is probably a stupid idea, but it can't be denied that this
actually allows playing video without larger desync, even if video is
too slow.
2014-08-15 23:52:42 +02:00
wm4 72ee9bb56c vo_opengl: optional support for using GLX_SGI_video_sync
I'm not sure about the merit, though it does print nice numbers if debug
output is enabled.

Basically, this tries to achieve similar results as the glFinish()
business, but again it entirely depends on the drivers whether this
does anything meaningful, or whether it's actively harmful.
2014-08-15 23:36:13 +02:00
wm4 4a297554bc vo_opengl: if glfinish is used, also call it after swappping
It seems that at least on nvidia systems with composting disabled, we
can get it to block deterministically on the actual vsync event, which
should improve framedropping.
2014-08-15 23:36:02 +02:00
wm4 543ba6c114 video: add VO framedropping mode
This mostly uses the same idea as with vo_vdpau.c, but much simplified.

On X11, it tries to get the display framerate with XF86VM, and limits
the frequency of new video frames against it. Note that this is an old
extension, and is confirmed not to work correctly with multi-monitor
setups. But we're using it because it was already around (it is also
used by vo_vdpau).

This attempts to predict the next vsync event by using the time of the
last frame and the display FPS. Even if that goes completely wrong,
the results are still relatively good.

On other systems, or if the X11 code doesn't return a display FPS, a
framerate of 1000 is assumed. This is infinite for all practical
purposes, and means that only frames which are definitely too late are
dropped. This probably has worse results, but is still useful.

"--framedrop=yes" is basically replaced with "--framedrop=decoder". The
old framedropping mode is kept around, and should perhaps be improved.
Dropping on the decoder level is still useful if decoding itself is too
slow.
2014-08-15 23:33:33 +02:00
wm4 d5940fabcd sub: add option to workaround broken mkv files
See additions to options.rst.
2014-08-14 23:59:35 +02:00
wm4 defa0a20e0 af_lavcac3enc: lower minimum channel number to 3
It seems only stereo PCM should be passed through.
2014-08-12 23:45:41 +02:00
FRAU KOUJIRO 060ba226e6 docs: cocoa example uses wakeup callback API
Also, imitate the qt example somewhat.
2014-08-12 23:40:58 +02:00
FRAU KOUJIRO dcf4ee905b docs: simple cocoa API usage example 2014-08-12 23:40:55 +02:00
wm4 be792c085a af_lavcac3enc: change default bitrate to 640
No reason to use less.

Since the name "default" is misleading now, replace it with "auto"
(still recognize the old name).
2014-08-12 23:34:28 +02:00
wm4 df58e82237 video: move display and timing to a separate thread
The VO is run inside its own thread. It also does most of video timing.
The playloop hands the image data and a realtime timestamp to the VO,
and the VO does the rest.

In particular, this allows the playloop to do other things, instead of
blocking for video redraw. But if anything accesses the VO during video
timing, it will block.

This also fixes vo_sdl.c event handling; but that is only a side-effect,
since reimplementing the broken way would require more effort.

Also drop --softsleep. In theory, this option helps if the kernel's
sleeping mechanism is too inaccurate for video timing. In practice, I
haven't ever encountered a situation where it helps, and it just burns
CPU cycles. On the other hand it's probably actively harmful, because
it prevents the libavcodec decoder threads from doing real work.

Side note:

Originally, I intended that multiple frames can be queued to the VO. But
this is not done, due to problems with OSD and other certain features.
OSD in particular is simply designed in a way that it can be neither
timed nor copied, so you do have to render it into the video frame
before you can draw the next frame. (Subtitles have no such restriction.
sd_lavc was even updated to fix this.) It seems the right solution to
queuing multiple VO frames is rendering on VO-backed framebuffers, like
vo_vdpau.c does. This requires VO driver support, and is out of scope
of this commit.

As consequence, the VO has a queue size of 1. The existing video queue
is just needed to compute frame duration, and will be moved out in the
next commit.
2014-08-12 23:24:08 +02:00
wm4 a1be3cf147 DOCS: mark the recent release in client-api-changes.rst
Also add instructions to release-policy.md, since this can be easily
forgotten.

CC: @mpv-player/stable
2014-08-12 23:01:19 +02:00
wm4 3f353f1219 input.conf: make explanatory text more readable
Or at leats this is the intention. It's a bit hard to tell which
information is needed, and which not.
2014-08-11 23:32:37 +02:00
wm4 bead9766bc manpage: update keybindings 2014-08-11 21:56:37 +02:00
wm4 f9d2ad6c17 Move status-line.lua
Looks like TOOLS/lua/ is now established as dumping ground for random
Lua scripts, so DOCS/lua_examples/ is not needed anymore.
2014-08-11 17:08:32 +02:00
wm4 8dfe0c73c9 video: remove "hard" framedrop mode
Completely useless, and could accidentally be enabled by cycling
framedrop modes. Just get rid of it.

But still allow triggering the old code with --vd-lavc-framedrop, in
case someone asks for it. If nobody does, this new option will be
removed eventually.
2014-08-09 00:35:35 +02:00
wm4 c4feba847c manpage: update key bindings 2014-08-08 12:06:01 +02:00
Alexander Preisinger b6b8bffd2d manpage: add sections and order by usage
Split the options into the following sections:

 * Playback Control
 * Program Behaviour
 * Video
 * Audio
 * Subtitles
 * Window
 * Disc Devices
 * Equalizer
 * Demuxer
 * Input
 * OSD
 * Screenshot
 * Software Scaler
 * Terminal
 * TV
 * Cache
 * Network
 * DVB
 * PVR
 * Miscellaneous

Most options are sorted by usefullness and how often they're used or how
important they are.
This makes finding the right options easier and adds some sort of structure.
2014-08-08 08:30:06 +02:00
wm4 fa682af6ee command: add a "seeking" property
The client API exports this state via events already, but maybe it's
better to explicitly provide this property in order to facilitate use on
OSD and similar cases.
2014-08-08 00:16:20 +02:00
wm4 483595e2d4 client API: qtexample: don't pass deallocated strings to mpv
The temporary QByteArray is deallocated already at the end of the
statement in C++, instead of the end of the scope (like in C).
2014-08-07 00:35:38 +02:00
wm4 43ddf2099b client API: add and use the MPV_MAKE_VERSION macro
This is probably nicer. The actual version number doesn't change (other
than the minor being incremented).

The "| 0UL" is to make the type unsigned long int, like it was before.
2014-08-05 02:23:14 +02:00
wm4 0f5aed9c62 player: some further playloop cleanups
Handle --term-playing-msg at a better place.

Move MPV_EVENT_TICK hack into a separate function. Also add some words
to the client API that you shouldn't use it. (But better leave breaking
it for later.)

Handle --frames and frame_step differently. Remove the mess from the
playloop, and do it after frame display. Give up on the weird semantics
for audio-only mode (they didn't make sense anyway), and adjust the
manpage accordingly.
2014-08-03 20:31:00 +02:00
wm4 27301ee691 manpage: be more explicit where input.conf is located 2014-08-02 06:57:36 +02:00
wm4 0c6c2da8bc manpage: explain how to replace --slave-broken 2014-08-02 03:12:33 +02:00
wm4 be337aa415 command: add a property that returns a list of all properties
Also remove the undocumented Lua mp.property_list() function.
2014-08-02 01:53:21 +02:00
wm4 16e5ec88e1 manpage: remove duplicated misplaced description of a command 2014-08-02 01:53:18 +02:00
wm4 bf5b1e9a05 Remove the last remains of slave mode
Almost nothing was left of it.

The only thing this commit actually removes is support for reading
input commands from stdin. But you can emulate this via:

 --input-file=/dev/stdin --input-terminal=no

However, this won't work on Windows. Just use a named pipe.
2014-08-01 22:57:56 +02:00
wm4 c1b64cc693 command: add cache-idle property 2014-07-31 04:25:39 +02:00
wm4 f8ab732ac3 video/filter: add vf_buffer
Mostly useful for debugging.
2014-07-30 23:29:00 +02:00
wm4 6afa1a2afc ao_alsa: disable use of non-interleaved formats by default
Some ALSA plugins take non-interleaved audio, but treat it as
interleaved, which results in various funny bugs. Users keep hitting
this issue, and it just doesn't seem worth the trouble.

CC: @mpv-player/stable
2014-07-30 23:28:44 +02:00
wm4 26d973ce82 stream_lavf: allow setting AVOptions with --stream-lavf-o
This commit also creates a private option struct for stream_lavf.c, but
since I'm lazy, I'm not moving any existing options to it.
2014-07-30 01:15:42 +02:00
wm4 ecad4a20de manpage: lua: document timer timeout and oneshot fields
Might be useful for scripts, so document them. (Which means scripts
are allowed to use them, without risking breakage.)
2014-07-29 00:22:21 +02:00
wm4 bc6359313f ao_pulse: allow disabling timing bug workarounds
Add an option that enables using native PulseAudio auto-updated timing
information, instead of the manual calculations added in mplayer2 times.
You can use --ao=pulse:no-latency-hacks to enable the new code. The code
is almost the same as the code that was removed with commit de435ed5,
but I didn't readd some bits I didn't understand. Likewise, the option
will disable the code added with that commit.

In my tests this seemed to work well, though the A/V sync display looks
funny when seeking.

The default is still the old behavior.

See issue #959.
2014-07-26 23:20:09 +02:00
wm4 3c7675ae9a manpage: eliminate the word "movie"
It's evil and sounds outdated. Use the words "media" and "video"
instead.

Closes #935.
2014-07-26 23:19:47 +02:00
wm4 cb4aa2df92 manpage: fix a typo 2014-07-24 15:25:24 +02:00
wm4 843f5f4723 command: add append-play loadfile mode
"loadfile filename append-play" will now always append the file to the
playlist, and if nothing is playing yet, start playback. I don't want to
change the semantics of "append" mode, so a new mode is needed.

Probably fixes issue #950.
2014-07-23 00:20:53 +02:00
wm4 aa1a383342 sub: add detection via BOM
Useful for Windows stuff. Actually, ENCA support should catch this, but,
well, whatever, everyone seems to hate ENCA.

Detection with BOM is trivial, although it needs some hackery to
integrate it with the existing autodetection support. For one, change
the default value of --sub-codepage to make this easier.

Probably fixes issue #937 (the second part).
2014-07-22 23:40:48 +02:00
wm4 b6dd1341d2 manpage: correct the --mf options
The MPlayer style syntax ("-mf fps=10:type=png") was removed a while
ago, and now only the flat variants ("--mf-fps=10" etc.) work.

CC: @mpv-player/stable
2014-07-21 19:27:15 +02:00
wm4 ba621ac140 manpage: fix wording for --aid 2014-07-20 20:47:03 +02:00
wm4 11944e0b83 manpage: fix documented default for --demuxer-thread 2014-07-17 01:50:29 +02:00
wm4 1301a90761 demux: add a demuxer thread
This adds a thread to the demuxer which reads packets asynchronously.
It will do so until a configurable minimum packet queue size is
reached. (See options.rst additions.)

For now, the thread is disabled by default. There are some corner cases
that have to be fixed, such as fixing cache behavior with webradios.

Note that most interaction with the demuxer is still blocking, so if
e.g. network dies, the player will still freeze. But this change will
make it possible to remove most causes for freezing.

Most of the new code in demux.c actually consists of weird caches to
compensate for thread-safety issues (with the previously single-threaded
design), or to avoid blocking by having to wait on the demuxer thread.

Most of the changes in the player are due to the fact that we must not
access the source stream directly. the demuxer thread already accesses
it, and the stream stuff is not thread-safe.

For timeline stuff (like ordered chapters), we enable the thread for the
current segment only. We also clear its packet queue on seek, so that
the remaining (unconsumed) readahead buffer doesn't waste memory.

Keep in mind that insane subtitles (such as ASS typesetting muxed into
mkv files) will practically disable the readahead, because the total
queue size is considered when checking whether the minimum queue size
was reached.
2014-07-16 23:25:56 +02:00
Alessandro Ghedini 712cf3342e DOCS/release-policy: mention the release version in the RELEASE_NOTES template
Also suggest adding changes in point releases to RELEASE_NOTES as well.
2014-07-13 15:03:47 +02:00
wm4 5d3f1a17a7 DOCS/tech-overview: minor updates 2014-07-09 02:14:23 +02:00
wm4 acd60736ef Remove stream_pts stuff
This was used by DVD/BD, but its usage was removed with one of the
previous commits.
2014-07-06 19:05:59 +02:00
wm4 a90b5cfddf DOCS/client-api-changes: try to fix rst formatting again 2014-07-06 19:05:45 +02:00
wm4 e21ecaa18d DOCS, client API: add mpv release versions
The intention is to make it obvious which mpv releases certain changes
will apply to.

Also attempt to fix RST formatting of the list. This is not very proper,
but probably good enough.
2014-07-05 17:07:14 +02:00
wm4 fe4fbb5775 DOCS/client_api_examples: add a Qt example
This is pretty dumb and extremely basic. The main purpose is
demonstrating how to integrate mpv into the Qt GUI thread.
2014-07-04 02:24:49 +02:00
wm4 0004aaf788 DOCS: add a file listing API changes for the client API 2014-07-03 01:26:19 +02:00
Stefano Pigozzi 0bda8f48e2 manpage: reflect new coreaudio changes 2014-07-02 23:17:44 +02:00
Andrey Morozov b1969c0eba command: change cache perentage to float, add cache-free and cache-used 2014-07-02 01:28:11 +02:00
Alessandro Ghedini ab241c05c8 options: add --list-protocols option 2014-06-30 23:20:10 +02:00
Tsukasa OMOTO 1aef780b6c options: support setting start time relative to start PTS
Signed-off-by: wm4 <wm4@nowhere>
2014-06-29 20:39:49 +02:00
Tsukasa OMOTO a73415584c player: make the time display relative to start PTS
This commit makes the playback start time always at time 0.

Signed-off-by: wm4 <wm4@nowhere>
2014-06-29 20:39:49 +02:00
wm4 6eb955e274 manpage: update config file locations
Also add some explanations how the config paths are determined.
2014-06-28 15:55:09 +02:00
Alessandro Ghedini 02e0882b60 DOCS: add document describing the release policy and procedure 2014-06-25 18:46:25 +02:00
wm4 5dd0193d1f manpage: update changed defaults from previous commit
Oops.
2014-06-23 01:23:43 +02:00
Niklas Haas 664f8e9832 video: Include better heuristics for guessing primaries
These consult the vertical resolution, matching against 576 for
PAL and 480/486 for NTSC. The documentation has also been updated.

Signed-off-by: wm4 <wm4@nowhere>
2014-06-22 19:05:43 +02:00
Niklas Haas fbd35caef8 video: Refactor rendering intent for DCP XYZ and :srgb
Notably, we now conform to SMPTE 428-1-2006 when decoding XYZ12 input,
and we can support rendering intents other than colorimetric when
converting between BT.709 and BT.2020, like with :srgb or :icc-profile.
2014-06-22 19:02:06 +02:00
Niklas Haas 204fed4d5b video: Support BT.2020 constant luminance system
Signed-off-by: wm4 <wm4@nowhere>
2014-06-22 19:02:00 +02:00
Niklas Haas ef6db24366 options: Expose --colormatrix-primaries to the user
Signed-off-by: wm4 <wm4@nowhere>
2014-06-22 19:01:25 +02:00
Niklas Haas 70f50ddc5e video: Add support for non-BT.709 primaries
This add support for reading primary information from lavc, categorized
into BT.601-525, BT.601-625, BT.709 and BT.2020; and passes it on to the
vo. In vo_opengl, we always generate the 3dlut against the wider BT.2020
and transform our source into this colorspace in the shader.
2014-06-22 19:00:38 +02:00
Niklas Haas 86d3d11a68 video: Add BT.2020-NCL colorspace and transfer function
Source: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-I!!PDF-E.pdf
2014-06-22 19:00:38 +02:00
wm4 5b8298376b stream: add a file cache
For remarks, pretty much see the manpage additions. Could help with
network streams that require too much seeking (maybe), or might be
extended to help with the use case of watching and downloading a file
at the same time.

In general, it might be a useless feature and could be removed again.
2014-06-22 05:04:05 +02:00
wm4 f5e1756475 DOCS: remove en/ sub-directory
This additional sub-directory doesn't serve any purpose anymore. Get rid
of it.
2014-06-20 23:01:12 +02:00
wm4 199e3b2763 manpage: explicitly document protocols 2014-06-20 22:52:16 +02:00
wm4 689aae56b6 manpage: remove some trailing whitespace
I wish I could make github run a hook to reject these.
2014-06-20 22:45:03 +02:00
wm4 af6ecb0256 manpage: remove bogus significant whitespace
Made the first line formatted differently.
2014-06-18 15:48:22 +02:00
wm4 c048b5db02 options: allow adding multiple files with --audio-file
At least 1 person expected that this works this way.
2014-06-18 01:58:05 +02:00
wm4 2827ff1eab DOCS/contribute.md: move instructions for sending patches to the top
Separate to not confuse git history tracking.
2014-06-17 23:18:13 +02:00
wm4 ed1250b080 DOCS: remove coding-style.md to contribute.md
I wonder if this is better. The intention is to make the instructions
for sending patches more visible.
2014-06-17 23:15:39 +02:00
wm4 63266d4372 sub: add --sub-scale-with-window option
Implements the feature requested in #839 and #186.
2014-06-14 19:17:31 +02:00
wm4 98a31d5937 options: turn --idx, --forceidx into --index
Also clarify the semantics.

It seems --idx didn't do anything. Possibly it used to change how the
now removed legacy demuxers like demux_avi used to behave. Or maybe
it was accidental.

--forceidx basically becomes --index=force. It's possible that new
index modes will be added in the future, so I'm keeping it
extensible, instead of e.g. creating --force-index.
2014-06-13 02:05:37 +02:00
wm4 be5725ebc4 input: make option struct local
Similar to previous commits.

This also renames --doubleclick-time to --input-doubleclick-time, and
--key-fifo-size to --input-key-fifo-size. We could keep the old names,
but these options are very obscure, and renaming them seems better for
consistency.
2014-06-11 01:54:03 +02:00
wm4 fd5207f56d options: remove global variables for swscale options; rename them
Additionally to removing the global variables, this makes the options
more uniform. --ssf-... becomes --sws-..., and --sws becomes --sws-
scaler. For --sws-scaler, use choices instead of magic integer values.
2014-06-11 00:39:13 +02:00
wm4 959b718957 stream_dvb: remove global option variables 2014-06-11 00:35:03 +02:00
wm4 77a7aa2c41 stream_cdda: remove global option variables 2014-06-11 00:34:46 +02:00
wm4 73ac34b220 stream_pvr: remove global option variables 2014-06-11 00:34:42 +02:00
wm4 383cf20785 tv: remove global option variables
Pretty much nothing changes, but using -tv-scan with suboptions doesn't
work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat
options ("-tv-scan-x") stay compatible.
2014-06-11 00:34:42 +02:00
wm4 e033f3c8bc command: redo ancient TV/DVB/PVR commands
Convert all these commands to properties. (Except tv_last_channel, not
sure what to do with this.) Also, internally, don't access stream
details directly, but dispatch commands with stream ctrls.

Many of the new properties are a bit strange, because they're write-
only. Also remove some OSD output these commands produced, because I
couldn't be bothered to port these.

In general, this makes everything much cleaner, and will also make it
easier to e.g. move the demuxer to its own thread.

Don't bother updating input.conf, but changes.rst documents how old
commands map to the new ones.

Mostly untested, due to lack of hardware.
2014-06-11 00:34:41 +02:00
wm4 3e2f16a89e audio: add a "weak" gapless mode, and make it default
Basically, this allows gapless playback with similar files (including
the ordered chapter case), while still being robust in general.

The implementation is quite simplistic on purpose, in order to avoid
all the weird corner cases that can occur when creating the filter
chain. The consequence is that it might do not-gapless playback in
more cases when needed, but if that bothers you, you still can use
the normal gapless mode.

Just using "--gapless-audio" or "--gapless-audio=yes" selects the old
mode.
2014-06-09 01:20:53 +02:00
wm4 f118d2af6a manpage: document new --sub-file semantics
This was forgotten in the previous commit.
2014-06-08 00:20:58 +02:00
wm4 fca608ccb9 client API: rename mpv_destroy() to mpv_detach_destroy()
A bit verbose, but less misleading. In most cases, the API user probably
actually wants mpv_terminate_destroy() instead, so the less-useful
function shouldn't have a simnpler name anyway.
2014-06-07 20:25:48 +02:00
wm4 b4c1699aaf sub: remove old style override option
Didn't work too well.
2014-06-05 01:10:48 +02:00
wm4 015399f696 sub: add --ass-style-override=force option
(The old "force" choice of that option is renamed to "force-default".)

This allows overriding native ASS script subtitle styles with the style
provided by the --sub-text-* options (like --sub-text-font etc.). This
is disabled by default, and needs to be explicitly enabled with the
--ass-style-override=force option and input property.

This uses in fact exactly the same options (--sub-text-*) and semantics
as the ones used to configure unstyled text subtitles.

It's recommended to combine this with this in the mpv config file:

ass-force-style="ScaledBorderAndShadow=1"   # work around dumb libass behavior

Also, adding a key binding to toggle this behavior should be added,
because overriding can easily break:

L cycle ass-style-override

This would cycle override behavior on Shift+L and allows quickly
disabling/enabling style overrides.

Note: ASS should be considered a vector format rather than a subtitle
format. There is no easy or reliable way to determine whether the style
of a given subtitle event can be changed without destroying visuals or
not. This patch relies on a simple heuristic, which often works and
often breaks.
2014-06-05 01:10:37 +02:00
Alessandro Ghedini f2a00f3de3 player: write file name to the watch later config file
This simply writes the file name as a comment to the top of the watch later
config file.

It can be useful to the user for determining whether a watch later config file
can be manually removed (e.g. in case the corresponding media file has been
deleted) or not.
2014-06-01 19:55:45 +02:00
wm4 a192f32a3a stream: remove VCD support
If a single person complains, I will readd it. But I don't expect that
this will happen.

The main reason for removing this is that it's some of the most unclean
code remaining, it's unmaintained, and I've never ever heard of someone
using it.
2014-06-01 17:22:21 +02:00
wm4 9f6e8d64de ao_alsa: make device the first sub option
This is more convenient.
2014-05-31 01:40:12 +02:00
wm4 96bc188172 manpage: document write_watch_later_config command 2014-05-27 21:58:06 +02:00
wm4 6f20d6b74e lua: fix compilation with lua 5.2
Commit e2e450f9 started making use of luaL_register(), but OF COURSE
this function disappeared in Lua 5.2, and was replaced with a 5.2-only
alternative, slightly different mechanism.

So just NIH our own function. This is actually slightly more correct,
since it forces the user to call "require" to actually make the module
visible for builtin C-only modules other than "mp". Fix autoload.lua
accordingly.
2014-05-26 21:59:29 +02:00
Martin 9c18a920ff command: add write_watch_later_config command
Closes #808.

Signed-off-by: wm4 <wm4@nowhere>
2014-05-26 21:59:17 +02:00
wm4 2309bb91cc DOCS/coding-style: add a hint that new features should be documented 2014-05-25 19:52:51 +02:00
wm4 e2e450f961 lua: add some filesystem utility functions
We need this only because Lua's stdlib is so scarce. Lua doesn't intend
to include a complete stdlib - they confine themselves to standard C,
both for portability reasons and to keep the code minimal. But standard
C does not provide much either.

It would be possible to use Lua POSIX wrapper libraries, but that would
be a messy (and unobvious) dependency. It's better to implement the
missing functions ourselves, as long as they're small in number.
2014-05-25 19:51:11 +02:00
wm4 e648f7e783 manpage: lua: cosmetic changes to mp.options section 2014-05-25 19:43:25 +02:00
ChrisK2 30fc1a42be osc: fix chapter list display
also fix small typo in DOCS
2014-05-24 17:47:31 +02:00
wm4 6125ba613f video: add --video-rotate option for controlling auto-rotation 2014-05-24 16:17:52 +02:00
wm4 e3c20bf350 stream: kill start_pos, remove --sb option
stream.start_pos was needed for optical media only, and (apparently) not
for very good reasons. Just get rid of it.

For stream_dvd, we don't need to do anything. Byte seeking was already
removed from it earlier.

For stream_cdda and stream_vcd, emulate the start_pos by offsetting the
stream pos as seen by the rest of mpv.

The bits in discnav.c and loadfile.c were for dealing with the code
seeking back to the start in demux.c. Handle this differently by
assuming the demuxer is always initialized with the stream at start
position, and instead seek back if initializing the demuxer fails.

Remove the --sb option, which worked by modifying stream.start_pos. If
someone really wants this option, it could be added back by creating a
"slice" stream (actually ffmpeg already has such a thing).
2014-05-24 16:17:50 +02:00
Alessandro Ghedini cec9613505 manpage: update references to renamed options 2014-05-23 21:14:22 +02:00
ChrisK2 ce69afab44 lua/osc: forgot some changed files in previous commit 2014-05-23 13:24:27 +02:00
wm4 cb2e784c07 player: give quit_watch_later an exit code argument like quit
The quit command has an optional argument that is used as exit code.
Extend that to the quit_watch_later command. Actually, unify the
implementations of the two commands.

Requested in #798.
2014-05-22 21:28:20 +02:00
wm4 2f65f0e254 input: allow disabling window dragging with --no-window-dragging
Requested in github issue #608.
2014-05-20 02:40:28 +02:00
wm4 7dc74bab32 manpage: mention bdnav:// 2014-05-20 02:40:28 +02:00
wm4 4664f8b3b7 cache: redo options and default settings
Some options change from percentages to number of kilobytes; there are
no cache options using percentages anymore.

Raise the default values. The cache is now 25000 kilobytes, although if
your connection is slow enough, the maximum is probably never reached.
(Although all the memory will still be used as seekback-cache.)

Remove the separate --audio-file-cache option, and use the cache default
settings for it.
2014-05-20 02:40:22 +02:00
wm4 0a4adce00c etc/input.conf: add example how to change window size by key binding
Also drop a vague hint how to do it in the manpage.
2014-05-18 22:22:33 +02:00
wm4 e209e44ca2 manpage: fix a minor aspect of the discnav command
"menu" is in fact understood by stream_bluray.c, so just drop that
sentence.
2014-05-18 14:09:38 +02:00
wm4 dc96523536 manpage: document discnav command 2014-05-18 00:03:59 +02:00
wm4 5841685e09 command: add a disc-menu-active property
Returns whether a DVD/BD menu is active. As requested by #788.
2014-05-18 00:03:47 +02:00
wm4 faeaa6c358 x11: implement --fs-screen properly, separate old code path
Try to get the "new" code path (using NetWM/EWMH) free of hacks done for
the sake of old WMs or the no-WM case.

Implement --fs-screen using _NET_WM_FULLSCREEN_MONITORS.
2014-05-17 01:14:59 +02:00
wm4 ebd5bbd241 x11: replace--[x11-]fstype option with --x11-netwm
Simplifies the code a lot. You can still use --x11-netwm=no to disable
NetWM for whatever reasons.
2014-05-16 00:47:13 +02:00
wm4 a5e22c70e8 manpage: changes.rst: minor fixups 2014-05-15 14:49:19 +02:00
wm4 bc6959c35d vf_vapoursynth: allow parallel processing
VapourSynth won't just filter multiple frames at once on its own. You
have to request multiple frames at once manually. This is what this
commit introduces: a sub-option controls how many frames will be
requested at once. This also changes the semantics of the maxbuffer sub-
option, now renamed to buffered-frames.
2014-05-14 20:42:04 +02:00
wm4 d6774515a7 manpage: updates changes.rst
The situation has changed a bit since the days of mplayer2, so we can
use more/less diplomatic wording. Merge the two sections listing
changes from MPlayer and mplayer2. Mention the client API and Lua
scripting as alternatives to slave mode.

I'm calling MPlayer code "horrible". This is not meant as an offense,
but after turning around almost every line of MPlayer code, I believe
I have a right to say this. Sorry. I would say that MPlayer has a
surprisingly sane and simple architecture (for what it is), but much
of it drowned under a load of evil hacks or not-cleaned-up-yet code.
2014-05-14 20:42:04 +02:00
wm4 7cab9ea2fa manpage: update --playlist entry 2014-05-11 16:51:33 +02:00
wm4 f5be96a6e5 manpage: minor corrections 2014-05-11 15:42:12 +02:00
wm4 31663beeac input: remove pausing command prefixes
These are now equivalent to combining commands with the "cycle pause" or
"set pause" commands, and thus are not needed anymore. They were also
obscure and undocumented.
2014-05-11 15:41:34 +02:00
Kevin Mitchell aee35666c1 man: tweak --sub-codepage for concision
The many "boxes" in this entry were causing rst2pdf to fail because it
couldn't figure out where to break the page. Make the boxes smaller by
removing semi-redundant examples. Also try and make surrounding text a
little shorter by rewording.
2014-05-09 00:56:01 -07:00
wm4 996ab61a6a command: add property that estimates current video FPS
This is done after filters, so things like framerate-doubling
deinterlacing is accounted for.

Unfortunately, framedropping can cause inaccuracies (especially after
precise seeks), and we can't really know when that happens. Even though
we know that the decoder might drop a frame if we request it to do so,
we don't know when the dropped frame will start or stop affecting the
video filter chain. Video filters can have frames buffered, and we
can't tell at which point the dropped frame would have been output.
It's not even possible to mark a discontinuity after seek, because
again we don't know if the filter chain still has the discontinuity
within its buffers.

So we have to live with the fact that the output of this property can
be completely broken after seek, unless --no-hr-seek-framedrop is used.
2014-05-08 01:25:48 +02:00
wm4 c57660fbf7 options: add --hr-seek-framedrop option
This allows disabling of decoder framedrop during hr-seek.

It's basically another useless option, but it will help exploring
whether this framedropping really makes seeking faster, or whether
disabling it helps with precise seeking (especially frame backstepping).
2014-05-07 22:05:30 +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 aa2a9c3e42 manpage: fix vf_scale options 2014-05-04 16:07:01 +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
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 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 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 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
Kevin Mitchell 164cfeba56 man: grammar tweak of mp.add_timeout() 2014-04-29 08:31:44 -07:00
wm4 6b0b8368a4 vf_vapoursynth: use frame durations instead of _AbsoluteTime
Set _DurationNum/_DurationDen on each VS frame, instead of
_AbsoluteTime. The duration is the difference between the timestamp of
the frame and the next frame, and when receiving filtered VS frames, we
convert them back to an absolute PTS by summing them.

We pass the timestamps with microsecond resolution. mpv uses double for
timestamps internally, so we don't know the "real" timebase or FPS. VS
on the other hand uses fractions for frame durations. We can't pass
through the numbers exactly, but microseconds ought to be enough to be
even safe from accumulating rounding errors.
2014-04-28 22:23:32 +02:00
wm4 e8a996cede client API: add chapter change event
Also works for mpv_observe_property() on the "chapter" property.
2014-04-27 22:28:07 +02:00
wm4 2584dcc873 manpage: fix grammar 2014-04-26 13:28:31 +02:00