aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* vo_vdpau: simplify time management and make it more robustGravatar wm42014-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_vdpau used a somewhat complicated and fragile mechanism to convert the vdpau time to internal mpv time. This was fragile as in it couldn't deal well with Mesa's (apparently) random timestamps, which can change the base offset in multiple situations. It can happen when moving the mpv window to a different screen, and somehow it also happens when pausing the player. It seems this mechanism to synchronize the vdpau time is not actually needed. There are only 2 places where sync_vdptime() is used (i.e. returning the current vdpau time interpolated by system time). The first call is for determining the PTS used to queue a frame. This also uses convert_to_vdptime(). It's easily replaced by querying the time directly, and adding the wait time to it (rel_pts_ns in the patch). The second call is pretty odd: it updates the vdpau time a second time in the same function. From what I can see, this can matter only if update_presentation_queue_status() is very slow. I'm not sure what to make out of this, because the call merely queries the presentation queue. Just assume it isn't slow, and that we don't have to update the time. Another potential issue with this is that we call VdpPresentationQueueGetTime() every frame now, instead of every 5 seconds and interpolating the other calls via system time. More over, this is per video frame (which can be portantially dropped, and not per actually displayed frame. Assume this doesn't matter. This simplifies the code, and should make it more robust on Mesa. But note that what Mesa does is obviously insane - this is one situation where you really need a stable time source. There are still plenty of race condition windows where things can go wrong, although this commit should drastically reduce the possibility of this. In my tests, everything worked well. But I have no access to a Mesa system with vdpau, so it needs testing by others. See github issues #520, #694, #695.
* lua: add basic mpv_observe_property supportGravatar wm42014-04-06
| | | | Undocumented and only the most basic functionality for now.
* client API: add a way to notify clients of property changesGravatar wm42014-04-06
| | | | | | | | | | | | | | | | | | | | | | | | This turned out ridiculously complex. I think it will have to be simplified some day. Main reason for the complexity are: - filtering properties by forcing clients to observe individual properties explicitly (to avoid spamming clients with changes they don't want) - optional retrieval of property value with the notification (the basic idea was that this is more user friendly) - allowing to the client to specify a format in which the value should be retrieved (because if a property changes its type, the client API couldn't convert it properly, and compatibility would break) I don't know yet which of these are important, and everything could change. In particular, the interface and semantics should be adjusted to reduce the implementation complexity. While I consider the API complete, there could (and probably will) be bugs left. Also while the implementation is complete, it's inefficient. The complexity of the property matching is O(a*b*c) with a clients, b observed properties, and c properties changing at once. I threw away an earlier implementation using bitmasks, because it was too unwieldy.
* client API: use a manual ringbufferGravatar wm42014-04-06
| | | | | | | Remove the use of mp_ring and use a simple array and a bunch of variables instead. This is way less awkwad. The change in reserve_reply fixes incorrect tracking of free events.
* gl_lcms: properly expand the cache filename being writtenGravatar Stefano Pigozzi2014-04-05
| | | | | This is needed to preserve the same path used when opening the cache file, and correctly expands ~ when icc-cache is added to the mpv config file.
* build: bump libbluray minimum versionGravatar Stefano Pigozzi2014-04-05
| | | | | The code uses BD_OVERLAY_HIDE which seems to be available from 0.3.0. Update the pkg-config query.
* build: add -Wempty-body to compiler flagsGravatar wm42014-04-04
| | | | Warns against "if(0);" but not "if(0){}" - perfect for our purposes.
* demux: move metadata-based replaygain decoding out of af_volumeGravatar Alessandro Ghedini2014-04-04
|
* af_volume: use replaygain side dataGravatar Alessandro Ghedini2014-04-04
|
* af: add replaygain_data field to af_stream and af_instanceGravatar Alessandro Ghedini2014-04-04
| | | | Closes #664
* demux: add replaygain_data field to demuxer_tGravatar Alessandro Ghedini2014-04-04
|
* build: check if replaygain side data is availableGravatar Alessandro Ghedini2014-04-04
| | | | | | Signed-off-by: wm4 <wm4@nowhere> old-configure change by wm4.
* vo_vdpau: more debugging outputGravatar wm42014-04-03
| | | | Might help to debug certain problems with Mesa.
* remove redundant/outdated line from encodeing.rst:"what works"Gravatar Kevin Mitchell2014-04-03
|
* lua: give more control over timersGravatar wm42014-04-02
| | | | | | | | | | | Now they can be paused and resumed. Since pausing and disabling the timer is essentially the same underlying operation, we also just provide one method for it. mp.cancel_timer probably still works, but I'm considering this deprecated, and it's removed from the manpage. (We didn't have a release with this function yet, so no formal deprecation.)
* lua: add mp.unregister_event() functionGravatar wm42014-04-01
| | | | Someone requested this... I think.
* DOCS/encoding: make "What does not work yet" a proper RST sectionGravatar wm42014-04-01
|
* gl_lcms: fix build when lcms2 is not availableGravatar Stefano Pigozzi2014-03-31
| | | | Was broken in b0ee9334e.
* vo_corevideo: remove unused variableGravatar Stefano Pigozzi2014-03-31
|
* vo_opengl, cocoa: allow to autoselect a color profileGravatar Stefano Pigozzi2014-03-31
| | | | | | | | | | | | | This commit adds support for automatic selection of color profiles based on the display where mpv is initialized, and automatically changes the color profile when display is changed or the profile itself is changed from System Preferences. @UliZappe was responsible with the testing and implementation of a lot of this commit, including the original implementation of `cocoa_get_icc_profile_path` (See #594). Fixes #594
* ass_mp: don't use --subcp for --ass-stylesGravatar wm42014-03-31
| | | | | | | | | | | | | The --ass-styles option is implemented by calling ass_read_styles(). This function can take a codepage (so libass will use iconv to convert it). This was implemented before our --subcp option was changed, and this code was not updated. Now libass fails opening iconv, because --subcp is not always (and not by default) a valid iconv codepage. Just always pass NULL, which means the file passed to --ass-styles must be in UTF-8. The --ass-styles option is a fringe option anyway (and will destroy your subtitles), so having codepage support for it isn't important at all.
* encode_lavc: copy metadata to output fileGravatar Alessandro Ghedini2014-03-30
| | | | | | | | Closes #684 Signed-off-by: wm4 <wm4@nowhere> Includes some minor cosmetic changes additional to the original PR.
* command: allow changing filters before video chain initializationGravatar wm42014-03-30
| | | | | | | Apparently this is more intuitive. Somewhat tricky, because of the odd state after loading a file but before initializing the VO.
* command: change what the metadata property returnsGravatar wm42014-03-30
| | | | | | | Change the type of the property from a string list (alternating key/value entries) to a map. Using the client API, this will return MPV_FORMAT_NODE_MAP, while Lua mp.get_property_native returns a dictionary-like table.
* command: minor simplificationGravatar wm42014-03-30
|
* command: fix access to "metadata/list" propertyGravatar wm42014-03-30
| | | | | | | | | The function tag_property() in command.c passed a key action with empty path to m_property_read_list. This is normally not valid, because key actions are supposed to access sub-paths. But it's kind of inconvenient to check for this case in tag_property(). So make it valid by providing a m_property_unkey() function, which turns a key access to "" into a top-level action.
* command: add helper function to split property pathsGravatar wm42014-03-30
| | | | | | We've just checked whether a sub-path started with "name/", but that changes behavior whether the property name has a trailing '/' or not. Using a helper function to split of path components avoids this problem.
* m_property: don't parse empty string as 0Gravatar wm42014-03-30
| | | | Nice strtol() usage error.
* osc: make OSC more responsive when pausedGravatar ChrisK22014-03-30
| | | | | Quick hack to impove situtation until the next major overhaul comes
* vf_eq: don't malloc priv structGravatar wm42014-03-30
| | | | | There wasn't any reason for this. In fact, it's a memory leak. The proper priv struct is already allocated vf.c and the option parser.
* player: add missing "-" to options in workaround notice on A/V desynchronizationGravatar Sebastian Morr2014-03-30
| | | | | | While it technically works, using GNU-style options seems cleaner nowadays. Signed-off-by: wm4 <wm4@nowhere>
* ao_wasapi: make code shorterGravatar wm42014-03-30
| | | | | | | | | Also fix a format string mistake in a log call using it. I wonder if this code shouldn't use FormatMessage, but it looks kind of involved [1], so: no, thanks. [1] http://support.microsoft.com/kb/256348/en-us
* stream_bluray: move lookup of AACS error codes into a functionGravatar wm42014-03-30
| | | | Mostly a cosmetic change. Makes the code a little bit shorter.
* stream_bluray: check AACS and BD+ protectionsGravatar xylosper2014-03-30
| | | | | | | There are two kind of encryption for Blu-ray disc, AACS and BD+, and both of them can be checked through BLURAY_DISC_INFO object. This commit makes the bluray and bdnav streams refuse playback if AACS/BD+ is detected and decryption is failed.
* audio: remove sample rate limit checksGravatar wm42014-03-30
| | | | | | | | | | | This played the file at a wrong sample rate if the rate was out of certain bounds. A comment says this was for the sake of libaf/af_resample.c. This resampler has been long removed. Our current resampler (libav/swresample) checks supported sample rates on reconfiguration, and will error out if a sample rate is not supported. And I think that is the correct behavior.
* player: dvdnav: fix start time when entering and leaving menuGravatar wm42014-03-30
| | | | | Unfortunately, quite a hack, because we have check the nav state outside of discnav.c.
* Merge remote-tracking branch 'mpv/pr/676'Gravatar wm42014-03-30
|\
| * player: rename dvdnav to discnavGravatar xylosper2014-03-30
| | | | | | | | | | Now, navigation works both of DVD and non-BD-J Blu-ray. Therefore, rename all 'dvdnav' strings which are not DVD specific to 'discnav'
| * stream_bluray: cosmetic refactoringGravatar xylosper2014-03-30
| | | | | | | | | | Remove unused variables. Declare variables when they are needed. Adjust brackets for mpv's convention. Clean up too many empty lines.
| * stream_bluray: select initial angle only if peeking title succeededGravatar xylosper2014-03-30
| | | | | | | | | | | | The angles should be set and queried only if a valid title is selected. Also, in navigation mode, there are some limitations which make it impossible to query current title/angle.
| * stream_bluray: use more proper error code for stream controlGravatar xylosper2014-03-30
| | | | | | | | | | | | Use STREAM_OK instead of hardcoded value 1. Handle failure of setting title as an unsupported behaviour rather than an error.
* | manpage: remove misleading description for --ontopGravatar Stefano Pigozzi2014-03-29
| | | | | | | | | | Pretty much all the VOs and backends support this, so there is no point in listing only X11 and corevideo support.
| * stream_bluray: implement navigation interface for Blu-ray streamGravatar xylosper2014-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces new stream protocols: bdnav(and others). bdnav stream shares lots of codes with original bluray stream, so it's not separated in different source file. Major difference from bluray is that bdnav does not support longest title because there is no way to query that information. bdnav://menu and bdnav://first correspond to top menu title and first play title respectively, though they often point same title. Also, binary position based seeking has been removed, because it didn't have no point.
* | Fix compilation on OSX and win32Gravatar wm42014-03-29
| | | | | | | | Probably.
* | video/out: remove legacy colorspace stuffGravatar wm42014-03-29
| | | | | | | | | | | | | | | | | | Reduce most dependencies on struct mp_csp_details, which was a bad first attempt at dealing with colorspace stuff. Instead, consistently use mp_image_params. Code which retrieves colorspace matrices from csputils.c still uses this type, though.
* | mp_image: add missing field to mp_image_params_equals()Gravatar wm42014-03-28
|/ | | | | | This is pretty obscure, so it didn't matter much. It still breaks switching output levels at runtime, because the video output is not reinitialized with the new params.
* af_volume: fix replaygainGravatar wm42014-03-27
| | | | | | | | This was accidentally broken in commit b72ba3f7. I somehow made the wild assumption that replaygain adjusted the volume relative to 0% instead of 100%. The detach suboption was similarly broken.
* stream_bluray: remove BD_EVENT_IDLEGravatar wm42014-03-26
| | | | | | | | This was actually supposed to be removed with pull reuqest #671, but I accidentally re-added it with a rebasing mistake. This probably also coincidentally fixes compilation with older libbluray (issue #672).
* stream_bluray: use bd_get_playlist_info()Gravatar xylosper2014-03-26
| | | | | | | | Use bd_get_playlist_info() instead of bd_get_title_info(). The previous implementation couldn't query current playlist and this made it impossible to call bd_get_playlist_info() which is more desirable than bd_get_title_info() because, for Blu-rays, playlist is the unit of playback not title. This commit fixes that.
* stream_bluray: cache current playback informationsGravatar xylosper2014-03-26
| | | | | | | | The cost of calling bd_get_title_info() is quite expensive and requires lots of CPU usage. Using BD_EVENT_PLAYLIST and BD_EVENT_TITLE, it's possible to cache BLURAY_TITLE_INFO object for current title and BD_EVENT_ANGLE handler caches current angle. In my test case, with this commit, CPU usage can be saved about 15-20%.