summaryrefslogtreecommitdiffstats
path: root/player
Commit message (Collapse)AuthorAgeFilesLines
* lua: do not use math.pow()wm42015-01-261-1/+1
| | | | | It's the first thing that breaks with Lua 5.3. I don't know if there are other failures because I don't care enough.
* ytdl: implement user-agent and cookie overrideswm42015-01-261-5/+34
| | | | | | | | | | | | | | | | For some sites, youtube-dl sends a special user-agent. If we don't send the same user-agent, the server will reject mpv's connection attempt. This was observed with trailers.apple.com. Fix it by forcing the user-agent youtube-dl uses. Some sites set cookies when doing a website access, and require the client to provide these cookies when downloading the actual media. This is needed at least by nicovideo.jp. Fix by adding youtube-dl's cookies to our request headers. Both of these require a very recent youtube-dl version (youtube-dl added the necessary headers a few hours ago). The script still works with older youtube-dl versions, though.
* player: some fixes for property notificationxylosper2015-01-252-4/+4
| | | | | | | | | | | | | `core-idle` depends on seeking state `mpctx->restart_complete`, so make `core-idle` notified whenever `seeking` is notified, too. `paused-for-cache` can be changed on MPV_EVENT_CACHE_UPDATE obviously. Finally, `MPV_EVENT_PLAYBACK_RESTART` should be notified after `mpctx->restart_complete` changed. Conflicts: player/command.c
* audio: don't force any parameters if spdif is usedwm42015-01-251-5/+3
| | | | | | The existing code only ignored --audio-channels, but not --audio-rate or --audio-format if spdif passthrough is used. Setting these makes no sense.
* player: mention mpv encoding support for transcoding in desync. warningwm42015-01-251-1/+1
|
* video: fix waiting for last frame/format reconfigwm42015-01-251-1/+1
| | | | | | | | | | | We still need to send the VO a duration in these cases. Disabling framedrop has logically absolutely nothing to do with these cases; it was overlooked in commit 918b06c4. So we always send the frame duration (or a guess for it), and check whether framedropping is actually enabled in the VO code. (It would be cleaner to send framedrop as a flag, but I don't care about that right now.)
* player: respect --untimed on last framewm42015-01-251-1/+1
| | | | | | | | | | | | | | The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
* player: respect --untimed on video format changeswm42015-01-251-1/+1
| | | | | | | | | | | If the video format changes (e.g. different frame size), a special code path is entered to wait until the currently displayed frame is done. Otherwise, the frame before the change would be destroyed by the vo_reconfig() call. This code path didn't respect --untimed; correct this. Fixes #1475.
* OSC: Reset all styles for idle messageChrisK22015-01-251-6/+6
|
* osc: fix disabling OSCwm42015-01-251-1/+5
| | | | | | | Upon the "DEL" key binding or the "disable-osc" message, the OSC should stay permanently invisible. This was recently broken (not sure by what), because other code accidentally reenables it anyway, which resulted in the OSC appearing again when moving the mouse.
* player: fallback to seek time for percent-pos propertywm42015-01-251-2/+2
| | | | | | | | | | | | | The percent-pos property normally goes by time, except for file formats like .ts or .ogg, where you can't trust the timestamps and duration info to compute the position in the overall files. These use the byte position and size instead. When the file position was unavailable (e.g. due to an ongoing seek), the percent-pos was unknown. Change it to use the time position instead. In most cases, it's actually accurate enough, and the temporary unavailability of the property can be annoying, e.g. on the terminal status line.
* player: enable demuxer thread for external audio fileswm42015-01-251-0/+9
| | | | | | | | | | | | | | Enable asynchronous reading for external files. This excludes subtitle files (so it's effectively enabled for audio files only), because most subtitle files are fully read on loading, and running a thread for them would just cause slowdowns and increase resource usage, without having any advantages. In theory, an external file could provide multiple tracks from the same demuxer, but demux_start_thread() is idempotent, so the code can be kept simple. Should help with playing DASH with ytdl_hook.
* tl_matroska: check chapter boundswm42015-01-251-6/+9
| | | | | | | | | | I have no idea what this does, but it's without doubt a sufficient fix for the issue at hand. Fixes #1445. Conflicts: player/timeline/tl_matroska.c
* vf_vapoursynth: pass through container FPS valuewm42015-01-251-10/+8
| | | | | | | | This is basically a hack; but apparently a needed one, since many vapoursynth filters insist on having a FPS set. We need to apply the FPS override before creating the filters. Also change some terminal output related to the FPS value.
* x11: make display-names property observablewm42015-01-251-1/+1
| | | | Reuse MP_EVENT_WIN_STATE for this.
* video: better pipelining with vf_vapoursynthwm42015-01-253-4/+26
| | | | | | | | | | Most of this is explained in the code comments. This change should improve performance with vapoursynth, especially if concurrent requests are used. This should change nothing if vf_vapoursynth is not in the filter chain, since non-threaded filters obviously can not asynchronously finish filtering of frames.
* OSC: idlemessage: fix alignmentChrisK22015-01-251-3/+3
|
* OSC: display "drop files here" message when idle + forced-windowChrisK22015-01-251-2/+52
| | | | This currently doesn't work properly on OSX due to some bugs.
* player: print config.h contents in verbose modewm42015-01-251-6/+14
| | | | | | | | | | | | It was requested that mpv should print what features etc. have been enabled at compile time. It can print the configure command line, but it obviously doesn't include autodetected features. I tried to think of a nicer way than dumping the config.h as text, but this was still the simplest way. Conflicts: player/main.c
* command: make the "run" command work on Windows toowm42015-01-251-22/+35
| | | | | | | | | | | | Do so by using mp_subprocess(). Although this uses completely different code on Unix too, you shouldn't notice a difference. A less ncie thing is that this reserves an entire thread while the command is running (which wastes some memory for stack, at least). But this is probably still the simplest way, and the fork() trick is apparently not implementable with posix_subprocess(). Conflicts: player/command.c
* command: stip path from playlist OSD displaywm42015-01-251-2/+8
| | | | | | But only if it's not e.g. a http URL. Fixes #1388.
* command: ignore chapter cycling if there's only 1 chapterwm42015-01-251-2/+5
| | | | | | | | | If there's only 1 chapter, the seeking by chapter (using the chapter property) will either jump to the chapter point, or quit playback. This is as designed, but seems like a useless and annoying behavior. Conflicts: player/command.c
* player: fix random crashes on uninitializationwm42015-01-251-0/+1
| | | | | | | | | | | On uninitialization, the player will unselect all subtitles, and then destroy the subtitle decoder. But it didn't correctly remove the subtitle decoder from the OSD state, so it could happen that it would access it after the decoder was destroyed. Could lead to random crashes when switching files often. Fixes #1389.
* player: cosmetics: rename a functionwm42015-01-253-7/+7
| | | | | | | | Something which has this many important sideffects shouldn't start have a "get" prefix. Conflicts: player/sub.c
* client API: fix mpv_wakeup()wm42015-01-251-2/+2
| | | | | | Of course this was going to get stuck in the retry loop. Fixes #1372.
* client API: be more lenient about mpv_suspend/resume mismatcheswm42015-01-253-29/+53
| | | | | | | | | | | | Before this commit, this was defined to trigger undefined behavior. This was nice because it required less code; but on the other hand, Lua as well as IPC support had to check these things manually. Do it directly in the API to avoid code duplication, and to make the API more robust. (The total code size still grows, though...) Since all of the failure cases were originally meant to ruin things forever, there is no way to return error codes. So just print the errors.
* player: update chapter marks when switching fileswm42015-01-251-1/+4
| | | | | | | | This wasn't done, so the chapter marks of the previous file were visible. It's harmless, but looks unpolished, so fix it. Conflicts: player/command.c
* player: don't ignore relative seeks by 0 secondswm42015-01-251-4/+0
| | | | | | | I don't know why this done; most likely it had no real reason. Remove it because it breaks "refresh seeks" to the same position. (Although the refresh seeks mpv sometimes does were fine.)
* command: avoid returning invalid FPS valueswm42015-01-251-3/+5
| | | | It's possible that fps is sometimes 0 in case it's unset.
* player: reset frame step counter on seekswm42015-01-252-1/+1
| | | | | I suppose this wasn't done in order to keep the frame step counter active even in the next file, but actually it was reset anyway.
* lua: add a function that formats Lua values as stringswm42015-01-251-16/+21
| | | | | | | | Yep, Lua is so crappy that the stdlib doesn't provide anything like this. Repurposes the undocumented mp.format_table() function and moves it to mp.utils.
* ytdl_hook: Check for empty playlistsChrisK22015-01-251-1/+7
| | | | | Sometimes we get empty playlists back, print a warning message instead of crash
* player: respect --untimed on last framewm42015-01-251-1/+3
| | | | | | | | | | | | | | The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
* player: respect --untimed on video format changeswm42015-01-251-1/+1
| | | | | | | | | | | If the video format changes (e.g. different frame size), a special code path is entered to wait until the currently displayed frame is done. Otherwise, the frame before the change would be destroyed by the vo_reconfig() call. This code path didn't respect --untimed; correct this. Fixes #1475.
* player: don't fall asleep on audio decoding errorswm42015-01-251-0/+2
| | | | | | This makes it retry later. Fixes #1474.
* player: fix --stop-playback-on-init-failure on audio init failurewm42015-01-251-2/+1
| | | | | | | This was forgotten when the option was implemented, and makes this option work as advertised. Fixes #1473 (though the default behavior is probably still stupid).
* command: make empty vf-metadata not an errorwm42015-01-251-11/+6
| | | | | | | | If a filter exists, but has no metadata, just return success. This allows the user to distinguish between no metadata available, and filter not inserted. See #1408.
* options: expand ~ for the include optionStefano Pigozzi2015-01-251-1/+5
| | | | Fixes #1406
* player: make --shuffle/--merge-files affect runtime loaded playlistswm42015-01-254-15/+26
| | | | | | | Until now, these options took effect only at program start. This could be confusing when e.g. doing "mpv list.m3u --shuffle". Make them always take effect when a playlist is loaded either via a playlist file, or with the "loadlist" command.
* sub: reset sub decoder correctly when cycling subtitleswm42015-01-251-3/+1
| | | | | | | | | | reset_subtitles() works in mpctx->d_sub[], which is set to NULL before calling it from uninit_sub(). This fixes resetting the subtitle when cycling subtitle tracks. Actually, this was probably a feature, because it's annoying if subtitles don't show up when cycling them. But it also can have unintended consequences, so get rid of it.
* lua: don't ignore key press events for script key bindingswm42015-01-251-2/+2
| | | | Meh.
* client API: fix log buffer overflow casewm42015-01-251-3/+3
| | | | | | | It just crashed. The prefix and text fields point to static strings in this case. Oops. Fixes the issue mentioned in #838.
* player: fix crash wtih --secondary-sidwm42015-01-251-2/+3
| | | | Fises #1463.
* tl_matroska: fix minor memory leak in error casewm42015-01-251-5/+7
| | | | Going the way of least resistance. Fixes #1460.
* player: check sufficient track selection before destroying VOwm42015-01-251-9/+9
| | | | | | | | | | | | | | | | mpv needs at least an audio or video track to play something. If the track selection is basically insufficient, the player will immediately skip to the next file (or quit). One slightly annoying thing might be that trying to play a subtitle file will close the VO window, and then go to the next file immediately (so "mpv 1.mkv 2.srt 3.mkv" would flash the video window when 2.srt is skipped). Move the check to before the video window is possibly closed. This is a minor cosmetic issue; one can use --force-window to avoid closing the video window at all. Fixes #1459.
* video: fix timeline with some container formatswm42015-01-251-0/+2
| | | | | | Using edl or --merge-files with .avi files didn't work, because the DTS was not offset. Only the PTS was adjusted, which led to nonsense timestamps.
* ytdl: silence "succeeded" messagewm42015-01-251-1/+1
| | | | Pretty useless by now.
* Update copyright yearwm42015-01-251-1/+1
|
* player: ordered chapters: filter missing chapterswm42015-01-251-0/+9
| | | | | | | | | | | | Ever since someone (not me) added some Matroska features which nobody ever uses (ordered edition or some bullshit), I haven't had a fucking clue what the fuck is going on in this fucking file. (Still agreed to it, so it's my fault.) mplayer2 handled missing chapters correctly (and I suppose in a somewhat clean/simple manner), but the changed code doesn't. Since I can't even follow this code because it's so arcanely complicated, just add a hack that has the same effect.
* player: fix a typo in message outputwm42015-01-141-1/+1
| | | | This typo has been around for over a year. Oops.
* player: don't show "0%" percentage in infinite streamswm42015-01-142-4/+9
|
* ytdl: bump requrired youtube-dl version to 2014.11.26ChrisK22014-12-191-1/+1
|
* ytdl: Try to handle multi-arc videosChrisK22014-12-191-14/+37
| | | | | | | | this currently uses a sketchy but apparently working workaround, which will be removed once the neccessary changes in youtube-dl are implemented Fixes #1277
* ytdl: When using DASH, print actual durationChrisK22014-12-191-1/+5
| | | | | prints the actual duration as reported by youtube-dl to the terminal when available
* command: fix crash with some forms of script_bindingwm42014-12-171-1/+1
| | | | "script_binding name ..." just crashed it. Oops.
* player: restore ab-loop settings with playback resumewm42014-12-171-0/+2
| | | | Fixes #1324.
* build: fix --disable-libasswm42014-12-171-2/+2
| | | | | | Still supported, but obviously untested. You shouldn't use this option anyway.
* sub: remove assertionwm42014-12-081-2/+1
| | | | | | | | | | | This should clearly be impossible, but it seems to happen with ordered chapters for a user. Since I can't tell what the actual bug is and it seems impossible to know the details without downloading possibly huge files, this is probably the best we can do. Should at least partially fix #1319.
* osc, dvd, bd: fix mouse state when changing menu modeswm42014-12-082-4/+9
| | | | | | | | | 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.
* discnav: remove redundant callwm42014-12-081-2/+0
| | | | This was made the default a while ago.
* dvd, bd, osc: disable OSC while a menu is activewm42014-12-071-0/+9
| | | | | | | They interfere. It turns out that commit b6ca4a48 actually broke this in weird ways, but this solution is better anyway.
* osc: always force mouse_move bindingwm42014-12-071-1/+1
| | | | | | 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.
* lua: fix broken error messagewm42014-12-071-1/+1
| | | | | 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.
* player: don't signal an error if --stream-dump is usedwm42014-12-071-0/+1
| | | | | | | 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.)
* player: simplify and fix ordered chapter EOF handlingwm42014-12-012-17/+11
| | | | | | | | | | | | | | 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()