aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
Commit message (Collapse)AuthorAge
* command: format_bitrate: fix conversion to kbits and mbitsGravatar Marcoen Hirschberg2014-06-02
| | | | | | | Bitrates are now expressed in bits/second. This commit fixes conversions which assumed it was still in bytes/second. Signed-off-by: wm4 <wm4@nowhere>
* osc: keep track of the "fullscreen" state when it changesGravatar Marcoen Hirschberg2014-06-02
| | | | | This avoids having to poll the "fullscreen" property in the tick callback.
* player: write file name to the watch later config fileGravatar Alessandro Ghedini2014-06-01
| | | | | | | | | This simply writes the file name as a comment to the top of the watch later config file. It can be useful to the user for determining whether a watch later config file can be manually removed (e.g. in case the corresponding media file has been deleted) or not.
* command: improve video-bitrate propertyGravatar Andrey Morozov2014-06-01
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Includes some cosmetic changes over the original PR.
* client API: report success status when running commandsGravatar wm42014-06-01
| | | | | | Until now, an error was reported only if the command couldn't be parsed. Attempt to do more fine-grained reporting. This is not necessarily perfect, but it's an improvement.
* command: property notification when changing af/vfGravatar wm42014-06-01
|
* command: add const to mp_notify_propertyGravatar wm42014-06-01
|
* audio: change handling of an EOF corner caseGravatar wm42014-05-30
| | | | | | This code handles buggy AOs (even if all AOs are bug-free, it's good for robustness). Move handling of it to the AO feed thread. Now this check doesn't require magic numbers and does exactly what's it supposed to do.
* audio: rename i_bps to 'bitrate' to avoid confusionGravatar Marcoen Hirschberg2014-05-28
| | | | Since i_bps now contains bits/sec, rename it to reflect this change.
* audio: change values from bytes-per-second to bits-per-secondGravatar Marcoen Hirschberg2014-05-28
| | | | | | | The i_bps members of the sh_audio and dev_video structs are mostly used for displaying the average audio and video bitrates. Keeping them in bits-per-second avoids truncating them to bytes-per-second and changing them back lateron.
* osc: correct calculation of slider positionGravatar ChrisK22014-05-28
| | | | | calculation the mouse position on the slider relied on how the hitbox is positioned, change it according to new hitbox size.
* osc: extend hitbox of seekbars to include gapGravatar ChrisK22014-05-27
| | | | | | should make usage a bit easy Fixes #810
* lua: slightly nicer diagnostics outputGravatar wm42014-05-27
| | | | | | | | | | | | | When Lua itself prints errors such as: Error: [string "mp.defaults"]:387: syntax error near 'function' It's unclear why the location is prefixed with "string ". And for some reason, it disappears if you prefix the name with '@'. I suppose this is done for the sake of luaL_loadstring. With the '@' prefix added, the output is now: Error: mp.defaults:387: syntax error near 'function'
* lua: add missing include filesGravatar wm42014-05-26
| | | | | | These are actually already included in osdep/io.h, but I think it's cleaner to repeat them in the file where they are actually needed. (osdep/io.h needs to have them for other reasons.)
* lua: fix compilation with lua 5.2Gravatar wm42014-05-26
| | | | | | | | | | | Commit e2e450f9 started making use of luaL_register(), but OF COURSE this function disappeared in Lua 5.2, and was replaced with a 5.2-only alternative, slightly different mechanism. So just NIH our own function. This is actually slightly more correct, since it forces the user to call "require" to actually make the module visible for builtin C-only modules other than "mp". Fix autoload.lua accordingly.
* command: add write_watch_later_config commandGravatar Martin2014-05-26
| | | | | | Closes #808. Signed-off-by: wm4 <wm4@nowhere>
* lua: add some filesystem utility functionsGravatar wm42014-05-25
| | | | | | | | | | | We need this only because Lua's stdlib is so scarce. Lua doesn't intend to include a complete stdlib - they confine themselves to standard C, both for portability reasons and to keep the code minimal. But standard C does not provide much either. It would be possible to use Lua POSIX wrapper libraries, but that would be a messy (and unobvious) dependency. It's better to implement the missing functions ourselves, as long as they're small in number.
* osc: fix chapter list displayGravatar ChrisK22014-05-24
| | | | also fix small typo in DOCS
* client API: fix mpv_observe_property with MP_FORMAT_NONEGravatar wm42014-05-24
| | | | | It returned only 1 change event (after registration), and then went silent. This was accidentally broken some time ago.
* stream: don't use end_posGravatar wm42014-05-24
| | | | | | | | | | | | | | | | | | | Stop using it in most places, and prefer STREAM_CTRL_GET_SIZE. The advantage is that always the correct size will be used. There can be no doubt anymore whether the end_pos value is outdated (as it happens often with files that are being downloaded). Some streams still use end_pos. They don't change size, and it's easier to emulate STREAM_CTRL_GET_SIZE using end_pos, instead of adding a STREAM_CTRL_GET_SIZE implementation to these streams. Make sure int64_t is always used for STREAM_CTRL_GET_SIZE (it was uint64_t before). Remove the seek flags mess, and replace them with a seekable flag. Every stream must set it consistently now, and an assertion in stream.c checks this. Don't distinguish between streams that can only be forward or backwards seeked, since we have no such stream types.
* stream: kill start_pos, remove --sb optionGravatar wm42014-05-24
| | | | | | | | | | | | | | | | | | | | stream.start_pos was needed for optical media only, and (apparently) not for very good reasons. Just get rid of it. For stream_dvd, we don't need to do anything. Byte seeking was already removed from it earlier. For stream_cdda and stream_vcd, emulate the start_pos by offsetting the stream pos as seen by the rest of mpv. The bits in discnav.c and loadfile.c were for dealing with the code seeking back to the start in demux.c. Handle this differently by assuming the demuxer is always initialized with the stream at start position, and instead seek back if initializing the demuxer fails. Remove the --sb option, which worked by modifying stream.start_pos. If someone really wants this option, it could be added back by creating a "slice" stream (actually ffmpeg already has such a thing).
* player: don't init/uninit terminal at runtimeGravatar wm42014-05-24
| | | | This seems like an unnecessary complication.
* lua/osc: forgot some changed files in previous commitGravatar ChrisK22014-05-23
|
* lua/osc: small overhaulGravatar ChrisK22014-05-23
| | | | | | | | | Small fixes for the OSC, seektooltip now enabled by default. Option-parser now moved to separate package, can be used from other scripts, see DOCS/man/en/lua.rst. OSC config file location moved to lua-settings/osc.conf
* player: give quit_watch_later an exit code argument like quitGravatar wm42014-05-22
| | | | | | | | The quit command has an optional argument that is used as exit code. Extend that to the quit_watch_later command. Actually, unify the implementations of the two commands. Requested in #798.
* tl_mpv_edl: correct misspelling on line 233Gravatar Yomi02014-05-22
| | | | | | Closes #783 Signed-off-by: wm4 <wm4@nowhere>
* player: fix cover art sometimes "syncing" against audioGravatar wm42014-05-22
| | | | | | | Cover art is treated like video, but is not really video. In one case, the audio sync code was accidentally still active. Fixes cover art playback with --ao=null. (This is due to ao_null's latency emulation. Although it's not very clear whether that is actually correct...)
* player: suggest --no-audio-display on cover artGravatar wm42014-05-22
|
* video: fix display of cover art with vo_vdpauGravatar wm42014-05-22
| | | | | | | | | | vo_vdpau currently has a video queue larger than 1 entry, which causes the video display code to never queue display the video frame. This is because we consider cover art an endless stream of frames decoded from the same source packet, and include special logic to actually only decode and display 1 frame. Also, make decode_image() also signal EOF in the cover art case.
* edl: use start PTS of the source files as default start timeGravatar wm42014-05-22
|
* cache: redo options and default settingsGravatar wm42014-05-20
| | | | | | | | | | | | Some options change from percentages to number of kilobytes; there are no cache options using percentages anymore. Raise the default values. The cache is now 25000 kilobytes, although if your connection is slow enough, the maximum is probably never reached. (Although all the memory will still be used as seekback-cache.) Remove the separate --audio-file-cache option, and use the cache default settings for it.
* client API: add mpv_load_config_file()Gravatar wm42014-05-18
| | | | | | | This is probably a good idea, because it would make it easier for software embedding mpv to configure the mpv parts, without requiring the host program to provide explicit mechanisms for this (other than calling mpv_load_config_file()).
* options: unify code for setting string and "raw" optionsGravatar wm42014-05-18
| | | | | | | | | The code paths for setting options by string and by direct "raw" value were too different, which resulted in some weird code. Make the code paths closer to each other. Also, use this to remove the weirdness in the mpv_set_option() implementation.
* threads: use mpv time for mpthread_cond_timedwait wrapperGravatar wm42014-05-18
| | | | | | Use the time as returned by mp_time_us() for mpthread_cond_timedwait(), instead of calculating the struct timespec value based on a timeout. This (probably) makes it easier to wait for a specific deadline.
* player: increase seek accuracy when refreshing display on filter changeGravatar wm42014-05-18
| | | | | | | | | When the player is paused, and video filters are changed, an exact seek is executed to refresh the display. Increase the exactness of the seek in this case; this reuses the code used for frame backstepping. It might help in cases where seeking is very imprecise, such as with transport streams.
* command: add a disc-menu-active propertyGravatar wm42014-05-18
| | | | Returns whether a DVD/BD menu is active. As requested by #788.
* client API: fix "missed" property notificationsGravatar wm42014-05-18
| | | | | | | | | | | | | | | | | | If a property is notified as changed, and then again (before the change notification is returned to the client), and the second change is a sporadic change (i.e. nothing actually changed) and the change notification was associated with with a data type, it could happen that a change was "overlooked", because it would detect no change on the second notification. This is actually a pretty annoying corner case, due to the annoying way we do things, so just store both the previously returned _and_ the newly obtained property value. then we always compare with the user value to check for a change, excluding any possibility of a missed change. Note that we don't (can't/shouldn't) care if a value changes, and then changes back; it's fine if that doesn't generate a notification. This is due to how property notifications are supposed to be coalesced.
* x11: replace--[x11-]fstype option with --x11-netwmGravatar wm42014-05-16
| | | | | Simplifies the code a lot. You can still use --x11-netwm=no to disable NetWM for whatever reasons.
* player: reorganize how lua scripts are loadedGravatar wm42014-05-13
| | | | | | Make loading of scripts independent of Lua. Move some of the loading code from lua.c to scripting.c, and make it easier to add new scripting backends.
* player: disable hr-seek framedropping during backsteppingGravatar wm42014-05-12
|
* player: don't assign "false" to pointerGravatar wm42014-05-11
| | | | | | | This is legal in theory. "false" expand to 0, and 0 is a valid pointer value. But I guess this was not really intended. Found by cppcheck.
* input: remove pausing command prefixesGravatar wm42014-05-11
| | | | | | These are now equivalent to combining commands with the "cycle pause" or "set pause" commands, and thus are not needed anymore. They were also obscure and undocumented.
* player: don't complain on too long filenamesGravatar wm42014-05-10
| | | | | | | | | mpv supports per-file config files, basically filename+".conf". We use a static buffer for the new filename, and if that buffer is too small, we print a warning. This is confusing for e.g. long URLs, so just hide the warning by default. Why not dynamically allocate the buffer? Who cares.
* command: add property that estimates current video FPSGravatar wm42014-05-08
| | | | | | | | | | | | | | | | | | This is done after filters, so things like framerate-doubling deinterlacing is accounted for. Unfortunately, framedropping can cause inaccuracies (especially after precise seeks), and we can't really know when that happens. Even though we know that the decoder might drop a frame if we request it to do so, we don't know when the dropped frame will start or stop affecting the video filter chain. Video filters can have frames buffered, and we can't tell at which point the dropped frame would have been output. It's not even possible to mark a discontinuity after seek, because again we don't know if the filter chain still has the discontinuity within its buffers. So we have to live with the fact that the output of this property can be completely broken after seek, unless --no-hr-seek-framedrop is used.
* options: add --hr-seek-framedrop optionGravatar wm42014-05-07
| | | | | | | | This allows disabling of decoder framedrop during hr-seek. It's basically another useless option, but it will help exploring whether this framedropping really makes seeking faster, or whether disabling it helps with precise seeking (especially frame backstepping).
* player: avoid reconfig during seekingGravatar wm42014-05-07
| | | | | This probably matters only in extremely corner-case heavy testcases, such as using mf:// with a bunch of differently sized images.
* player: remove VO from seeking code pathGravatar wm42014-05-07
| | | | | | | | | | | | | | | Until recently, the VO was an unavoidable part of the seeking code path. This was because vdpau deinterlacing could double the framerate, and hr- seek and framestepping etc. all had to "see" the additional frames. But we've removed the frame doubling from the vdpau VO and moved it into a video filter (vf_vdpaupp), and there's no reason left why the VO should participate in seeking. Instead of queuing frames to the VO during seek and skipping them afterwards, drop the frames early. This actually might make seeking with vo_vdpau and software decoding faster, although I haven't measured it.
* player: minor reshuffling of video codeGravatar wm42014-05-07
|
* player: limit max. fallback frame durationGravatar wm42014-05-07
| | | | | | It's calculated from the demuxer reported FPS, which is not very reliable. Limit the damage a completely insane and broken value could cause.
* player: handle video reconfig slightly different againGravatar wm42014-05-07
| | | | | | | | | | Now we avoid calling update_video() twice on reconfig (once to check whether there are still new frames, and again to actually do the reconfig). Instead, we check whether there's still something going on before calling update_video() at all, and depending on that update_video() will be allowed to reconfig or not. This will simplify some things later.