Commit Graph

36158 Commits

Author SHA1 Message Date
Alexander Preisinger 6de1cb2d59 wayland/common: improved error messages
The previous error message were not very usefull.
Also include a hint where to look for solutions.
2013-09-10 17:53:43 +02:00
wm4 fc18c1ba6e mplayer: print libquvi results in verbose mode
Helpful for debugging.
2013-09-10 17:21:59 +02:00
wm4 6a850b0264 quvi: restore playback position when switching formats
This simply issues a seek after reloading.
2013-09-10 16:50:19 +02:00
wm4 cf0e852fcd quvi: coerce libquvi 0.4 support into allowing format switching
libquvi 0.4 doesn't allow us listing the formats supported by a
streaming site without doing additional network accesses, so switching
formats was not supported with it. (It's different with libquvi 0.9.)

But the most important case is switching between SD and HD. Usually,
--quvi-format=default will get SD, while --quvi-format=best gives HD.
Use this, and pretend that an URL supported by libquvi 0.4 supports both
of these. "cycle quvi-format" will switch between these. If the user
specifies something else via --quvi-format, this is included in the list
of switchable formats additionally to "default" and "best".
2013-09-10 16:38:34 +02:00
wm4 c9a740fccd stream_bluray: return number of titles
So that the "titles" property returns the number of titles.
2013-09-10 15:39:48 +02:00
wm4 328b951019 command: make title property unavailable if there's no support
Instead of returning 0 if the stream doesn't have title info, make the
property unavailable.
2013-09-10 15:39:05 +02:00
wm4 316dfb93d7 stream: force demuxer of cached stream, fixes cdda:// + cache 2013-09-10 15:23:27 +02:00
wm4 bf71e28d6b mplayer: mentioned --list-options in --help output
It's annoying for users if you can't get a list of options with --help,
but on the other hand, printing all options would be overkill. So just
mentioned --list-options.
2013-09-10 15:19:37 +02:00
wm4 12efec7a48 Makefile: restore manpage dependency rules
Broken by commit 0054073.

Also add them to the pdf target.
2013-09-10 15:16:20 +02:00
wm4 12770d5407 manpage: various improvements
Took a superficial look at the manpage, and fixed whatever I spotted.
2013-09-10 15:12:25 +02:00
Alexander Preisinger 683e58066e wayland: update license headers 2013-09-09 18:37:33 +02:00
Alexander Preisinger b30ad057a5 wayland/shm: version detection that also works
The previous method would break on the next release. Because I am stupid.
2013-09-09 18:21:48 +02:00
Martin Herkt 005407338d Add PDF manual target
This builds a PDF version of the manpage using rst2latex
and pdflatex, and installs it to PREFIX/share/doc/mpv by
default.
2013-09-09 04:34:56 +02:00
wm4 1b4d9b26cb demux: keep title chapter tag in uppercase
This is generally more uniform.

Do the same for the file global title in demux_mkv.c, although that is
not strictly related to chapters.
2013-09-08 23:07:02 +02:00
wm4 f5195cc4e7 demux_mkv: support V_PRORES
Why not...

Code for demangling Matroska-style prores video packets inspired by
libavformat's Matroska demuxer.
2013-09-08 23:05:18 +02:00
Martin Herkt 3992e5dfca DOCS/crosscompile-mingw.txt: Update 2013-09-08 12:25:20 +02:00
Martin Herkt c9873ea06c Manpage: Fix formatting (mostly for PDF output) 2013-09-08 12:02:30 +02:00
Gabriel Peixoto 856c58aa9c find_subfiles: fix off-by-1 error
This could lead to a segfault, fixes #219

Signed-off-by: Gabriel Peixoto <gabrielrcp@gmail.com>
Signed-off-by: wm4 <wm4@nowhere>
2013-09-08 07:44:08 +02:00
wm4 35fd083828 demux: retrieve per-chapter metadata
Retrieve per-chapter metadata, but don't do much with it. We just make
the metadata of the _current_ chapter available as chapter-metadata
property. Returning the full chapter list with metadata would be no
problem, except that the property interface isn't really good with
structured data, so it's not available for now.

Not sure if it's worth it, but it was requested via github issue #201.
2013-09-08 07:43:23 +02:00
wm4 ba07000b88 demux: refactor tag handling
Make the code somewhat reuseable, instead of bound to a single demuxer
instance. The plan is to add support for per-chapter tags later.
2013-09-08 06:32:48 +02:00
wm4 1aae5981a7 core: remove a minor memory leak 2013-09-08 05:17:05 +02:00
wm4 222b8c6e02 demux_mkv: don't overflow packet queue when doing sub-preroll
Consider the cluster used for prerolling contains an insane amount of
subtitle packets. Then the demuxer packet queue would be full of
subtitle packets, and demux.c would refuse to read any further packets -
including video and audio packets, resulting in EOF. Since everything
involving Matroska and subtitles is 100% insane, this can actually
happen.

Fix this by putting a limit on the number of subtitle packets read by
preroll, and throw away any further packets if the limit is exceeded. If
this happens, the preroll mechanism will stop working, but the player's
operation is unaffected otherwise.
2013-09-08 05:09:16 +02:00
ChrisK2 7f398f833e osc: rename osd_font, add some glyphs
Cherry picked from various commits in lua_experiment by ChrisK2.

The metrics of the OSD symbols change slightly, possibly due to the
font editor that was used, and the metrics were not correct to begin
with. (But the real reason seems unknown.) Remove the rescaling of
the OSD font in ASS_USE_OSD_FONT, because the height more or less fits
now. (This change wasn't in the lua_experiment branch.)
2013-09-08 03:35:04 +02:00
wm4 9a1978b2ee osd_libass: make sure Z-order is well defined for multiple events
Otherwise, events may overlap in arbitrary ways.
2013-09-08 03:20:38 +02:00
wm4 9ec9bff4c1 mplayer: cosmetics: split some code off of run_playloop()
run_playloop() is already stuffed enough. This function is still quite
big, but all the other code shares various variables, so it's not as
easy to split.
2013-09-08 03:04:21 +02:00
wm4 cecbd8864e mplayer: add --cursor-autohide-fs-only option
This option makes the cursor always visible in windowed mode.
Apparently, this is what (some?) Windows and OSX users expect. It's
disabled by default for now.

Restructure the cursor hide logic a bit for this purpose.
2013-09-08 03:03:58 +02:00
wm4 68e331851a options: remove --(no-)mouseinput option
I have no idea why it exists, as it's redundant to --(no-)mouse-movements.
2013-09-08 03:03:58 +02:00
wm4 0509532d70 options: cosmetics: move cursor_autohide_delay definition
No functional changes.
2013-09-08 03:03:58 +02:00
wm4 f1b5198b35 input: rearrange code
Let all key events go through mp_input_feed_key() internally, and also
do double click and MP_INPUT_RELEASE_ALL handling there. Move
check_autorepeat() to where it's actually used.
2013-09-08 01:50:14 +02:00
wm4 ac927e39bf input: don't deliver mouse events if mouse area is not set
This caused the OSC to be always visible at startup on X11:
- EnterNotify event send a mouse event to input.c
- OSC has not completely initialized yet, and no mouse area is set
- mouse event is dispatched to "showhide" OSC section
- OSC becomes visible, regardless of mouse position

Fix this by treating the mouse area as empty if it's not set, instead of
infinite as it was before this commit. This means an input section must
set a mouse area to receive mouse events at all. We also have to change
the default section to receive mouse events with the new behavior.

Also, if MOUSE_MOVE is unmapped (or mapped to something that doesn't
parse), and produces no command, the mouse position wouldn't be updated
(because the mouse position is bound to input commands), so we have to
generate a dummy command in this case.

(This matters only for the OSC, On Screen Controller, which isn't merged
yet, so these changes shouldn't have much effect right now.)
2013-09-08 01:50:14 +02:00
wm4 0a9919fa2e input: merge consecutive mouse move events
Might give better behavior on load.
2013-09-08 01:49:59 +02:00
wm4 681e829793 input: split queue_add() function
Split it into queue_add_head() and queue_add_tail(). Gets rid of the
weird, rarely used boolean parameter.
2013-09-08 01:49:59 +02:00
wm4 6c19067362 input: redo what input events can be dropped
Until now, any command was dropped as soon as the input queue was full,
and the command was not an abort command (i.e. a command that exits the
player or goes to the next file).

This could cause issues with key down events (especially mouse buttons)
not being released.

Change it so that key up events can never be dropped. This is a bit
involved, because we know whether a key maps to an abort command only
after interpreting it, and interpreting it changes global state, which
in turn requires undoing the event if the input is dropped. Refactor
the code a bit to move more functionality into interpret_key() to make
this easier.
2013-09-08 01:49:59 +02:00
wm4 5f00c3cf20 input: remove separation between key and control queue
This is actually quite useless. It also allows the control queue to
starve the key queue, because the control queue is always checked first.
2013-09-08 01:49:57 +02:00
wm4 dd67b32acd example.conf: some modifications
Remove options which are too obscure and most likely not very useful in
general, or update them to something more modern. Add some comments
about how configuration files work in general.
2013-09-07 22:43:31 +02:00
wm4 c7ab8ea513 mplayer: don't auto-load explicitly loaded subtitle files
Even if a subtitle was explicitly loaded with -sub, it was still auto-
loaded (if auto-loading applied to that file). Fix this by explicitly
checking whether a file is already loaded.

The check is maximal naive and just compares the filenames as strings.
The change in find_subfiles.c is so that "-sub something.ass" happens to
work (auto-loading prepended a "./" to it, so the naive filename
comparison check didn't work).
2013-09-07 20:34:49 +02:00
wm4 dc475728e0 find_subfiles: don't auto-load .sub file if .idx file exists
External vobsubs usually come as .idx/.sub pairs. Loading the .idx file
implicitly loads the .sub file, whereas loading the .sub file will kind
of work, but miss important information such as subtitle resolution. Or
in other words, if the .idx file exists, adding the .sub file as track
is useless and confusing.

Explicitly remove .sub file from the auto-load suntitle list in these
cases. Standalone .sub files are still loaded.

We also drop that weird logic that excluded .utf8 files from being
loaded if -subcp was in use. I hope the associated use case didn't make
much sense to begin with. If not, we could still implement it properly,
instead of this weird hack.
2013-09-07 20:34:49 +02:00
wm4 580e925011 find_subfiles: some cleanups
Remove a crap assert() (what... either it can't happen, or it should
error or at least abort() if it can't be handled).

Remove some dead definitions.
2013-09-07 20:34:49 +02:00
wm4 fde0f40e87 find_subfiles: use stat() instead of opening the file to check existence
Use mp_path_exists() to check for existence of a file (which in turn
uses stat()), instead of opening and closing it. The difference is that
if we don't have sufficient permissions to read the subtitle files, we
will loudly complain. Personally, I prefer this behavior.
2013-09-07 20:34:49 +02:00
wm4 9d0d2443fb find_subfiles: don't try to open URLs as directories
Did things like opendir("http://..."). Makes no sense, and just
generates noise.
2013-09-07 20:34:49 +02:00
wm4 082ea0de12 mp_core: fix a comment
track.demuxer is never NULL (anymore).
2013-09-07 20:34:49 +02:00
wm4 c4b935adf7 mplayer: remove unused mp_add_subtitles() parameter 2013-09-07 20:34:49 +02:00
wm4 8894a4b0d2 command: make options writeable in idle mode
Until now, options could be accessed as properties via "options/name",
but the access was read-only. Change it so that write access is possible
in --idle mode. (All options have to support setting options at that
time, simply because of the way MPlayer designed per-file options.
During playback, normal properties take care of changing things,
including things backed by options.)

This is work in progress. There are some issues: at least setting the
"vf" and "af" options won't work for strange reasons.
2013-09-07 20:34:49 +02:00
wm4 d77a924434 command: remove some unneeded code
chapter_display_name() always returns something.

The "chapter < -1" check is not needed, because this is done at the
start of the function.
2013-09-07 20:34:49 +02:00
Stefano Pigozzi 494d408583 macosx_application: handle mpv:// links
Pretty useful for people writing userscripts for web browsers. Links starting
with 'mpv://' are forwarded to the mpv OSX bundle. The leading 'mpv://' is
stripped from the recived url and the rest of the string is inserted as is in
the playlist.
2013-09-07 15:37:02 +02:00
Stefano Pigozzi b0797e8fe9 macosx_application: handle URL events as fileopen events
This allows to open URLs directly with mpv. This is useful for streaming and
libquvi supported sites.
2013-09-07 12:10:29 +02:00
wm4 ae64f29930 options: fix --volume option range, add some explanations to manpage
The --volume option accepted values up to 10000, but internally, the
value is always clipped to 0-100 range. What makes this even worse is
that --softvol-max suggests that it extends the range of --volume, which
is not the case. (And passing a volume larger than 100 to --volume
didn't even print a warning.)
2013-09-07 08:54:12 +02:00
wm4 c8f49be919 demux_lavf: workaround for broken libavformat subtitle seeking
The really funny thing about this commit is that this code is added on
top of another work around. Basically, subtitle seeking in libavformat
is completely broken. To make it useful, we have to add yet another
workaround.

The basic problem is that libavformat's subtitle seeking code always
uses the stream time base, instead of AV_TIME_BASE if stream index -1 is
passed to the avformat_seek_file() function.

Fixes github issue #216. Hopefully this will be fixed in ffmpeg too at
some point.
2013-09-07 02:56:28 +02:00
wm4 db79db8444 input: don't print warning if certain internal keys are not bound
This affects MOUSE_MOVE and MOUSE_LEAVE. Both are needed internally
(such as for the OSC), but not really useful for input.conf. Since the
warning has the purpose of notifying the user that a key is unmapped and
what key name to use for setting up a binding in input.conf, the warning
is rather useless in this case. It's also annoying in combination with
the
--no-input-default-bindings option, since that removes the default
bindings to "ignore" for these keys.
2013-09-06 00:45:03 +02:00
wm4 af83cac9b8 etc: delete mplayer.xpm
I don't think we need this anymore.
2013-09-05 21:05:04 +02:00