aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
Commit message (Collapse)AuthorAge
* command: expose mpv version as propertyGravatar wm42014-11-02
| | | | A client API user has no other way to know the version.
* player: print anamorphic size only if video is anamorphicGravatar wm42014-11-02
| | | | Has been annoying me since forever.
* player: always use demux_chapterGravatar wm42014-11-02
| | | | | | | | | Instead of defining a separate data structure in the core. For some odd reason, demux_chapter exported the chapter time in nano-seconds. Change that to the usual timestamps (rename the field to make any code relying on this to fail compilation), and also remove the unused chapter end time.
* player: add --chapters-file optionGravatar wm42014-11-02
| | | | | | | | Note that you can't pass .cue or .edl files to it, at least not yet. Requested in context of allowing to specify custom chapters. For that to work well, we probably need to add some sort of chapter metadata pseudo-demuxer.
* osd: properly wakeup when the OSD function disappearsGravatar wm42014-11-01
| | | | Fixes #1236.
* player: update meaning of drop_frame_cntGravatar wm42014-11-01
| | | | | Rename the variable, update comments, and update the documentation of the property which returns its value.
* player: show AV-desync message in all framedrop modesGravatar wm42014-11-01
| | | | | | | | | | | | This was shown only if decoder-framedropping was enabled, and only if at least 50 frames were dropped by it. Since drop_frame_cnt used to mean "number of late frames", this code made sense, but this is not the case anymore: drop_frame_cnt can be even 0, all while video gets hopelessly behind audio. One problem with this is that short desync spikes (which usually can probably dealt with) will also cause this message to be shown. If it gets triggered too often, the code will need to be adjusted.
* sub: remove osd_get_sub()Gravatar wm42014-11-01
| | | | | Trades one strange thing against another, but seems slightly less strange.
* sub: be more flexible about changes to how subtitles are renderedGravatar wm42014-10-31
| | | | | | | | | For example, if --force-window is used, and video is switched off during playback, then you need to redecide the rendering method to get subs displayed correctly. Do this by moving the state setup code into a function, and call it on every frame.
* player: change framedrop display in the status lineGravatar wm42014-10-31
| | | | | Hopefully less confusing, and hopefully doesn't exceed the terminal width in any situation.
* player: improve exit message in some scenariosGravatar wm42014-10-31
| | | | | | | | | | | | | | If you played e.g. an audio-only file and something bad happened that interrupted playback, the exit message could say "No files played". This was awkward, so show a different message in this case. Also overhaul how the exit status is reported in order to make this easier. This includes things such as not reporting a playback error when loading playlists (playlists contain no video or audio, which was considered an error). Not sure if I'm happy with this, but for now it seems like a slight improvement.
* player: don't display zero duration for files with unknown durationGravatar wm42014-10-29
| | | | | | On OSD/terminal, just don't display the duration if unavailable. Make the "length" property unavailable if duration is unavailable.
* player: add an option to abort playback on partial init failuresGravatar wm42014-10-28
| | | | | | This is probably what libmpv users want; and it also improves error reporting (or we'd have to add a way to communicate such mid-playback failures as events).
* player: handle DVB demuxer reloading correctlyGravatar wm42014-10-28
| | | | | | | | This was probably done incorrectly in cases when the currently selected channel had no data. I'm not sure if this codepath is functional at all, though. Maybe not. Untested due to lack of DVB hardware.
* client API: better error reportingGravatar wm42014-10-28
| | | | Give somewhat more information on playback failure.
* client API: add an enum for mpv_event_end_file.reasonGravatar wm42014-10-28
| | | | | | | | | Using magic integer values was an attempt to keep the API less verbose. But it was probably not a good idea. Reason 1 (restart) is not made explicit, because it is not used anymore starting with the previous commit. For ABI compatibility, the value is left as a hole in the enum.
* player: handle edition reloading slightly differentlyGravatar wm42014-10-28
| | | | | | | Use the codepath that is normally used for DVD/BD title switching and DVB channel switching. Removes some extra artifacts from the client API: now MPV_EVENT_END_FILE will never be called on reloads (and neither is MPV_EVENT_START_FILE).
* command: play the correct entry with loadfile ... append-playGravatar Alessandro Ghedini2014-10-27
| | | | | The playlist may be non-empty even if the player is idle. Instead of playing the first entry, play the entry that was just added.
* player: don't spam video-reconfig eventGravatar wm42014-10-27
| | | | | | | | Without --force-window, this is called on every iteration or so, and calling uninit_video_out() sends the video-reconfig event. Avoid sending redundant events. Fixes #1225 (using an alternative patch).
* command: try 'icy-title' metadata for media-title as wellGravatar Alessandro Ghedini2014-10-27
|
* command: add audio-device propertyGravatar wm42014-10-27
| | | | Meant for changing the --audio-device at runtime.
* audio: add command/function to reload audio outputGravatar wm42014-10-27
| | | | | Anticipated use: simple solution for dealing with audio APIs which request configuration changes via events.
* lua: subprocess: fix dumbGravatar wm42014-10-26
|
* lua: subprocess: tunnel stderr through mp_logGravatar wm42014-10-26
| | | | | | | | | | | Pretty much a fringe-feature, but also it's awkward if something appears on the terminal with no indication for the source. This is made quite awkward by the fact that stderr and stdout could be closed at different times, and that poll() doesn't accept "holes" in its FD list. Invalid (.e.g negative) FDs just make it return immediately, as required by the standard. So sparse_poll() takes care of the messy details.
* lua: parse_json(): fix inverted condition for trail argumentGravatar wm42014-10-26
| | | | It accidentally had the opposite meaning.
* lua: subprocess: don't distinguish pipe errors/EOFGravatar wm42014-10-26
| | | | | | | What was the purpose of that? Probably none. Also simplify another thing: if we get the cancel signal through FD, there's no reason to check it separately.
* Drop libquvi supportGravatar wm42014-10-25
| | | | | | | | | | | No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
* lua: fix some more lua_tostring() mistakesGravatar wm42014-10-25
| | | | Why can't it just raise an error?
* lua: lua_tostring() on an error value can return NULLGravatar wm42014-10-24
| | | | | Lua is so clever it allows values that can't be converted to strings, in which case lua_tostring() returns NULL. Trigger undefined behavior.
* command: finish hook execution if client failsGravatar wm42014-10-24
| | | | | Translation: if the (to be added) youtube-dl Lua script crashes, don't wait forever when opening something.
* command: add vo-configured propertyGravatar wm42014-10-24
| | | | | | | | | So a client API user can know when a window is created or destroyed. Also might be useful for the OSC: it could disable itself if video is disabled. Before this commit, there were only indirect ways of detecting this.
* player: disable --force-window if VO failsGravatar wm42014-10-24
| | | | Otherwise, it'd retry creating the window all the time.
* video: send MPV_EVENT_VIDEO_RECONFIG on uninitGravatar wm42014-10-24
| | | | | This event basically means "something about video changed", and uninit is certainly an important change.
* player: adjust uninit order of componentsGravatar wm42014-10-24
| | | | | | | | Most things should be allowed to access the client API unconditionally (for example for sending events), so move destroying the client API down. Also, mp_uninit_ipc() should happen before the point at which all clients are shutdown, or there will be a small time window in which new clients can be created after destroying them all.
* command: fix debug outputGravatar wm42014-10-24
| | | | It was a bit ugly/annoying.
* osc: make text squuezing layout dependentGravatar ChrisK22014-10-24
| | | | | | | | | | | Wether and when the text of a button should be squeezed when it gets too long can now be configured in the layout: lo.button.maxchars = <number> nil = no squeezing (default) If the button text has more than <maxchars> characters, it will be squeezed to the estimated width of <maxchars>.
* osc: make tooltip_an default propertyGravatar ChrisK22014-10-24
|
* player: fix exiting if both audio and video fail initializingGravatar wm42014-10-23
| | | | | | | | | | | | | The player was supposed to exit playback if both video and audio failed to initialize (or if one of the streams was not selected when the other stream failed). This didn't work; for one this check was missing from one of the failure paths. And more importantly, both checked the current_track array incorrectly. Fix these issues, and move the failure handling code into a common function. CC: @mpv-player/stable
* lua: fix non-senseGravatar wm42014-10-23
| | | | Let's actually test our code next time.
* client API: print properties set with -vGravatar wm42014-10-23
| | | | | Useful for debugging. Considered doing this in command.c, but it's easier here.
* command: print executed commands with -vGravatar wm42014-10-23
|
* command: add a "cached" mode to sub_addGravatar wm42014-10-23
| | | | | This avoids reloading a subtitle if it was already added. In all cases, the subtitle is selected.
* osc.lua: add “bottombar” and “topbar” layoutsGravatar Martin Herkt2014-10-23
|
* command: return error on invalid/absent IDs with ff-sid/ff-aidGravatar wm42014-10-23
| | | | | | Instead of just disabling the stream. Also, check if the selected track has the right type, or we'd crash.
* player: show busy symbol on OSD if seeking takes too longGravatar wm42014-10-22
| | | | Same as it's done on the terminal.
* lua: don't let temporary values take the place of argumentsGravatar wm42014-10-22
| | | | | | | Because Lua is so terrible, it's easy to confuse temporary values pushed to the Lua stack with arguments if the arguments are checked after that. Add a hack that should fix this.
* command: make reverse cycle_values match up with forward oneGravatar wm42014-10-21
| | | | | | | | | The behavior of reverse cycling (with the "!reverse" magic value) was a bit weird and acted with a "delay". This was because the command set the value the _next_ command should use. Change this and make each command invocation select and use the next command directly. This requires an "uninitialized" special index in the counter, but that is no problem at all.
* command: fix video-rotate update when pausedGravatar wm42014-10-21
| | | | | | | | | | | Due to the way video-rotate currently works, the state will be automatically updated once new video is decoded. So the filter chain doesn't need to be reinitialized automatically, but there is a need to trigger the video instant refresh code path instead. Also move the support function closer to an annoying similar yet different function. They probably can be unified next time major changes are done to this code.
* lua: don't use "output" as identifierGravatar wm42014-10-21
| | | | | I suspect this clashes with libcs,w hich define "stdout" as macro. Hopefully fixes #1206.
* command: add cursor-autohide propertyGravatar wm42014-10-21
| | | | | | | | | | | Allows properly changing/updating the cursor state. Useful for client API window embedding, because the host application may not want the mpv window to grab mouse input, and this has to manually handle the cursor. Changing the cursor of foreign windows is usually not sane. It might make sense to allow changing the cursor icon, but that would be much more complicated, so I won't add it unless someone actually requests it.