Commit Graph

36260 Commits

Author SHA1 Message Date
wm4 afa9e50587 input: fix --input-ar-rate=0
Crashed, instead of disabling auto-repeat.
2013-10-20 13:55:10 +02:00
Alexander Preisinger 6a4e59677e wayland: use mp_input_test_dragging
Instead of removing dragging we now test if it we should drag the window or
not. Because if the OSC shows up we can not drag the window because that would
cause mouse events that makes the OSC disappear.
2013-10-20 09:25:28 +02:00
Alexander Preisinger bbb1057d06 Revert "wayland: remove moving window by grabbing"
This reverts commit 3308bc2bc9.
2013-10-20 09:24:37 +02:00
Alexander Preisinger 38ef925ab7 Revert "wayland: remove outdated comment"
This reverts commit d75cfef49c.
2013-10-20 09:24:37 +02:00
wm4 280c8351ac demux_mkv: use standard C default initialization syntax
gcc and clang happen to allow {} to default-initialize a struct, but
strictly speaking, C99 requires at least {0}. In one case, we use {{0}},
but that's only because gcc as well as clang are too damn stupid not
to warn about {0}, which is a perfectly valid construct in this case.

(Sure is funny, don't warn about the non-standard case, but warn about
another standard conform case.)
2013-10-19 23:15:06 +02:00
wm4 47bd0a6614 demux_mkv: cosmetics: add redundant braces for consistent style
Leaving these braces away just because the syntax allows them is really
obnoxious. It removes the visual cues which help understanding the code
at the first look.

For the record,

  if (cond)
      something();

is ok, as long as there's no else branch, and the if body is one
physical line. But everything else should have braces.
2013-10-19 23:10:03 +02:00
wm4 6d5e887a20 demux_mkv: fill ordered chapters info only if it's present
This was probably not a real problem. But it's not entirely clear
whether this could actually happen or not, so it's better to be
defensive. The code is now also somewhat easier to understand.
2013-10-19 23:02:53 +02:00
wm4 f50b105d06 tl_matroska: fix use-after-free with --cache
If cache was enabled, using ordered chapters could easily crash. The
reason is that enable_cache() reopens the demuxer and closes the old
one. The code after that (reading m->ordered_chapters etc.) then
accessed freed data.

This commit also avoids enabling cache for files which are not used
(which would make opening much slower).
2013-10-19 22:58:02 +02:00
wm4 d2d0bc31bf mp_talloc: simplify a bit
Implement MP_GROW_ARRAY using MP_TARRAY_GROW. MP_GROW_ARRAY is basically
the earlier version of MP_TARRAY_GROW, and had different semantics. When
I added MP_TARRAY_GROW, I didn't dare to change it, but I think all code
that relied on the exact semantics of MP_GROW_ARRAY is gone now, or the
difference doesn't matter anyway. The semantic change is that now
(n+1)*2 elements are preallocated instead of n*2.

Also, implement MP_TARRAY_GROW using MP_RESIZE_ARRAY, which saves 1 line
of code.

In future, these macros should be part of TA.
2013-10-19 21:43:08 +02:00
wm4 d7287d60dd vdpau_old: restore hardware decoding with old API
--hwdec=vdpau did nothing with older ffmpeg/libav versions. Oops.
2013-10-19 20:57:43 +02:00
wm4 bea36dc33f configure: use pkg-config for libsmbclient
Apparently, Samba has .pc files now.
2013-10-19 13:32:30 +02:00
wm4 c01feaaa79 af_lavrresample: actually free resampler
Fixes #304.
2013-10-19 13:19:35 +02:00
wm4 e046fa584a mp_msg: remove gettext() support
Was disabled by default, was never used, internal support was
inconsistent and poor, and there has been virtually no interest in
creating translations.

And I don't even think that a terminal program should be translated.
This is something for (hypothetical) GUIs.
2013-10-18 22:38:10 +02:00
wm4 fd0ffa7b40 mplayer: mp_msg replacements
Not 100% complete; not touching the more complicated cases.
2013-10-18 21:59:52 +02:00
Nikoli 30384a7e67 mpv.desktop: add russian translation, sort 2013-10-18 20:26:39 +04:00
ChrisK2 6e34322dec osc: make transparency of background-box configurable
see boxalpha option
2013-10-18 00:33:01 +02:00
wm4 4a4d2155d8 getch2: remove pointless ifdeffery
Apparently this was for MorphOS. If you really want to use that, ask
the devs to provide dummy headers and declarations for ioctl() instead.
2013-10-17 23:16:18 +02:00
wm4 fbd932410a tv: simplify ifdeffery
Too ugly to leave it be.
2013-10-17 23:13:55 +02:00
wm4 af0306d48d Merge Matroska ordered chapter changes
This adds support for ChapterSegmentEditionUID (pull request #258),
and also fixes issue #278 (pull request #292).

In fact, this is a straight merge of pr/292, which also contains pr/258.
2013-10-17 00:32:14 +02:00
wm4 1eda9554d4 sws_utils: work around libswscale crash with --contrast=-100 2013-10-16 21:39:51 +02:00
wm4 20e1c5f7d9 vf_scale: fix get/set confusion
This caused the equalizer controls to appear stuck.
2013-10-16 21:35:27 +02:00
Alessandro Ghedini de3a979f69 spelling fixes 2013-10-16 12:36:34 +02:00
Ben Boeckel 1b30a0bbf9 matroska: don't add time for chapters without a source 2013-10-15 21:16:05 -04:00
Ben Boeckel 648e8fbeed matroska: log about where missing time comes from 2013-10-15 21:04:16 -04:00
Ben Boeckel 78545fee42 matroska: only error if at least a millisecond is missing 2013-10-15 20:53:10 -04:00
Ben Boeckel abee328f20 matroska: account for missing information from short sources
If a source is shorter than the requested chapter length, account for
the time missing.
2013-10-15 20:53:10 -04:00
Ben Boeckel e80fd3f9e1 matroska: modify chapter limits by join_diff
When adding or removing frames to avoid 1-frame seeks on chapter
boundaries, the end of the chapter needs to be pushed or pulled by the
same amount to keep the intended end frame the same.
2013-10-15 20:46:38 -04:00
wm4 d3c140bbf2 demux_mkv: add support for HEVC
Note that you still need --vd-lavc-o='strict=-2' to enable the decoder.

Also, there's no guarantee that all required features for HEVC demuxing
are actually implemented, nor that the current muxing schema is the
final one.
2013-10-16 00:47:52 +02:00
ChrisK2 f572d22863 docs: osc: add short info about lua and how to disable it 2013-10-15 23:46:12 +02:00
wm4 0554379f84 changes.rst: add some replaced options, follow conventions better 2013-10-15 23:41:52 +02:00
ChrisK2 a0e4455616 docs: osc: fix table and other errors 2013-10-15 23:22:52 +02:00
ChrisK2 935ca52d81 docs: Add osc.rst to mpv.rst
Also moved OPTIONS headline into options.rst
2013-10-15 22:42:00 +02:00
ChrisK2 71b0c2b88c osc: fix borked options 2013-10-15 22:41:19 +02:00
ChrisK2 a54ca2da31 osc docs: Add documentation for OSC and rename some options
camelCase from some of the option names removed. If you were using those, you'll have to update them in your config.
2013-10-15 22:30:33 +02:00
wm4 a0485221c7 x11_common: don't handle mouse enter events
This could cause the OSC to be displayed without mouse interaction: for
example, starting mpv with --fs, and putting the mouse to where the OSC
area is beforehand, would cause the OSC to appear and stay visible. We
don't want that. The simplest solution is not generating artificial
mouse move events from mouse enter events, because they make the OSC
think the mouse was actually moved.

Also see commit 0c7978c, where handling of mouse enter events was added.
This was supposed to fix certain corner cases, but they're not relevant
anymore due to changes in OSC behavior.

Commit 9777047 fixed this as well (by resetting the mouse state on
MOUSE_LEAVE), but all the behavior reverted with this commit as perhaps
a bad idea. It wasn't very robust, made it hard to distinguish real
events from artificial ones, and finally made the mouse cursor more
often visible than needed. (Now switching between workspaces doesn't
make the cursor visible again when switching to a fullscreened mpv.)
2013-10-15 21:53:33 +02:00
wm4 1b8eeeb8cc tech-overview.txt: reflect talloc/TA changes 2013-10-15 21:53:13 +02:00
ChrisK2 97770473d0 osc: reset mouse position when leaving window
and store it freshly on first mouse_move event when entering again
2013-10-15 21:49:06 +02:00
ChrisK2 dd3e52fe68 osc: Don't create a config if none exists.
A documentation explaing where and how to create one instead will follow.
2013-10-15 01:17:34 +02:00
wm4 f0a5ff39a1 osc: use "info" instead of "warn" for config file creation message
When the main mpv config file, "info" is used, so this makes things
consistent.
2013-10-14 23:48:18 +02:00
wm4 7cbb7b680c example.conf: add example for disabling the OSC 2013-10-14 23:42:53 +02:00
wm4 cf02e515d4 parser-cfg: allow putting options with leading "--"
Now you can pretend the config file is quite literally command line
values dumped into a file, e.g.

--option1=value
--option2=value
...

although the underlying mechanisms are quite different.
2013-10-14 23:41:26 +02:00
wm4 c7dee24c8c parser-cfg: use bstr everywhere after parsing stage
Until now it used both char[] and bstr variants in the same code, which
was nasty. For example, the next commit would have additionally required
using memmove() to remove the prefix from the char[] string.
2013-10-14 23:37:58 +02:00
wm4 8c234045fa options: enable OSC by default
Can can disable it with --osc=no.
2013-10-14 21:09:54 +02:00
wm4 24fffa0f6b mplayer: escape strings if needed when writing watch_later config
This fixes handling of e.g. "--vf=lavfi=[ noise ]" when used with
playback resume functionality. The spaces made it bug out, and there are
more cases where it could potentially break.

We could always escape for simplicity, but for now make old and new mpv
builds somewhat interoperable and use this new escaping only if needed.
2013-10-14 21:05:58 +02:00
wm4 5106edfd5e parser-cfg: parse % escapes
This parses "%len%string" escapes, where string can contain any
characters. This method of escaping has also been used in other parts
of mplayer and mpv, so it's not a new idea.

(Also, don't confuse with URL encoding.)

Needed by the following commit.
2013-10-14 21:04:58 +02:00
wm4 5a1b60c567 version.sh: don't use git tags for version output (again)
With the way I've been doing releases in the release/0.1 branch, this
proved completely useless. You need to write the VERSION file anyway,
and since we use github's automatically generated tarballs (via its
release system), the VERSION file needs to be in the git revision of
a release anyway. git master on the other hand displayed the v0.1.0
tag, because the tag is within the master branch.

This essentially reverts commit b27f65a. Now just print the contents
of the VERSION file if it exists, and likewise, we append the git
revision if it exists. (Do that even if VERSION exists, because this
way we can tell if someone is using the release branch at an in-between
point where no new release has been made yet.)
2013-10-14 20:14:17 +02:00
wm4 0f1764195a mplayer: print ffmpeg library versions along with mpv version info
Also change what the FFmpeg version info looks like, and additionally
dump lavfi/lavr/lswr versions. (Don't bother with libavdevice and
libpostproc, they're not important enough.)

Unfortunately, there's no "single" FFmpeg/Libav version due to fatal
braindeath on the FFmpeg/Libav side. We can't map the versions to
releases either (it simply isn't accessible anywhere).
2013-10-14 20:14:17 +02:00
ChrisK2 683da7411e osc: raise minmousemove default setting to 3 and disable input mouse area when OSC not visible
The mouse area that covers the OSC is now only activated when the OSC is actually visible, to make sure the mouse still hides if it happens to be parked in the OSC area without making the OSC show up.
2013-10-14 19:51:16 +02:00
wm4 94e71b7cc0 mplayer, vo_image: simplify OSD redrawing, fix vo_image crash
vo_image didn't handle OSD redrawing correctly anymore after OSD
redrawing behavior was changed in commit ed9295c (or maybe it has been a
problem for a longer time, and only showed up now). Basically, flip_page
was called unexpectedly and when no image was stored, which made it
crash trying to access the image. This could happen when for example
provoking OSD redrawing by pausing while using --vo=image, or by using
this command line: mpv --vo=image '-vf=lavfi="select=not(mod(n\,3))"'

Fix by removing the code that pretends vo_image can redraw OSD, and by
removing the framestepping fallback, which could make bad things happen
if the VO didn't support OSD redrawing. By now, there aren't any real
VOs that can't redraw the OSD properly, so this code is not needed and
just complicates things like vo_image.

This change likely will also be useful for vo_lavc (encoding).
2013-10-13 23:40:23 +02:00
wm4 eeac26410f mplayer: print a warning if libass is not compiled
Libass is technically an optional dependency, but in practice users
tend to disable libass accidentally or for the hell of it to get
something "minimal", without being aware of the consequences.
2013-10-13 22:25:33 +02:00