| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Was overlooked.
|
|
|
|
|
|
|
|
|
|
| |
This stopped working when the code was changed to create a window even
if --wid is used.
It appears we can't create our own window in this case, because in X11
there is no difference between a window with the root window as parent,
and a window that is managed by the WM. So make this (kind of worthless)
special case use the root window itself.
|
|
|
|
|
| |
Tested with recent metacity; this code is not triggered anymore. The
code was added in 2003 and probably has been unused for years.
|
| |
|
|
|
|
| |
Better prefer real English...
|
|
|
|
|
|
|
|
| |
Just doing this because mp_osd.h and osd.c is not consistent.
There are some other header files (command.h and screenshot.h), but
since I don't feel too good about inflating mp_core.h, I'm not merging
them, at least not yet.
|
|
|
|
|
|
|
| |
I considered making a header file for each .c file, but decided against
it. Asking around, not making separate headers was deemed acceptable. In
the end, all of these depend on MPContext and store state inside of it,
so separate headers aren't all that useful anyway.
|
|
|
|
|
| |
No functional change, because the only user of ao_play() ignores return
values below 1.
|
| |
|
|
|
|
| |
Also, replace broken noup= by lavfi expressions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mplayer.c was a bit too big. Split it into multiple files. I hope the
way it's split makes sense. Maybe some things don't make too much sense,
or go against intuition. These will fixed as soon as I notice them.
Some files are a bit questionable (misc.c, osd.c, configfiles.c), and
suggestions how to organize this better are welcome.
Regressions are possible due to reorganized include statements.
Obviously I didn't just copy mplayer.c's orgy of include statements, but
recreated them for each file. It's easily possible that there are
oversights and mistakes, which will show up on other platforms.
There is one actual change: the public avutil.h include is removed from
encode.h, and I tried to replace most FFMIN/FFMAX/av_clip uses. I
consider using libavutil too much as dangerous, because the set of
include files they recursively pull in is rather arbitrary and is
different between FFmpeg and Libav.
|
|
|
|
|
|
|
|
| |
All these files access mp_core.h and MPContext, and form the actual
player application. They should be all in one place, and separate
from the other sources that are mere utility helpers.
Preparation for splitting mplayer.c into multiple smaller parts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On systems that provide legacy OpenGL (up to 2.1), but not GL3 and
later, creating a GL3 context will fail. We then revert to legacy GL.
Apparently the error message printed when the GL3 context creation
fails is confusing. We could just silence it, but there's still a X
error ("X11 error: GLXBadFBConfig"), which would be quite hard to
filter out. For one, it would require messing with the X11 error
handler, which doesn't even carry a context pointer (for application
private data), so we don't even want to touch it. Instead, change
the error message to inform the user what's actually happening: a
fallback to an older version of OpenGL.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When starting mpv with nohup, file descriptor 0 seems to be invalid for
some reason. (I'm not quite sure why it should be... /proc/pid/fd/0
seems to indicate it's just /dev/null, and using /dev/null explicitly
shows that it works just fine.)
select() will always immediately return, and this causes mpv to burn CPU
without reason. Fix this by treating it as EOF when read() returns
EBADF.
Also add EINVAL to this condition, because it seems like a good idea.
|
|
|
|
|
| |
Using static variables for mutable state inside functions is a bad idea,
because it's not immediately obvious that it is what it is.
|
|
|
|
|
|
|
|
|
| |
This might actually fix an issue with DVB channel switching, because
that uses some sort of hack to reinitialize the demuxer, which causes
the subtitle renderer to initialize twice. As consequence, the assert in
add_subtitle_fonts_from_sources() would trigger.
I didn't actually test the DVB case, because I don't have the hardware.
|
|
|
|
| |
This is completely pointless, but it still somehow bugged me.
|
|
|
|
|
| |
Regression from bc49957
Fixes #321
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable autorepeat for the "add"/"cycle" commands when changing
properties that are choices (such as fullscreen, pause, and more).
In these cases, autorepeat is not very useful, and can rather harmful
effects (like triggering too many repeated commands if command
execution is slow).
(Actually, the commands are just dropped _after_ being repeated, since
input.c itself does not know enough about the commands to decide whether
or not they should be repeated.)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to toggle the border during fullscreen (with "cycle border")
would leave the window stuck without border, and it couldn't be
restored. This was because vo_x11_decoration() always excepted to be
called when toggling the state, and thus confusing the contents of the
olddecor variable. Add got_motif_hints to hopefully prevent this.
Also, when changing the border, don't take fs in account. May break on
older/broken WMs, but all in all is in fact more robust and simpler,
because you do not need to update the border state manually when
returning from fullscreen.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Also, use more C99 and remove "register" keywords.
|
|
|
|
|
| |
On the float path. Note that this skips clipping, but we expect that
everything on the audio-path is pre-clipped anyway.
|
|
|
|
|
|
| |
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.)
|
| |
|
| |
|
|
|
|
|
| |
Turnes out, when playing stuff over WiFi, the cache may go below 48%
quite frequently.
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
|
| |
Apparently this fixes issues with Gnome, which has a smaller timeout.
See github issue #315.
|
|
|
|
|
| |
The intention of this is to not make the window go outside the screen when
changing dimensions from 2x to .5x.
|
|
|
|
|
| |
We always use the file's timestamps, so the start time can be easily
something different from 0. Make the --length option respect this.
|
| |
|
|
|
|
|
| |
We don't need that anymore, because the old way to get default values
by recreating the m_config is gone.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixup commit for bbc146927
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
I think in this case, having a separate function is confusing.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
Minor simplification. String options are now not allowed to use the
same variable/field anymore. (Also affects other "dynamic" options
which require memory allocation.)
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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!)
|
| |
|
| |
|
|
|
|
|
| |
This time I didn't bother to move the contents of the author field to
the file headers. "git log" is your friend.
|
|
|
|
| |
The author and comment fields were printed only in -v mode.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
The filter itself was already renamed earlier - but rename the file too.
|
|
|
|
|
| |
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.
|
|
|
|
| |
Maybe this can be the default in the future, but I'm not sure yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 |