1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-19 13:51:14 +00:00
Commit Graph

39769 Commits

Author SHA1 Message Date
Stefano Pigozzi
115709e3c1 cocoa: save screenshots to desktop when using app bundle
Fixes #947
2014-12-08 00:03:39 +01:00
Stefano Pigozzi
1e8dbf8212 cocoa: don't create Dock icon for audio only files
fixes #635
2014-12-08 00:03:34 +01:00
wm4
1bfaab13ca ao_alsa: hackfix mono playback
ALSA returns "FL" as channel layout when trying to play mono. mpv and
libavresample don't like this; in particular, using libavresample to
convert stereo to "FL" fails.
2014-12-08 00:02:45 +01:00
wm4
083235d91f osc, dvd, bd: fix mouse state when changing menu modes
The flags weren't correctly set, and the mouse cursor remained visible
after leaving menu mode.

This was apparently broken in 0.7.0 too.

Fixes #1316.
2014-12-08 00:02:24 +01:00
wm4
bc4e115b30 discnav: remove redundant call
This was made the default a while ago.
2014-12-08 00:02:16 +01:00
Stefano Pigozzi
807763c85e coreaudio: don't output too many channel descriptions
for #1279 and #1249
2014-12-07 23:59:33 +01:00
Stefano Pigozzi
69fa6c4b73 coreaudio: add missing \n in log line 2014-12-07 23:59:23 +01:00
Stefano Pigozzi
3141381c2e coreaudio: don't print layout a second time
For #1279
2014-12-07 23:59:16 +01:00
Stefano Pigozzi
8f847437a9 cocoa: don't async redraw when waiting for VO redraw
This fixes the very annoying glitch where the black bars disappear for
a single frame when going fullscreen.
2014-12-07 23:59:02 +01:00
wm4
487fcea6f4 ao_alsa: try to fallback to "default" device if device is busy
ALSA is crap. It's impossible to make multichannel playback just do the
right thing. dmix (the default on most distros) can do stereo only, and
will refuse to play multichannel. On the other hand, if you try like mpv
(and mplayer) to open a multichannel device (like "surround51" etc.),
this will actually open a hardware device, which will either fail if
dmix is active, or block out dmix if opening succeeds.

This commit falls back to "default" (i.e. dmix) if opening a
multichannel device fails, which is a tiny step towards the right
behavior. (Although fixing it fully is impossible.)
2014-12-07 23:57:34 +01:00
wm4
63a31db0a3 input: add a hack to fix keyboard navigation with dvd/bd menu
If the user has LEFT/RIGHT/etc. bound in his input.conf, then these were
overriding the menu keys in dvdnav mode.

This hack works because the dvdnav crap happens to be the only user of
MP_INPUT_ON_TOP. If it finds a default key binding in the dvdnav menu
section, it will use that, instead of continuing search and possibly
finding the user key bindings meant for normal playback.
2014-12-07 23:56:25 +01:00
Stefano Pigozzi
575edecccb coreaudio: reject descriptions with too many channels
This is a fix attempt for #1279 and #1249.
2014-12-07 23:55:28 +01:00
Stefano Pigozzi
14adda8f6b coreaudio: fix more layout prints 2014-12-07 23:55:08 +01:00
Stefano Pigozzi
7cacff6d61 coreaudio: fix prints of uint32_t in log_layout 2014-12-07 23:54:22 +01:00
wm4
4ced125239 dvd, bd, osc: disable OSC while a menu is active
They interfere.

It turns out that commit b6ca4a48 actually broke this in weird ways, but
this solution is better anyway.
2014-12-07 23:54:12 +01:00
wm4
ac94c81134 input, lua: make removing key bindings work
This just kept adding bindings to the input section, rather than
defining it. One bad effect was that mp.remove_key_binding() in Lua
didn't work.
2014-12-07 23:52:33 +01:00
wm4
9501050ddc osc: always force mouse_move binding
So the OSC will still appear when using --no-input-default-bindings. It
also means it may override a user's mouse_move binding, but I guess
users who don't want the OSC should just use the --no-osc option.
2014-12-07 23:50:41 +01:00
wm4
c688880f9e lua: fix broken error message
luaL_error() doesn't support %.*s, because it uses Lua's own format
string mechanism that just looks like the C one. Just drop this part.
2014-12-07 23:50:13 +01:00
wm4
47ec404a52 player: don't signal an error if --stream-dump is used
The player thinks an error happened because no audio or video was played
after finishing the file, but this obviously makes no sense with stream
dumping. (error_playing follows the client API convention that negative
values are errors.)
2014-12-07 23:49:55 +01:00
Alessandro Ghedini
18b15a436f Release 0.7.1 2014-12-02 18:24:30 +01:00
Stefano Pigozzi
6583ad6970 cocoa: fix opening reference URLs (.file/id=)
Fixes #1202

/cc @mpv-player/stable
2014-12-01 21:38:51 +01:00
Niklas Haas
863701391c vo_opengl: Linearize non-RGB sRGB files correctly (eg. JPEG)
Signed-off-by: wm4 <wm4@nowhere>
2014-12-01 21:07:26 +01:00
Niklas Haas
3803c14279 vo_opengl: Reword comment in shader
I didn't quite understand this comment after looking at the code again
months later, so I reworded it for better clarity.
2014-12-01 21:07:12 +01:00
wm4
39126c3828 vo_opengl: make operator precedence explicit
More readable.
2014-12-01 21:07:06 +01:00
Stefano Pigozzi
b9cfc3622c ao_coreaudio: initialize fetched properties to zeros
Should hopefully fix #1249 and #1279
2014-12-01 21:06:07 +01:00
wm4
1b0bf6507e options: fix channel map options sometimes failing
Channel amp otpions were not copied correctly: it copied the size of a
pointer to struct chmap, not the struct itself. Since mp_chmap is
currently 9 bytes, this meant the last channel entry was not copied
correctly on 64 bit systems, leading to very strange failures. It could
be triggered especially when using the client API, because the client
API always copies options on access (mpv command line options tend to
work directly on options).
2014-12-01 21:06:00 +01:00
wm4
7ca6aa4ad0 options: fix swapped deprecated/replacement in warning
This was relevant for --af and --vo (both use this option type, and have
deprecated aliases).
2014-12-01 21:05:56 +01:00
wm4
b82a98722a player: simplify and fix ordered chapter EOF handling
Ordered chapter EOF was handled as special-case of ending the last
segment. This broke --kee-open, because it set AT_END_OF_FILE in an
"inconvenient" place (after checking for --keep-open, and before the
code that exits playback if EOF is reached).

We don't actually need to handle the last segment specially. Instead, we
remain in the same segment if it ends. The normal playback logic will
recognize EOF, because the end of the segment "cuts off" the file.

Now timeline_set_from_time() never "fails", and we can remove the old
segment EOF handling code in mp_seek().
2014-12-01 21:05:53 +01:00
wm4
3d6d7012ff command: sub_add with "auto" should not always select a subtitle track
Running "sub_add file.srt auto" during hook execution automatically
selected the first added track. This happened because all tracks added
with sub_add are marked as "external", and external subtitles are always
selected by default.

Fix this by negating the "external" flag when autoselecting subtitles
during loading. The no_default flag exists for this purpose; it was
probably added for libquvi originally, where we had the same issue.
2014-12-01 21:05:49 +01:00
wm4
3051ff9f25 mixer: don't show softvol neutral marker on OSD if not using softvol
Also fix the comment on the softvol field.
2014-12-01 21:05:45 +01:00
wm4
9bf66294f8 vo_opengl: fix srgb with certain inputs
Sampling from the source texture and scaling must always be done
separately in this mode.

Fix suggested by haasn.

Still looks a bit wrong, though.
2014-12-01 21:05:20 +01:00
wm4
577378b827 vo_opengl: something
Insert explanation here.

Fixes #1023.
2014-12-01 21:05:15 +01:00
wm4
1679222e18 audio: fix one of the previous commits
Fixes commit 52c51149. It broke multichannel (or possibly everything)
for ao_alsa, ao_oss, ao_sndio.
2014-12-01 18:31:49 +01:00
wm4
74270cd1db audio: allow more than 20 channel map entries
This could trigger an assertion when using ao_alsa or ao_coreaudio. The
code was simply assuming the number of channel maps was bounded
statically (which was true at first in both AOs).

Fix by using dynamic memory allocation. It needs to be explicitly
enabled by the AOs by setting a temp context, because otherwise the
memory couldn't be freed. (Or at least this seems to be the most elegant
solution.)

Fixes #1306.
2014-12-01 15:41:26 +01:00
wm4
718bf3b39e vd_lavc: don't crash if codec could not be opened
Fixes #1307.
2014-12-01 15:41:17 +01:00
wm4
5ecb381d78 demux_playlist: don't ignore last line in m3u
If EOF is reached after reading a line, the EOF flag is set. This was a
problem for the m3u code, which checked for EOF _after_ reading a line,
which will discard the last line read.

Also fix a typo in an unrelated part of the file.
2014-12-01 15:40:57 +01:00
wm4
17f1332955 win32: add screen offset when handling overlarge windows
MS Windows doesn't allow windows larger than the screen, so we include
a hack to make the window smaller. This hack recenters the window (what
else would it do?).

It didn't account for the virtual offset of the current screen, and it
was reported that it forces the window to the first screen.

Should fix #1292.
2014-12-01 15:38:28 +01:00
Stefano Pigozzi
f4a1dfdffb build: fix typos
thanks to @Nikoli
2014-11-28 15:51:43 +01:00
James Ross-Gowan
d3972125a1 subprocess-win: remove a Vista-only flag
PIPE_REJECT_REMOTE_CLIENTS isn't supported on XP. It's not really
needed, so remove it. Also fix error checking for CreateNamedPipe.
2014-11-28 15:51:39 +01:00
wm4
71f504a43d demux_mkv: fix a possible out of bounds access
The if branch has a weak check to test whether the codec_id is the short
ID, and handles the long IDs in the else branch. The long IDs are all
longer than 12 bytes long, so hardcoding the string offset to get the
trailing part of the name makes sense. But the if condition checks for
another thing, which could get the else branch run even if the codec_id
is short.

Fix the bogus control flow and check if the codec_id is long enough. One
of these checks could be considered redundant, but include them both for
defensive coding.
2014-11-28 15:51:32 +01:00
wm4
bc1370041d audio: alternative fix for previous commit
This is a somewhat obscure situation, and happens only if audio starts
again after it has ended (in particular can happens with files where
audio starts later). It doesn't matter much whether audio starts
immediately or some milliseconds later, so simplify it.
2014-11-28 15:51:03 +01:00
wm4
4f74869cd8 audio: fix busy loop when seeking while paused
When playing paused, the amount of decoded audio is limited to a small
amount (1 sample), because we don't write any audio to the AO when
paused. The small amount could trigger the case of the wanted audio
being too far in the future in the PTS sync code, which set the audio
status to STATUS_DRAINING, which in turn triggered the EOF code in the
next iteration. This was ok, but unfortunately, this triggered another
retry in order to check resuming from EOF by setting the status to
STATUS_SYNCING, which in turn lead to the busy loop by alternating
between the 2 states. So don't try resyncing while paused.

Since the PTS syncing code also calls ao_reset(), this could cause the
pulseaudio daemon to consume some CPU time as well.

This was caused by commit 33b57f55. Before that, the playloop was merely
run more often, but didn't cause any problems.

Fixes #1288.
2014-11-28 15:50:58 +01:00
Alessandro Ghedini
8d8b36df1b manpage: lua: fix typo paramater -> parameter 2014-11-28 15:49:52 +01:00
Alessandro Ghedini
2da6c95208 Release 0.7.0 2014-11-25 20:18:53 +01:00
wm4
9479daa13e demux_lavf: set PTS of first packet for formats with no timestamps
Makes time display work for some raw audio formats (*.shn).
2014-11-25 19:08:23 +01:00
wm4
5b69b76609 ao_alsa: fix channel map in pre-channel map API case
Forgotten in commit 5d5f5b09.
2014-11-25 18:34:24 +01:00
wm4
e1ae936e6b ao_alsa: always enable "plug" plugin for non-default device
This seems safer: otherwise, opening the AO could randomly fail if the
audio formats happens to be not float.

Unfortunately, this only works if the user does not select a device.
Since ALSA devices are arbitrary strings, including plugins with complex
parameters, it's not trivial or maybe even impossible to edit the string
in a way the "plug" plugin is added.

With --audio-device, it would be safe for users to select either
"default" or one of the "plughw" devices. Everything else seems
questionable.
2014-11-25 18:15:45 +01:00
wm4
5d5f5b094b ao_alsa: select and set channel maps via channel map API
Use the ALSA channel map API for querying and selecting supported
channel maps.

Since we (probably?) want to be compatible with ALSA versions before the
change, we still try to select the device name by channel map, and open
that device. There's no way to negotiate a channel map before opening,
so we're stuck with this approach. Fortunately, it seems these devices
allow selecting and setting any other supported channel layout, so maybe
this is not an issue at all. In particular, this avoids selecting the
default (dmix) device, which can only do stereo.

Most code is based on Martin Herkt <lachs0r@srsfckn.biz>'s alsa_ng
branch, with heavy modifications.
2014-11-25 18:09:36 +01:00
wm4
5fb54fa756 ao_alsa: minor fixes
Don't crash if no fallback channel layout could be found (caller can't
handle NULL return from select_chmap()). Apparently this could never
actually happen, though.

Don't treat snd_pcm_hw_params_set_periods_near() failure as fatal error.
Same deal as with snd_pcm_hw_params_set_buffer_time_near().

Actually free channel maps returned by snd_pcm_get_chmap().

Adjust some messages.
2014-11-25 17:27:19 +01:00
wm4
78f59df6ed client API: make sure youtube-dl is not used by default
Currently, --ytdl is off by default, but even if this is changed, never
enable it by default for the client API. It would be inappropriate to
start an intrusive external subprocess behind the host application's
back.
2014-11-25 17:27:19 +01:00