Commit Graph

36613 Commits

Author SHA1 Message Date
wm4 d2ee5c0330 command: don't include stream_dvd.h 2013-10-27 00:40:01 +02:00
wm4 7abc1bef40 af: replace macros with too generic names
Defining names like min, max etc. in an often used header is not really
a good idea.

Somewhat similar to MPlayer svn commit 36491, but don't use libavutil,
because that typically causes us sorrow.
2013-10-26 15:05:59 +02:00
wm4 74e7043cc7 gl_common: suggest --vo=opengl-old if OpenGL 2.1 missing
If the caller requests at least OpenGL 2.1 (which --vo=opengl does),
but we get OpenGL 1.x, suggest using opengl-old.

Based on a patch by pfor on IRC.
2013-10-26 14:17:53 +02:00
wm4 6ac5474790 af_volume: some more cosmetics 2013-10-26 14:04:38 +02:00
wm4 13fcb1925a af_volume: switch to new option parsing 2013-10-26 13:36:46 +02:00
wm4 f2660c0a29 af_volume: uncrustify
Also, use more C99 and remove "register" keywords.
2013-10-26 13:36:46 +02:00
wm4 b890093c44 af_volume: don't change volume if nothing is to be changed
On the float path. Note that this skips clipping, but we expect that
everything on the audio-path is pre-clipped anyway.
2013-10-26 13:36:34 +02:00
wm4 3b5657f0c1 af_volume: remove unused features
Roughly follows MPlayer svn commits 36492 and 36493. We also remove
the volume peak reporting. (There are much better libavfilter filters
for this, I think.)
2013-10-26 13:36:34 +02:00
Ben Boeckel 1fb1868afe mpvcore: add a note about desync on track switches 2013-10-26 12:37:42 +02:00
ChrisK2 327cdcb611 docs: osc: update cache display percentage. 2013-10-26 11:12:08 +02:00
ChrisK2 c341edda35 osc: display cache status only below 45%
Turnes out, when playing stuff over WiFi, the cache may go below 48%
quite frequently.
2013-10-26 11:09:06 +02:00
ChrisK2 e02ec80192 osc: fix bug for no-duration cases 2013-10-26 11:08:06 +02:00
ChrisK2 c54335e7df osc: add experimental seekbar tooltip
Not up to my quality standards (need ASS boundingboxes), so disabled by default and undocumented for now.

Can be enabled with seektooltip=yes in plugin_osc.conf
2013-10-26 05:01:33 +02:00
ChrisK2 3a181bac1f osc: make sure the OSC actually fits into the video 2013-10-26 03:50:11 +02:00
wm4 ecc0705f83 options: don't let watch_later etc. overwite command line options
There are certain cases where mpv will automatically set options, such
as per-file configs, per protocol/VO/AO/extension profiles, and
watch_later resume configs. All these were overwriting the user's
options, even when they were specified on command line.

Add something that explicitly preserves command line options. This
means you can now actually use the command line to override any
options that the playback resume functionality backups and restores.

It still happily overrides options set at runtime (e.g. changed via
properties while playing a file; then playing the next file might
override them again), but maybe that's not a problem with typical use.
2013-10-25 22:52:54 +02:00
wm4 d8896f0dba ao_alsa: don't include alloca.h
It's true that ALSA uses alloca() in some of its API functions, but
since this is hidden behind macros in the ALSA headers, we have no
reason to include alloca.h ourselves.

Might help with portability (FreeBSD).
2013-10-25 21:25:54 +02:00
wm4 950ad5a412 README: add a link to the wiki about the FFmpeg vs. Libav issue 2013-10-25 21:23:22 +02:00
wm4 dbb4b00a12 manpage: clarify --heartbeat-interval operation 2013-10-25 20:33:46 +02:00
wm4 de303d8ba4 x11_common: reduce screensaver heartbeat from 30 to 10 seconds
Apparently this fixes issues with Gnome, which has a smaller timeout.
See github issue #315.
2013-10-25 20:30:01 +02:00
Stefano Pigozzi bc49957458 cocoa: constraint the window position a little more
The intention of this is to not make the window go outside the screen when
changing dimensions from 2x to .5x.
2013-10-25 20:01:32 +02:00
wm4 607892b741 mplayer: make --length relative to actual start of file, instead of 0
We always use the file's timestamps, so the start time can be easily
something different from 0. Make the --length option respect this.
2013-10-25 18:39:15 +02:00
wm4 2c6f6c9f4e m_config: slightly improve name handling 2013-10-25 18:39:15 +02:00
wm4 28d3fe1d6d m_config: remove unused fields
We don't need that anymore, because the old way to get default values
by recreating the m_config is gone.
2013-10-25 18:39:15 +02:00
wm4 75e1c6f295 m_config: allow not allocating option struct, and use it
In cases we're just listing options or checking their values (as it
happens with -vo/-vf etc. suboption parsing), we don't need to allocate
abd initialize the actual option struct. All we're interested in is
the list of options.
2013-10-25 18:39:15 +02:00
Alexander Preisinger cb3327fe48 wayland: better name for mouse coordinates
I had to look up what the surf_x and surf_y members do.
That means the name is not very good. Also a comment.
2013-10-25 10:30:12 +02:00
Alexander Preisinger bef2135a44 wayland: fix fullscreen transparent border regions
The default behavior of weston changed some time ago to not fill the surface
black for fullscreen windows.

Now let mpv draw the whole screen in fullscreen mode.
2013-10-25 10:30:11 +02:00
Stefano Pigozzi 96432241bd cocoa: fix opening quarantined files on 10.9 with the bundle [2]
Fixup commit for bbc146927
2013-10-25 09:10:50 +02:00
wm4 60aea74f44 m_config: refactor option defaults handling
Keep track of the default values directly, instead of creating a new
instance of the option struct just to get the defaults.

Also get rid of the special handling of m_obj_desc.init_options.
Instead, handle it purely by the option parser. Originally, I wanted to
handle --vo=opengl-hq and --vo=direct3d_shaders with this (by making
them aliases to the real VOs with a different preset), but since --vo
=opengl-hq=help prints the wrong values (as consequence of the
simplification), I'm not doing that, and instead use something
different.
2013-10-24 22:50:13 +02:00
wm4 f6bceacaff options: fix bogus entry
This didn't make sense and caused issues with the following commit: if
it's an option with a data pointer, it should be writable.
2013-10-24 22:50:13 +02:00
wm4 7204dee3c7 m_config: don't require dragging along parent in initialization
Instead, track the opstruct explicitly. It turns out we don't need the
parent at all. Also, add something rudimentary to track the default
values.
2013-10-24 22:50:13 +02:00
wm4 b707589e7e m_config: minor simplification
I think in this case, having a separate function is confusing.
2013-10-24 22:50:13 +02:00
wm4 4cd143e4d8 m_config: store m_config_options in an array instead of a list
Might reduce memory overhead, and is also less annoying.

Since pointers to m_config_options are kept around, this assumes
they're added only during initialization. Otherwise you'd get
dangling pointers.
2013-10-24 22:50:13 +02:00
wm4 a217c08b17 m_config: refactor initialization, reduce amount of malloc'ed strings
Allocate strings only if needed (when we have to prefix sub-options).
Prepare for storing m_config_options in an array instead of a list.
2013-10-24 22:50:13 +02:00
wm4 cfc72d4fff m_config: slightly simplify dynamic option initialization
We can assume memcpy is enough, because the source should be from
static data. (It wouldn't work if the data could contain pointers
back into itself.)
2013-10-24 22:50:13 +02:00
wm4 8d5f8d5a6b m_config: don't allow aliasing with string options
Minor simplification. String options are now not allowed to use the
same variable/field anymore. (Also affects other "dynamic" options
which require memory allocation.)
2013-10-24 22:50:13 +02:00
wm4 cc235d203d m_config: cosmetics: make code less verbose 2013-10-24 22:50:13 +02:00
Stefano Pigozzi bbc1469272 cocoa: fix opening quarantined files on 10.9 with the bundle
It looks like on Mavericks the Finder is passing different arguments to mpv
depending on whether the opened file is quarantined or not.

Fixes #285
2013-10-24 21:37:55 +02:00
Stefano Pigozzi c54a1f3e41 cocoa: fix race condition with input context creation
This seems to be a problem only in OS X 10.9. I guess they improved the
general speed of the Cocoa startup and suddenly mpv core takes more time
than the Cocoa thread to initialize.

Fixes #285

(hopefully!)
2013-10-24 00:07:05 +02:00
wm4 2352a90566 manpage: use the new name for af_force in one place 2013-10-23 19:30:02 +02:00
wm4 d58d4ec93c audio/out: remove useless info struct and redundant fields 2013-10-23 19:30:02 +02:00
wm4 6d44a4dfd1 video/filter: remove useless vf_info fields
This time I didn't bother to move the contents of the author field to
the file headers. "git log" is your friend.
2013-10-23 19:30:01 +02:00
wm4 c8930e80a8 video/out: remove useless info struct and redundant fields
The author and comment fields were printed only in -v mode.
2013-10-23 19:30:01 +02:00
wm4 b08617ff71 audio/filter: remove useless af_info fields
Drop the author and comment fields. They were completely unused - not
even printed in verbose mode, just dead weight.

Also use designated initializers and drop redundant flags.
2013-10-23 19:30:01 +02:00
wm4 a46453347f af_force: set format early for better debug output
Set the input/output format in filter init. This doesn't change anything
functionally, but it makes the forced format show up in the filter chain
init verbose output (which sometimes prints the filter chain before all
filters have been configured).
2013-10-23 19:30:01 +02:00
wm4 247c89d6ba af_force: minor simplifications 2013-10-23 19:30:01 +02:00
wm4 943c785619 audio/filter: rename af_force.c to af_format.c
The filter itself was already renamed earlier - but rename the file too.
2013-10-23 19:29:30 +02:00
wm4 a37c810173 vo_opengl: don't enable PBOs with opengl-hq
The speed advantages are marginal (at least with the way it's currently
used), and it might actually be slower on some drivers, like Mesa.
2013-10-23 17:50:49 +02:00
wm4 68531e23a1 gl_video: add RGB10_A2 FBO format
Maybe this can be the default in the future, but I'm not sure yet.
2013-10-23 17:46:57 +02:00
wm4 e60b8f181d audio/filter: split af_format into separate filters, rename af_force
af_format is the old audio conversion filter. It could do all possible
conversions supported by the audio chain. However, ever since the
addition of af_lavrresample, most conversions are done by
libav/swresample, and af_format is used as fallback.

Separate out the fallback cases and remove af_format. af_convert24 does
24 bit <-> 32 bit conversions, while af_convertsignendian does sign and
endian conversions. Maybe the way the conversions are split sounds a bit
odd. But the former changes the size of the audio data, while the latter
is fully in-place, so there's at least different buffer management.

This requires a quite complicated algorithm to make sure all these
"partial" conversion filters can actually get from one format to
another. E.g. s24le->s32be always requires convertsignendian and
convert24, but af.c has no idea what the intermediate format should
be. So I added a graph search (trying every possible format and
filter) to determine required format and filter. When I wrote this,
it seemed this was still better than messing everything into
af_lavrresample, but maybe this is overkill and I'll change my
opinion. For now, it seems nice to get rid of af_format though.

The AC3->IEC61937 conversion isn't supported anymore, but I don't think
this is needed anywhere. Most AOs test all formats explicitly, or use
the AF_FORMAT_IS_IEC61937() macro (which includes AC3).

One positive consequence of this change is that conversions always
include dithering (done by libav/swresample), instead of possibly going
through af_format, which doesn't do anything fancy.

Rename af_force to af_format. It's essentially compatible with command
line uses of af_format. We retain a compatibility alias for af_force.
2013-10-23 10:04:12 +02:00
wm4 33707c6d63 audio/format: add some helper functions 2013-10-22 01:01:41 +02:00