aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/command.c
Commit message (Collapse)AuthorAge
* command: fix property naming conventionGravatar wm42015-01-10
| | | | Use "-" instead of "_" as separator.
* command: change properties added in previous commitGravatar wm42015-01-10
| | | | | | | | | | | | | Make their meaning more exact, and don't pretend that there's a reasonable definition for "bits-per-pixel". Also make unset fields unavailable. average_depth still might be inconsistent: for example, 10 bit 4:2:0 is identified as 24 bits, but RGB 4:4:4 as 12 bits. So YUV formats seemingly drop the per-component padding, while RGB formats do not. Internally it's consistent though: 10 bit YUV components are read as 16 bit, and the padding must be 0 (it's basically like an odd fixed- point representation, rather than a bitfield).
* command.c: new subproperties for video-params: bpp and depthGravatar xylosper2015-01-10
| | | | | | | | bpp(bits-per-pixel) and depth(bit-depth for color component) can be calculated from pixelformat technically but it requires massive informations to be implemented in client side. These subproperties are provided for convenience.
* command: ignore chapter cycling if there's only 1 chapterGravatar wm42015-01-05
| | | | | | 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.
* x11: make display-names property observableGravatar wm42015-01-03
| | | | Reuse MP_EVENT_WIN_STATE for this.
* command: make the "run" command work on Windows tooGravatar wm42015-01-01
| | | | | | | | | 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().
* command: make empty vf-metadata not an errorGravatar wm42014-12-30
| | | | | | | | 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.
* command: add filtered-metadata propertyGravatar wm42014-12-29
| | | | | Goes in hand with the previous commit; the main purpose is to easily show on OSD what is shown on terminal.
* player: make --shuffle/--merge-files affect runtime loaded playlistsGravatar wm42014-12-29
| | | | | | | 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.
* command: stip path from playlist OSD displayGravatar wm42014-12-27
| | | | | | But only if it's not e.g. a http URL. Fixes #1388.
* player: cosmetics: rename a functionGravatar wm42014-12-27
| | | | | Something which has this many important sideffects shouldn't start have a "get" prefix.
* command: overlay_add: more flexible treatment of offset parameterGravatar wm42014-12-26
| | | | | | | | | | | | | | Essentially, don't make it the mmap() argument, and just add it to the memory address. This hides tricky things like alignment reequirements from the user. Strictly speaking, this is not entirely backwards compatible: this adds the regression that you can't access past 2 or 4 GB of a file on 32 bit systems anymore. But I doubt anyone cared about this. In theory, we could be clever, and just align the offset manually and pass that to mmap(). This would also be transparent to the user, but minimally more effort, so this is left as exercise to the reader.
* win32: add mmap() emulationGravatar wm42014-12-26
| | | | | | | | Makes all of overlay_add work on windows/mingw. Since we now don't explicitly check for mmap() anymore (it's always present), this also requires us to make af_export.c compile, but I haven't tested it.
* player: don't show "0%" percentage in infinite streamsGravatar wm42014-12-20
|
* command: extend revert_seek commandGravatar wm42014-12-17
| | | | | "revert_seek mark" basically forces the seekback point. It's basically a one-way bookmark.
* command: format ${avsync} like on terminal status lineGravatar wm42014-12-16
| | | | | | Padding with spaces is very useless for OSD (because most fonts are variable width), but it's good when using it on the terminal, e.g. for reproducing the default terminal status line.
* command, dvd: add property which returns list of DVD titlesGravatar wm42014-12-13
| | | | | | | | | This was requested. It seems libdvdread can't get the duration for titlesets other than the currently opened title. The data structures contain dangling pointers for these, and MPlayer works this around by opening every title separately for the purpose of dumping the title list.
* command: add properties for current bitrateGravatar wm42014-12-12
| | | | Fixes #1192.
* command: fix crash with some forms of script_bindingGravatar wm42014-12-10
| | | | "script_binding name ..." just crashed it. Oops.
* player: update chapter marks when switching filesGravatar wm42014-12-10
| | | | | This wasn't done, so the chapter marks of the previous file were visible. It's harmless, but looks unpolished, so fix it.
* command: add "idle" propertyGravatar wm42014-12-10
| | | | Yes, it's redundant with events.
* player: change interaction between revert_seek and ab-loopsGravatar wm42014-12-09
| | | | | | The result isn't quite what I imagined, because the A-point is never marked as a seek point (so you can't jump between A and B), but it's still slightly better than before.
* player: make chapter seek to end jump to last frame with --keep-openGravatar wm42014-12-08
| | | | | | | | There were complaints that a chapter seek past the last chapter was quitting the player. Change the behavior to what is expected: the last frame. If no chapters are available, this still does nothing.
* command: avoid returning invalid FPS valuesGravatar wm42014-11-29
| | | | It's possible that fps is sometimes 0 in case it's unset.
* command: sub_add with "auto" should not always select a subtitle trackGravatar wm42014-11-27
| | | | | | | | | | | 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.
* audio: make mp_chmap_to_str() return a stack-allocated stringGravatar wm42014-11-24
| | | | Simplifies memory management.
* command: don't queue framestepsGravatar wm42014-11-23
| | | | | If repeated framestep commands are sent, just unpause the player, instead of playing N frames for N repeated commands.
* input, lua: redo input handlingGravatar wm42014-11-23
| | | | | Much of it is the same, but now there's the possibility to distinguish key down/up events in the Lua API.
* Remove some superfluous NULL checksGravatar wm42014-11-21
| | | | | | | | In all of these situations, NULL is logically not allowed, making the checks redundant. Coverity complained about accessing the pointers before checking them for NULL later.
* command: dvd: better audio/video recovery on angle switchingGravatar wm42014-11-20
| | | | | | | | Does the same thing as the drop_buffers command. When implementing that command, it turned out that resetting the higher level playback state was more effective for achieving smooth recovery. Untested; I don't even have any DVDs or DVD images with multiple angles.
* command: add drop_buffersGravatar wm42014-11-20
| | | | | | | | | | | | | | | This command was actually requested on IRC ages ago, but I forgot about it. The main purpose is that the decoding state can be reset without issuing a seek, in particular in situations where you can't seek. This restarts decoding from the middle of the packet stream; since it discards the packet buffer intentionally, and the decoder will typically not output "incomplete" frames until it has recovered, it can skip a large amount of data. It doesn't clear the byte stream cache - I'm not sure if it should.
* command: add an ab_loop commandGravatar wm42014-11-18
| | | | | | As suggested in #1241; to make using the feature easier. Also add better OSD-formatting for the ab-loop-a/b properties.
* command: improve A-B loop behaviorGravatar wm42014-11-18
| | | | | | If the B point is set, then loop back to A. Also, update the OSD bar if necessary.
* command: implement A-B loopsGravatar wm42014-11-18
| | | | | | | | | | | | | Probably needs to be polished a bit more. Also, might require a key binding that can set/clear the loop points in a more intuitive way. For now, something like this can be put into input.conf to use it: ctrl+y set ab-loop-a ${time-pos} # set A ctrl+x set ab-loop-b ${time-pos} # set B ctrl+c set ab-loop-a no # clear (mostly) Fixes #1241.
* command: adjust previous commitGravatar wm42014-11-17
| | | | | | | | Due to the current code structure, the "current" entry and the entry which is playing can be different. This is probably silly, but still try to mark the entries correctly. Refs #1260.
* command: playlist property: return if an entry is currently playingGravatar wm42014-11-17
| | | | | | | | This actually doesn't even write/return the new sub-property, because I dislike the idea of dumping that field for every single playlist entry, even though it's "needed" only for one. Fixes #1260.
* command: list filters/VOs/AOs with option-infoGravatar wm42014-11-14
| | | | Another special-case, but pretty simple after all.
* command: export some option metadataGravatar wm42014-11-13
| | | | | | | This might be interesting for GUIs and such. It's probably still a little bit insufficient. For example, the filter and audio/video output lists are not available through this.
* command: rename "option-flags" property to "option-info"Gravatar wm42014-11-13
|
* command: make sub-properties more flexibleGravatar wm42014-11-13
| | | | | This makes it work with all kind of types, instead of just some simple ones.
* command: export mpv configure arguments as propertyGravatar wm42014-11-13
| | | | | It seems strange that a client API user can't get this string, other than analyzing the mpv log output.
* player: make the osd-msg prefix work for playlist_next/prevGravatar wm42014-11-11
| | | | | If input.conf e.g. contains "n osd-msg playlist_next", then pressing the n key will switch to the next file, and display the filename on OSD.
* audio: make decoders output refcounted framesGravatar wm42014-11-10
| | | | | | | | | | | | | | This rewrites the audio decode loop to some degree. Audio filters don't do refcounted frames yet, so af.c contains a hacky "emulation". Remove some of the weird heuristic-heavy code in dec_audio.c. Instead of estimating how much audio we need to filter, we always filter full frames. Maybe this should be adjusted later: in case filtering increases the volume of the audio data, we should try not to buffer too much filter output by reducing the input that is fed at once. For ad_spdif.c and ad_mpg123.c, we don't avoid extra copying yet - it doesn't seem worth the trouble.
* dvd, bluray: reload demuxer on title changesGravatar wm42014-11-10
| | | | | | | | | Causes the player to reload the demuxer and to relist the found streams. Probably slightly dangerous/broken, because the demuxer thread and possibly even the decoders will keep reading data from the new title before the new demuxer takes over. Fixes #1250.
* command: send property-change event on playlist changeGravatar Alessandro Ghedini2014-11-09
|
* audio/out: make ao_request_reload() idempotentGravatar wm42014-11-09
| | | | | | | | | | This is what you would expect. Before this commit, each ao_request_reload() call would just queue a reload command, and then recreate the AO for the number of times the function was called. Instead of sending a command, introduce some sort of event retrieval mechanism. At least for the reload case, use atomics, because we're too lazy to setup an extra mutex.
* command: silence a warning on win32Gravatar wm42014-11-08
| | | | | Same goal as a change in the #1255 PR, but IMO slightly less ifdefferish.
* command: fix option-flags propertyGravatar wm42014-11-08
| | | | The sub-path wasn't adjusted, and it worked only in some situations.
* command: export the flag whether an option was set on commandlineGravatar wm42014-11-07
| | | | Can be useful for certain scripts; I think someone requested this.
* command: add display-names propertyGravatar Kevin Mitchell2014-11-07
| | | | | | | Call VOCTRL_GET_DISPLAY_NAMES it when the property is requested. The vo should return the names of the displays that the mpv window is covering. For example, with x11 vos, xrandr names LVDS1, HDMI1, etc.