aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* client API: add mpv_get_wakeup_pipe convenience functionGravatar wm42014-04-12
| | | | Should make integreating with some event loops easier. Untested.
* video: add VapourSynth filter bridgeGravatar wm42014-04-12
| | | | | | | | | | | | Mainly meant to apply simple VapourSynth filters to video at runtime. This has various restrictions, which are listed in the manpage. Additionally, this actually copies video frames when converting frame references from mpv to VapourSynth, and a second time when going from VapourSynth to mpv. This is inefficient and could probably be easily improved. But for now, this is simpler, and in fact I'm not sure if we even can references VapourSynth frames after the core has been destroyed.
* options: don't sort sub-option help outputGravatar wm42014-04-12
| | | | | | Commit 2c2c1203 sorted the output of --list-options, but the same code ias also used for listing sub-options, such as --vo=scale:help. For sub- options, the order actually matters.
* terminal: pretty print modules for --msgmoduleGravatar Evan Purkhiser2014-04-12
|
* manpage: fix --vf=scale optionsGravatar James Ross-Gowan2014-04-11
|
* options: sort --list-optionsGravatar wm42014-04-11
| | | | | | | | | | | | Until now, --list-options printed options in random order. There literally wasn't any logic in its order, they just appeared as they were declared. So just sort them. Note that we can't sort them in advance, because for certain things internal to m_config, the order actually matters. Also we're using strcasecmp(), which is bad (locale dependent), but this is output intended for human consumption, so it's not a problem.
* command: remove extended information from --list-propertiesGravatar wm42014-04-11
| | | | | | This used to display the property type, but it was not always correct or even available. The way the property mechanism works, we can know this only at runtime.
* client API: include the reason in MPV_EVENT_END_FILEGravatar wm42014-04-11
| | | | | | | | | Otherwise, the client API user could not know why playback was stopped. Regarding the fact that 0 is used both for normal EOF and EOF on error: this is because mplayer traditionally did not distinguish these, and in general it's hard to tell the real reason. (There are various weird corner cases which make it hard.)
* manpage: document how the client API retrieves the complicated propertiesGravatar wm42014-04-11
| | | | | "Complicated" as in they use sub-properties, and using MPV_FORMAT_NODE allows an application to retrieve all information at once.
* lua: add helper function for printing a tableGravatar wm42014-04-11
| | | | | | | | | | Although this is something really basic, Lua's standard library doesn't provide anything like this. Probably because there are too many ways to do it right or wrong. This code tries to be really careful when dealing with mixed arrays/maps, e.g. when a table has integer keys starting from 1, making it look like an array, but then also has other keys.
* client API: remove outdated commentsGravatar wm42014-04-11
|
* encode: write 2-pass stats only per-packetGravatar wm42014-04-11
| | | | | | The stats were retrieved and written on every encode call, instead of every encode call that actually returned a packet. ffmpeg.c also does it this way, so it must be "more correct". Fixes 2-pass encoding.
* encode: add a missing \n to a log callGravatar wm42014-04-10
|
* lua: add a minor helper functionGravatar wm42014-04-10
|
* client API: improve commentsGravatar wm42014-04-10
|
* terminal-unix: reject overlong termcap stringsGravatar wm42014-04-10
| | | | | | | | Our own tables have size for only 8 chars, so these sequences must be rejected. It seems strings of length 8 are still ok, because the code uses memcmp and not strcmp, so still allow these. Based on mplayer-svn commit r37129.
* joystick: Fix incorrect pointer offset code.Gravatar reimar2014-04-10
| | | | | | | I have some doubts that short reads are even allowed/ possible for /dev/js*, does someone know for sure? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37132 b3059339-0415-0410-9bf9-f77b7e298cf2
* sws_utils: remove custom GBRP conversionGravatar wm42014-04-10
| | | | | | | We needed this because the OSD rendering path used GBRP for RGB rendering, and not all swscale versions supported this conversion. But recently we've dropped support for very old ffmpeg/libav versions, so this isn't needed anymore.
* stream_dvd, cache: hack seeking with --cache + dvd:// back into workingGravatar wm42014-04-09
| | | | | | | | | | | | | | | | | | | This was broken at some unknown point (even before the recent cache changes). There are several problems: - stream_dvd returning a random stream position, confusing the cache layer (cached data and stream data lost their 1:1 corrospondence by position) - this also confused the mechanism added with commit a9671524, which basically triggered random seeking (although this was not the only problem) - demux_lavf requesting seeks in the stream layer, which resulted in seeks in the cache or the real stream Fix this by completely removing byte-based seeking from stream_dvd. This already works fine for stream_dvdnav and stream_bluray. Now all these streams do time-based seeks, and pretend to be infinite streams of data, and the rest of the player simply doesn't care about the stream byte positions.
* cache: fix description of the offset fieldGravatar wm42014-04-09
| | | | This field sure is a bit strange. I hope the description is correct now.
* cache: change a define to an enumGravatar wm42014-04-09
| | | | More consistent.
* cache: fix checks/output on initializationGravatar wm42014-04-09
| | | | | | | resize_cache() checks the size itself and clamps the size to the valid range if necessary, so we don't need these checks. In fact, the checks are different. Also, output the cache size after clamping, instead of before.
* TOOLS: add script for using mpv with youtube-dlGravatar Nikoli2014-04-09
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream_file: Check the handle for network streamsGravatar James Ross-Gowan2014-04-09
| | | | | | | | | | | | | | | | | | | Use NtQueryVolumeInformationFile instead of GetDriveType for detecting remote filesystems on Windows. This has the advantage of working directly on the file handle instead of needing a path and it works unmodified in Cygwin where the previous code wouldn't understand Cygwin paths or symlinks. There is some risk in using NtQueryVolumeInformationFile, since it's an internal function and its behaviour could change at any time or it could be removed in a future version of Windows, however it's documented[1] in the WDK and it's used successfully by Cygwin, so it should be fine. If it's removed, the code should fail gracefully by treating all files as local. [1]: http://msdn.microsoft.com/en-us/library/windows/hardware/ff567070.aspx Signed-off-by: wm4 <wm4@nowhere>
* client: change equality rules for MPV_FORMAT_NONEGravatar wm42014-04-09
|
* client: add a commentGravatar wm42014-04-09
|
* cache: simplifyGravatar wm42014-04-09
| | | | | | | Merge the cache_read function into cache_fill_buffer, since there's not much reason to keep them separate. Also, simply call read_buffer() to see if there's any readable data, instead of checking for the condition manually.
* cache: allow resizing at runtimeGravatar wm42014-04-09
| | | | | | | | | | | The only tricky part is keeping the cache contents, which is made simple by allocating the new cache while still keeping the old cache around, and then copying the old data. To explain the "Don't use this when playing DVD or Bluray." comment: the cache also associates timestamps to blocks of bytes, but throws away the timestamps on seek. Thus you will experience strange behavior after resizing the cache until the old cached region is exhausted.
* cache: minor simplificationGravatar wm42014-04-09
| | | | | | | | The only difference is that the MP_DBG message is not printed anymore if the current user read position is outside of the current cache range. (In order to handle seek_limit==0 gracefully in the normal case of linear reading, change the comparison from ">=" to ">".)
* cache: adjust stream position if necessaryGravatar wm42014-04-09
| | | | | | | | | Until now, this could never happen, because new data was simply always appended to the end of the cache. But for making stream cache resizing easier, doing it this way seems advantageous. It also makes it harder to make the internal state inconsistent. (Before this change it could happen that cache and stream position went out of sync if the read position was adjusted "inappropriately".)
* cache: no short reads in read_bufferGravatar wm42014-04-09
| | | | | | | Until now, cache_read() (which calls read_buffer()) could return short reads. This was a simplification allowed by the stream interface. But for cache resizing, it will be more practical to make read_buffer() do a full read.
* cache: move ringbuffer read into a separate functionGravatar wm42014-04-09
| | | | No functional changes yet.
* cache: fix typo in commentGravatar wm42014-04-09
|
* cache: always update cached controls after running a stream controlGravatar wm42014-04-09
| | | | | | | Seems like a good idea. One possible bad effect would be slowing down uncached controls, but they're already slow. The good thing is that many controls make intrusive changes to the stream (at least controls which do write accesses), so the cached parameters should be updated.
* osc: fix playlist displayGravatar ChrisK22014-04-09
|
* manpage: --ad-spdif-dtshd=yes works nowGravatar wm42014-04-08
| | | | | It was fixed a while ago. There are still some issues, as pointed out in the manpage addition.
* vd_lavc: by default, do not show corrupt framesGravatar wm42014-04-08
| | | | This flips the default value. Use --vd-lavc-show-all=yes to revert.
* demux: add "BIKb" FourCCGravatar Vika Apelsinova2014-04-08
| | | | | | More support for the worst codec ever. Signed-off-by: wm4 <wm4@nowhere>
* client API: avoid redundant property change events if possibleGravatar wm42014-04-08
| | | | | This is done simply by comparing the previous and current values. Do this only if the requested format is not MPV_FORMAT_NONE.
* command: property set commands should send property change notificationsGravatar wm42014-04-08
| | | | | | | | | Some of these property implementations already send notifications on their own, but most don't. This takes care of them. Of course this still doesn't handle all propertry changes - this is impossible without special-casing each property that can change on its own.
* lua: add API for observing property changesGravatar wm42014-04-08
| | | | | A low level API was added already earlier, but that was merely a binding for the raw C API. Add a "proper" one, and document it.
* vo_vdpau: add an additional check for timestamp robustnessGravatar wm42014-04-08
| | | | | | | | | | This might be a good idea in order to prevent queuing a frame too far in the future (causing apparent freezing of the video display), or dropping an infinite number of frames (also apparent as freezing). I think at this point this is most of what we can do if the vdpau time source is unreliable (like with Mesa). There are still inherent race conditions which can't be fixed.
* vo_vdpau: document what WRAP_ADD doesGravatar wm42014-04-08
| | | | This wasn't necessarily clear.
* vo_vdpau: simplify previous vsync timestamp calculationGravatar wm42014-04-08
| | | | | | | | | | | | | | | | | | | | | | | | The strange thing about this code was the shift parameter of the prev_vs2 function. The parameter is used to handle timestamps before the last vsync, since the % operator handles negative values incorrectly. Most callers set shift to 0, and _usually_ pass a timestamp after the last vsync. One caller sets it to 16, and can pass a timestamp before the last timestamp. The mystery is why prev_vs2 doesn't just compensate for the % operator semantics in the most simple way: if the result of the operator is negative, add the divisor to it. Instead, it adds a huge value to it (how huge is influenced by shift). If shift is 0, the result of the function will not be aligned to vsyncs. I have no idea why it was written in this way. Were there concerns about certain numeric overflows that could happen in the calculations? But I can't think of any (the difference between ts and vc->recent_vsync_time is usually not that huge). Or is there something more clever about it, which is important for the timing code? I can't think of anything either. So scrap it and simplify it.
* 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.