aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* build: avoid defining _GNU_SOURCEGravatar wm42014-07-09
| | | | | | | | | _GNU_SOURCE defines the kitchen sink, and also prefers glibc definitions where glibc and POSIX conflict. Even though POSIX is worth less than toilet paper, we still prefer the POSIX definitions. rar.c needs asprintf(), which is _GNU_SOURCE-only. So we define _GNU_SOURCE too specifically for this file.
* DOCS/tech-overview: minor updatesGravatar wm42014-07-09
|
* demux: remove accurate_seek fieldGravatar wm42014-07-08
| | | | It's unused now. (Only the dvd code used it until recently.)
* cocoa: simplify logic that returns used bits per colorGravatar Stefano Pigozzi2014-07-08
|
* cocoa: move CGL context creation to gl_cocoaGravatar Stefano Pigozzi2014-07-08
| | | | | | This approach is similar to what other vo_opengl backends do. It can also be used in the future to create another cocoa backend that renders offscreen with IOSurfaces or FBOs.
* demux_disc: flush slave demuxer packet queue on resyncGravatar wm42014-07-07
| | | | | | Technically needed, but not strictly. It seems it works without in practice, because demux_lavf.c reads exactly one packet for fill_buffer call, so there are never packets queued.
* cache, dvd, bluray: simplify stream time handlingGravatar wm42014-07-07
| | | | | | | | | | | | | | | | | | We used a complicated and approximate method to cache the stream timestamp, which is basically per-byte. (To reduce overhead, it was only cached per 8KB-block, so it was approximate.) Simplify this, and read/keep the timestamp only on discontinuities. This is when demux_disc.c actually needs the timestamp. Note that caching is currently disabled for dvdnav, but we still read the timestamp only after some data is read. libdvdread behaves well, but I don't know about libbluray, and the previous code also read the timestamp only after reading data, so try to keep it safe. Also drop the start_time offset. It wouldn't be correct anymore if used with the cache, and the idea behind it wasn't very sane either (making the player to offset the initial playback time to 0).
* input: restore ability to combine mouse buttonsGravatar wm42014-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | Key bindings are decided on the "down" event, so if the prefix is not unique, the first/shortest will be used (e.g. when both "a" and "a-b" are mapped, "a" will always be chosen). This also breaks combining multiple mouse buttons. But it seems users expect it to work, and it's indeed a bit strange that it shouldn't work, as mouse bindings are emitted on the key "up" event, not "down" (if the shorter binding didn't emit a command yet, why shouldn't it be combinable). Deal with this by clearing the key history when a command is actually emitted, instead of when a command is decided. This means if both MOUSE_BTN0 and MOUSE_BTN0-MOUSE_BTN1 are mapped, the sequence of holding down BTN0 and then BTN1 will redecide the current command. On the other hand, if BTN0 is released before BTN1 is pressed, the command is emitted, and the key history is deleted. So the BTN1 press will not trigger BTN0-BTN1. For normal keys, nothing should change, because commands are emitted on the "down" event already, so the key history is always cleared. Might fix #902. CC: @mpv-player/stable (if this fix is successful)
* ao_null: disable latency emulationGravatar wm42014-07-07
| | | | | | | | | Doesn't work quite right, and will pause for the latency duration after seeking. Some users use --ao=null to disable audio (even though they should probably use --no-audio), and this use-case is broken by this issue too. CC: @mpv-player/stable
* demux: print initial metadataGravatar wm42014-07-07
| | | | | This was accidentally broken in 7e209185, and metadata was printed only when it changed.
* osc: fix failure when using DVD menusGravatar wm42014-07-07
| | | | [osc] Lua error: mp.assdraw:31: attempt to concatenate local 's' (a nil value)
* lua: redo error handling, print backtracesGravatar wm42014-07-07
| | | | | | | | | | | | | | | | | | | | The original goal was just adding backtraces, however making the code safe (especially wrt. to out of memory Lua errors) was hard. So this commit also restructures error handling to make it conceptually simpler. Now all Lua code is run inside a Lua error handling, except the calls for creating and destroying the Lua context, and calling the wrapper C function in a safe way. The new error handling is actually conceptually simpler and more correct, because you can just call any Lua function at initialization, without having to worry whwther it throws errors or not. Unfortunately, Lua 5.2 removes lua_cpcall(), so we have to emulate it. There isn't any way to emulate it in a way that works the same on 5.1 and 5.2 with the same semantics in error cases, so ifdeffery is needed. The debug.traceback() function also behaves weirdly differently between the Lua versions, so its output is not as nice as it could be (empty extra line).
* old-configure: fix Lua testsGravatar wm42014-07-07
| | | | This added every Lua that was found on the system.
* Remove stream_pts stuffGravatar wm42014-07-06
| | | | | This was used by DVD/BD, but its usage was removed with one of the previous commits.
* DOCS/client-api-changes: try to fix rst formatting againGravatar wm42014-07-06
|
* dvd, bd: enable precise seekingGravatar wm42014-07-06
| | | | | | | | | | | | | | | | | | | This should work now, at least kind of. Note that actual success depends on the behavior of the underlying lib{dvd{nav,read},bluray} implementation, which could go very wrong. In the worst case, it could happen that the underlying implementation seeks a long time before the seek target time. In this case, the player will just decode video until the target time is reached, even if that requires e.g. decoding 30 mintues of video before refreshing. In the not-so-bad but still bad case, it would just miss the seek target, and seek past it. In my tests, it works mostly ok, though. Seeking backwards usually fails, unless something like --hr-seek-demuxer-offset=1 is used (this makes it seek to 1 second before the target, which may or may not be enough to compensate for the DVD/BD imprecision).
* dvd, bluray: handle playback display time handling differentlyGravatar wm42014-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a pretty big change. Instead of doing a half-hearted passthrough of the playback timestamp, we attempt to rewrite the raw MPEG timestamps such that they match with the playback time. We add the offset between raw start timestamp and playback time to the packet timestamps. This is the easy part; but the problem is with timestamp resets. We simply detect timestamp discontinuities by checking whether they are more than 500ms apart (large enough for all video faster than 2 FPS and audio with reasonable framesizes/samplerates), and adjust the timestamp offset accordingly. This should work pretty well. There may be some problems with subtitles. If the first packet after a timestamp reset is a subtitle instead of video, it will fail. Also, selecting multiple audio or video streams won't work (but mpv doesn't allow selecting several anyway). Trying to demux subtitles with no video stream enabled will probably fail. Untested with Bluray, because I have no Bluray sample. Background: libdvdnav/libdvdread/libbluray make this relatively hard. They return a raw MPEG (PS/TS) byte stream, and additionally to that provide a function to retrieve the current "playback" time. The playback time is what should be displayed to the user, while the MPEG timestamps can be completely different. Even worse, the MPEG timestamps can reset. Since we use the libavformat demuxer (instead of parsing the MPEG packets in the DVD/BD code), it's hard to associate between these timestamps. As a result, the time display is special cased in the playloop, and of low quality (updates only all 1 or 2 seconds, sometimes is incorrect). The fact that the stream cache can be between demuxer and the stream source makes things worse. All the libs seem to provide an event that tells whether timestamps are resetting. But since this signalling is byte based, it's hard to connect it to the demuxed MPEG packets. It might be possible to create some sort of table mapping file positions to discontinuities and new timestamps. (For simplicity, this table could be 2 entries large, sufficient to catch all discontinuities if the distance between them is larger than the total buffering.)
* stream_dvdnav: more debugging outputGravatar wm42014-07-06
|
* demux: fix a corner case related to demux_discGravatar wm42014-07-06
| | | | | | It can happen that demux_fill_buffer() adds more than 1 packet, and then the packets would add up. Affects demux_disc.c only (nothing else uses this function).
* dvd: fix first subtitle with delayed subtitle streamsGravatar wm42014-07-06
| | | | | | This was accidentally broken with moving the DVD code to demux_disc.c. Also remove an abort() call meant for debugging.
* stream: remove now unused STREAM_CTRL_GET_START_TIMEGravatar wm42014-07-06
| | | | demux_disc.c takes care of this now.
* demux: minor simplificationGravatar wm42014-07-06
| | | | Oops, should have been part of commit 37085788.
* ao_pulse: set icon nameGravatar atomnuker2014-07-05
| | | | Will replace the generic XDG video icon inherited from media role.
* vf_vapoursynth: reset error state on seekingGravatar wm42014-07-05
| | | | | | | | | | | | When seeking, we violently destroy the filter, because vapoursynth has no proper API for terminating a video with unknown frame count. This looks like an error to vapoursynth, and the error is returned via the frame callbacks. The bug is that we remember this error state across reinitialization, so on the first filter call after reinitialization, we thought filtering the current frame failed. This caused a shift by 1 frame on each seek. CC: @mpv-player/stable
* build: allow compilation without any atomicsGravatar wm42014-07-05
| | | | | | | | | | | | | | | | | | | Not all compilers on all platforms have atomics available (even if they could, technically speaking). We don't use atomics that much, only the following things rely on it: 1. the audio pull code, and all audio outputs using it 2. updating global msg levels 3. reading log messages through the client API Just disable 1. and 3. if atomics are not available. For 2., using fake- atomics isn't too bad; at worst, message levels won't properly update under certain situations (but most likely, it will work just fine). This means if atomics are not available, the client API function mpv_request_log_messages() will do nothing. CC: @mpv-player/stable
* options: remove bogus replacement message for --fstypeGravatar wm42014-07-05
| | | | CC: @mpv-player/stable
* options: add --autosub-match to option replacement listGravatar wm42014-07-05
| | | | CC: @mpv-player/stable
* player: don't use stream position as fallback for percent-posGravatar wm42014-07-05
| | | | | | | | This should be unneeded, and the packet position is already sufficient for this case. Accessing the stream position directly is going to be a problem when the stream is accessed from another thread later.
* tv: move demuxer parts to separate fileGravatar wm42014-07-05
| | | | | Now all demuxer implementations (at least demuxer API-wise) are in the demux directory.
* demux: minor simplification to internal APIGravatar wm42014-07-05
| | | | Also some other unrelated minor changes.
* dvd: move angle switching codeGravatar wm42014-07-05
| | | | | No need to provide a "nice" API for it; just do this stuff directly in the command code.
* dvd: flush buffers properly on seekGravatar wm42014-07-05
| | | | | | | | | | | Suggested by tholin on github issue #882. This is not entirely clean, but the fields we're accessing might be considered internal to libavformat. On the other hand, existence of the fields is guaranteed by the ABI, and nothing in the libavformat doxygen suggestes they're not allowed to be accessed. CC: @mpv-player/stable
* dvd, bluray, cdda: add demux_disc containing all related hacksGravatar wm42014-07-05
| | | | | | | | | | | | DVD and Bluray (and to some extent cdda) require awful hacks all over the codebase to make them work. The main reason is that they act like container, but are entirely implemented on the stream layer. The raw mpeg data resulting from these streams must be "extended" with the container-like metadata transported via STREAM_CTRLs. The result were hacks all over demux.c and some higher-level parts. Add a "disc" pseudo-demuxer, and move all these hacks and special-cases to it.
* discnav: fix a commentGravatar wm42014-07-05
|
* demux: set filepos field when dequeuing a packetGravatar wm42014-07-05
| | | | Otherwise the position can be too far ahead.
* demux: cosmetics: minimize codeGravatar wm42014-07-05
|
* demux: make start time a simple fieldGravatar wm42014-07-05
| | | | Simpler, especially for later changes.
* demux, stream: change metadata notificationGravatar wm42014-07-05
| | | | | | | | | | | | (Again.) This time, we simply make it event-based, as it should be. This is done for both demuxer metadata and stream metadata. For some ogg-over-icy streams, 2 updates are reported on stream start. This is because libavformat reports an update right on start, while including the same info in the "static" metadata. I don't know if that's a bug or a feature.
* demux: make replaygain per-trackGravatar wm42014-07-05
| | | | | | It's unlikely that files with multiple audio tracks and with replaygain actually happen, but this change might help avoid minor corner cases with later changes.
* demux: move packet functions to a separate source fileGravatar wm42014-07-05
|
* demux: move packet list functionsGravatar wm42014-07-05
| | | | Move them to the only place where they are used, demux_subreader.c.
* demux_lavf: for now, ignore the new libavformat image demuxersGravatar wm42014-07-05
| | | | | | | | | | | | Recently, libavformat added demuxers to open image files like normal demuxers. This is a good thing, but for now they interfere with the operation of demux_mf. Add them to the blacklist until there is a proper solution. (The list doesn't contain _all_ recognized image formats, just those that might interfere with demux_mf.) CC: @mpv-player/stable
* demux_lavf: support OTF fonts in MatroskaGravatar wm42014-07-05
| | | | Apparently it's FFmpeg only.
* demux_lavf: don't dump transport stream programsGravatar wm42014-07-05
| | | | Probably useless.
* demux_lavf: cleanup debug outputGravatar wm42014-07-05
| | | | Remove unnecessary prefix, remove some messages.
* demux_lavf: fix read_seek return valueGravatar wm42014-07-05
| | | | | | | This returned a stream error value directly to libavformat, which can't make sense. For example STREAM_ERROR (0) means success in libavformat error codes. (The meaning of the libavformat read_seek return value is underdocumented too.)
* demux_mkv: cosmeticsGravatar wm42014-07-05
|
* DOCS, client API: add mpv release versionsGravatar wm42014-07-05
| | | | | | | | The intention is to make it obvious which mpv releases certain changes will apply to. Also attempt to fix RST formatting of the list. This is not very proper, but probably good enough.
* Merge pull request #909 from Nyx0uf/patch-1Gravatar Stefano Pigozzi2014-07-05
|\ | | | | OS X bundle: Add more imported UTI
| * OS X bundle: Add more imported UTIGravatar Nyx0uf2014-07-04
|/ | | Not that there are widely used formats, but it will allow to play them directly from the Finder.