0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
Commit Graph

36345 Commits

Author SHA1 Message Date
wm4
39fc0060fb command: replace speed_mult with multiply command
The compatibility layer still takes care of the old speed_mult command.
2013-10-31 23:30:14 +01:00
wm4
71ded03123 command: add generic "multiply" command
Essentially works like "add".
2013-10-31 23:30:14 +01:00
wm4
94542abf2e command: add property to scale window size 2013-10-31 23:30:14 +01:00
wm4
b55d557822 x11: factor out normal window resize code
As preparation for resizing the window with input commands in the
following commit.

Since there are already so many functions which somehow resize the
window, add the word "highlevel" to the name of this new function.
2013-10-31 19:51:46 +01:00
wm4
2537f6f467 sd_lavc: display DVD subs with unknown duration
DVD subs (rarely) have subtitle events without end timestamp. The
duration is unknown, and they should be displayed until they're
replaced by the next event.

FFmpeg fails hard to make us aware whether duration is unknown or
actually 0, so we can't distinguish between these two cases. It fails
at this twice: AVPacket.duration is set to 0 if duration is unknown,
and AVSubtitle.end_display_time has the same issue.

Add a hack that considers all bitmap subtitles with duration==0 as
events with uknown length. I'd rather accidentally display a hidden
subtitle (if they exist at all), instead of not displaying random
subtitles at all.

See github issue #325.
2013-10-31 18:17:14 +01:00
wm4
75261165af ao_pulse: fix channel layouts
The code was selecting PA_CHANNEL_POSITION_MONO for MP_SPEAKER_ID_FC,
which is correct only with the "mono" channel layout, but not anything
else. Remove the mono entry, and handle mono separately.

See github issue #326.
2013-10-31 18:17:14 +01:00
wm4
7100a10127 vd_lavc: add more ifdeffery and ffmpeg cargo culting for correctness
We mixed the "old" AVFrame management functions (avcodec_alloc_frame,
avcodec_free_frame) with reference counting. This doesn't work
correctly; you must use av_frame_alloc and av_frame_free. Of course
ffmpeg doesn't warn us about the bad usage, but will just mess up
things silently. (Thanks a lot...)

While the alloc function seems to be 100% compatible, the free function
will do bad things, such as freeing memory that might still be
referenced by another frame. I didn't experience any actual bugs, but
maybe that was pure luck.
2013-10-31 18:17:14 +01:00
wm4
ee2ba635f2 dec_video: remove unused declaration of a former global variable 2013-10-31 18:17:13 +01:00
Rudolf Polzer
9e8eba11fa encoding-example-configs: add more comments regarding the scaling method 2013-10-31 05:30:45 +01:00
Stefano Pigozzi
55dca5b6a3 gl_common: osx: fix compilation with latest XQuartz RC
Looks the gl.h header in XQuartz is incompatible with the one in OS X 10.9.
2013-10-30 23:59:43 +01:00
wm4
2c48a16e99 tech-overview.txt: reflect recent updates
mplayer.c split, and some other things.
2013-10-30 22:35:48 +01:00
wm4
03ec49be8f ta: track location debug info in 2 more cases
Was overlooked.
2013-10-30 22:19:32 +01:00
wm4
50e57c346f x11: restore support for --wid=0
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.
2013-10-30 22:19:32 +01:00
wm4
7743ed2dc6 x11: remove ancient metacity hack
Tested with recent metacity; this code is not triggered anymore. The
code was added in 2003 and probably has been unused for years.
2013-10-30 22:19:31 +01:00
wm4
4b2d93f103 x11: minor cosmetics 2013-10-30 22:19:31 +01:00
wm4
53218f33b9 main: improve a terminal message
Better prefer real English...
2013-10-30 22:19:31 +01:00
wm4
2ccc3721ef player: merge mp_osd.h into mp_core.h
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.
2013-10-30 22:19:31 +01:00
wm4
fdd1b8cac1 mp_core: sort function prototypes by source file
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.
2013-10-30 22:19:31 +01:00
wm4
a17b5364ea ao_alsa: return negative value on error in play()
No functional change, because the only user of ao_play() ignores return
values below 1.
2013-10-30 22:19:15 +01:00
Rudolf Polzer
7ac88cb05b Fix style of the HP Slate 7 vf-add line. 2013-10-30 10:36:06 +01:00
Rudolf Polzer
f19f4a36bc encoding-example-profiles: support HP Slate 7's weird aspect.
Also, replace broken noup= by lavfi expressions.
2013-10-30 10:30:49 +01:00
wm4
b19414f3bf Split mplayer.c
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.
2013-10-30 01:53:53 +01:00
wm4
a84258d769 Move files part of the playback core to player sub-directory
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.
2013-10-30 01:51:28 +01:00
wm4
884b4600a4 gl_x11: change error message when GL3 context creation fails
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.
2013-10-28 23:54:02 +01:00
wm4
dceccaf169 getch2: assume EOF when input file descriptor is invalid
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.
2013-10-28 23:32:57 +01:00
wm4
e10b362bdb getch2: move global state to file scope variables
Using static variables for mutable state inside functions is a bad idea,
because it's not immediately obvious that it is what it is.
2013-10-28 23:29:08 +01:00
wm4
40e68d6514 mplayer: handle subtitle renderer cleanup via uninit_player
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.
2013-10-28 23:16:00 +01:00
wm4
96a60e15ce x11_common: refactor of fstype code
This is completely pointless, but it still somehow bugged me.
2013-10-28 22:42:47 +01:00
Stefano Pigozzi
e4d23dd01d cocoa: apply the more invasive constraining only with cmd+1/2/3
Regression from bc49957
Fixes #321
2013-10-28 09:08:08 +01:00
wm4
5e9c226229 command: disable autorepeat for some commands (actually properties)
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.)
2013-10-28 00:33:52 +01:00
wm4
f2d438a1fd x11: fix border toggling
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.
2013-10-27 23:22:46 +01:00
wm4
6e1eb8add9 vo_xv: check whether image allocation succeeds 2013-10-27 17:58:06 +01:00
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