summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* af: fix behavior with pathologic filter chainswm42015-07-071-0/+2
| | | | | | | | Some filter chains require a huge number of auto-inserted conversion filters. There is an overly stupid safeguard against infinite filter insertions, which counts the number of conversion filters inserted. This triggered accidentally in this case. Fix by resetting this counter after a non-conversion filter was successfully configured.
* sub: fix srt subs and other caseswm42015-07-071-0/+1
| | | | Oops.
* player: add missing include directivewm42015-07-061-0/+1
|
* sub: protect ASS_Renderer statewm42015-07-067-4/+24
| | | | | | | | | | | | | | | | | | | Each subtitle track gets its own decoder instance (sd_ass). But they use a shared ASS_Renderer. This is done mainly because of fontconfig. Initializing fontconfig is very slow when using it with memory fonts, so there's a practical need to cache this memory font state, which is done by not creating separate ASS_Renderers. This is very dirty and very evil, but we probably can't get rid of it any time soon. The shared ASS_Renderer was not properly synchronized. While the program logic guarantees that only one sd_ass instance is visible at a time, there are other interactions that require synchronization. In particular, I suspect concurrent execution of mp_ass_configure_fonts() and sd_ass.get_bitmaps cause issues in a newer libass development branch. So here's a shitty hack that hopefully fixes things, hopefully only until libass becomes less dependent on fontconfig.
* dxva2: fix handling of cropped videowm42015-07-061-1/+5
| | | | | | Basically, we need to make sure to allocate enough data for the pretty dumb copy_nv12 function. (It could be avoided by making the function less dumb, but this fix is simpler.)
* ao_coreaudio: fix device latency, share the codewm42015-07-064-23/+25
| | | | | | | | | ao_coreaudio (using AudioUnit) accounted only for part of the latency - move the code in ao_coreaudio_exclusive to utils, and use that for the AudioUnit code. (There's still the question why CoreAudio and AudioUnit require you to jump through hoops this much, but apparently that's how it is.)
* ipc: fix undefined behavior in some error caseswm42015-07-061-1/+2
| | | | goto jumping over an initialization.
* ao_coreaudio_exclusive: continue even if setting physical format failswm42015-07-062-2/+4
| | | | | Makes it work with (apparently) crappy drivers, which refuse to set the physical format in some cases.
* video: replace our own refcounting with libavutil'swm42015-07-054-150/+123
| | | | | | | | | | | | | | | | | | | | | | mpv had refcounted frames before libav*, so we were not using libavutil's facilities. Change this and drop our own code. Since AVFrames are not actually refcounted, and only the image data they reference, the semantics change a bit. This affects mainly mp_image_pool, which was operating on whole images instead of buffers. While we could work on AVBufferRefs instead (and use AVBufferPool), this doesn't work for use with hardware decoding, which doesn't map cleanly to FFmpeg's reference counting. But it worked out. One weird consequence is that we still need our custom image data allocation function (for normal image data), because AVFrame's uses multiple buffers. There also seems to be a timing-dependent problem with vaapi (the pool appears to be "leaking" surfaces). I don't know if this is a new problem, or whether the code changes just happened to cause it more often. Raising the number of reserved surfaces seemed to fix it, but since it appears to be timing dependent, and I couldn't find anything wrong with the code, I'm just going to assume it's not a new bug.
* mp_image: make image writeable before overwriting palettewm42015-07-051-2/+4
| | | | This is an obscure but theoretically possible bug.
* vo: free frames before killing VOwm42015-07-041-1/+1
| | | | | | This caused issues with hardware decoding. The VOs by definition dictate the lifetime of the hardware context, so no surface allocations must survive the VO. Fixes assertions on exit with vdpau.
* ao_coreaudio_exclusive: fix some verbose outputwm42015-07-041-2/+2
|
* timer: fix a corner case on clock changeswm42015-07-041-1/+4
| | | | | | | | | | | | | | | | It's conceivable that the OS time source is subject to clock changes. The time could jump back to before when mpv was started, which would cause mp_time_us() to return values smaller than 1. This is unexpected by the code and could trigger assertions. If there's no monotonic time source there's not much we can do anyway, so just sanitize the return value. It will cause strange behavior until the "lost" time offset has passed, but if you make such huge changes to the system clock while everything is running, you're asking for trouble anyway. (Normally we try to get a monotonic time source, though. This problem sometimes happened on Windows when compiled without winpthreads, when the code was falling back to gettimeofday(). This was already fixed by always using another method.)
* win32: use QueryPerformanceCounter for timingJames Ross-Gowan2015-07-041-13/+11
| | | | | | | | | | | | clock_gettime is implemented in winpthreads, so it's unavailable when mpv is compiled with its internal pthreads implementation. This makes mp_raw_time_us fall back to gettimeofday(), which can cause an assert failure in mp_add_timeout() when the system clock is changed. Use QueryPerformanceCounter instead. The clock_gettime(CLOCK_MONOTONIC) implementation in winpthreads uses QueryPerformanceCounter anyway, so there shouldn't be any change in behaviour.
* ipc: add request_id to jsonPreston Hunt2015-07-032-0/+28
| | | | | | | | | | | | If the request contains a "request_id", copy it back into the response. There is no interpretation of the request_id value by mpv; the only purpose is to make it easier on the requester by providing an ability to match up responses with requests. Because the IPC mechanism sends events continously, it's possible for the response to a request to arrive several events after the request was made. This can make it very difficult on the requester to determine which response goes to which request.
* manpage: fix dwmflush parameterwm42015-07-031-1/+2
|
* vo: set correct frame parameters on redrawwm42015-07-031-2/+2
|
* ao: don't pass along AO arguments when redirectingwm42015-07-031-1/+1
| | | | Only causes problems.
* ao_coreaudio: add exclusive suboptionwm42015-07-033-2/+10
|
* ao_coreaudio_exclusive: support PCMwm42015-07-032-17/+35
| | | | | | | | | | | | | | | | | | Until now, this was for AC3 only. For PCM, we used AudioUnit in ao_coreaudio, and the only reason ao_coreaudio_exclusive exists is that there is no other way to passthrough AC3. PCM support is actually rather simple. The most complicated issue is that modern OS X versions actually do not support copying through the data; instead everything must go through float. So we have to deal with virtual and physical format being different, which causes some complications. This possibly also doesn't support some other things correctly. For one, if the device allows non-interleaved output only, we will probably fail. (I couldn't test it, so I don't even know what is required. Supporting it would probably be rather simple, and we already do it with AudioUnit.)
* ao_coraudio: reject all non-PCM formatswm42015-07-031-1/+1
| | | | | Currently this is equivalent. On the other hand, all audio code should reject formats that is not in a category known to it.
* ao_coreaudio_utils: reduce spamwm42015-07-031-1/+0
|
* ao_coreaudio_utils: fix format back-mappingwm42015-07-031-5/+7
| | | | | | | | | | | Mapping of spdif formats was imperfect. Since the first format on the list is somehow AAC, it was returned first, which is confusing, because CoreAudio calls all spdif formats AC3. Since the spdif formats have some rather arbitrary, reverse mapping the formats didn"t actually work either. Fix by explicitly ignoring these when spdif is used. Also, don't forget to set the samplerate in ca_asbd_to_mpformat(), or it will work only in some cases.
* ao_coreaudio_exclusive: do not set ao->bpswm42015-07-031-3/+0
| | | | | This field is basically deprecated or for convenience only, and this code doesn't need it.
* ao_coreaudio_exclusive: dump all latency info in verbose modewm42015-07-031-1/+4
|
* ao_coreaudio_exclusive: factor format selectionwm42015-07-031-35/+44
|
* ao_coreaudio_exclusive: separate out stream selectionwm42015-07-031-61/+76
|
* client API, dxva2: add a workaround for OpenGL fullscreen issueswm42015-07-038-0/+101
| | | | | | | | | This is basically a hack for drivers which prevent the mpv DXVA2 decoder glue from working if OpenGL is in fullscreen mode. Since it doesn't add any "hard" new API to the client API, some of the code would be required for a true zero-copy hw decoding pipeline, and sine it isn't too much code after all, this is probably acceptable.
* vo_direct3d, dxva2: use the same D3D devicewm42015-07-034-0/+42
| | | | | Since we still read-back (and don't have hard plans on changing this), this doesn't have much of an advantage.
* dxva2: move device creation codewm42015-07-031-34/+50
| | | | Preparation for the following commit.
* vo_opengl: log some more stuff in verbose modewm42015-07-032-1/+4
|
* av_log: print FFmpeg versionwm42015-07-033-0/+16
| | | | | The individual library versionsd are pretty useless. This will actually tell us at least the git hash or git tag of the FFmpeg build.
* player: simplify reload logicwm42015-07-024-20/+15
| | | | Instead of only reloading the demuxer, reopen the stream as well.
* player: remove automatic DVB channel advancement on no datawm42015-07-021-6/+0
| | | | | | | | For the sake of removing the separate stream/demuxer loading code. This could probably be reimplemented in some other way, but I have no DVB hardware for testing. The most preferred way would be making DVB to not quit, and just rerun the stream selection.
* player: unentangle --stream-dumpwm42015-07-023-12/+15
| | | | | | | | The final goal is making opening the demuxer and opening the stream the same operation. Stream dumping is a rather uninteresting feature, but has a small number of vocal users, and it's easy to keep.
* vo_opengl: fix "freezes" after seeking with interpolation onwm42015-07-021-1/+5
| | | | | | | | | | | | | | | | | | | | When seeking to a different position, and seeking takes long, the OSD might get redrawn. This means that the VO will receive a request to redraw an old frame using whatever the previous PTS was. This breaks the interpolation logic: the old frame will be added to the queue, and then the next frames (with lower PTS if you seeked backwards) are not drawn as the logic assumes they're past frames. Fix this by using the non-interpolation code path when redrawing after a seek reset, and no "real" frame has been drawn yet. It's a recent regression caused by the redrawing code simplification. The old code simply sent a VOCTRL for redrawing the frame, and the VO had to deal with retaining the old frame on its own. This is a hack as in there's probably a better solution. Fixes #2097.
* vo: reset frame timing when redrawingwm42015-07-021-0/+2
| | | | bother vo_vdpau.c, which actually uses these times.
* vo_opengl: X11: don't leak when GL init failswm42015-07-021-1/+4
|
* vo_opengl: X11 EGL: more detailed error reportingwm42015-07-021-2/+6
|
* vo_opengl: update EGL codewm42015-07-023-20/+35
| | | | Use the newer internal GL backend API.
* vo_opengl: remove unused GL API functionswm42015-07-022-4/+0
|
* x11: move GCs and background clearing to vo_xvwm42015-07-013-48/+49
| | | | vo_xv.c is the only place where these things are used.
* x11: remove clear on mapwm42015-07-012-12/+0
| | | | | | | | Less code, and avoids a black flash on start. In theory it could happen that we map the window, and then don't have a frame to draw - but mapping the window is done in the exact moment we have a new frame to display.
* options: fix conversion of flags to stringswm42015-07-011-2/+7
| | | | | | | | | | This flags stuff tried to be too clever - if there are overlapping flags (e.g. exclusive or combined flags), the one matching with most bits has to be chosen. This fixes logging of the seek command. E.g. "relative" and "absolute" overlap to make them exclusive, but "relative" was always printed as it happened to match first.
* vo: better magic value for unknown vsync intervalwm42015-07-012-1/+2
| | | | | The value 1 is useful in some contexts, but not such a good choice otherwise.
* vo_opengl_cb: fix interpolation code pathwm42015-07-011-6/+2
|
* vo_opengl: fix framestepping/pausing + interpolationNiklas Haas2015-07-011-2/+8
| | | | | | | | This is not the most theoretically perfect solution, ideally we could check to see if the frame in question has already been rendered somewhere in the queue and then avoid re-rendering it, at the cost of a few extra lines of code. But I don't think the performance trade-off is dramatic enough here.
* vo: change internal API for drawing frameswm42015-07-018-270/+267
| | | | | | | | | | | | | | draw_image_timed is renamed to draw_frame. struct frame_timing is renamed to vo_frame. flip_page_timed is merged into draw_frame (the additional parameters are part of struct vo_frame). draw_frame also deprecates VOCTRL_REDRAW_FRAME, and replaces it with a method that works for both VOs which can cache the current frame, and VOs which need to redraw it anyway. This is preparation to making the interpolation and (work in progress) display sync code saner. Lots of other refactoring, and also some simplifications.
* vo_opengl: adjust interpolation code for the new video-sync mechanismNiklas Haas2015-07-015-115/+117
| | | | | | | | | | | | | This should make interpolation work much better in general, although there still might be some side effects for unusual framerates (eg. 35 Hz or 48 Hz). Most of the common framerates are tested and working fine. (24 Hz, 30 Hz, 60 Hz) The new code doesn't have support for oversample yet, so it's been removed (and will most likely be reimplemented in a cleaner way if there's enough demand). I would recommend using something like robidoux or mitchell instead of oversample, though - they're much smoother for the common cases.
* video: pass vsync offset to VOwm42015-07-012-0/+3
| | | | | | | For now, this is trivial (and actually redundant). The future display sync code will make better use of it. The main point is that the new internal API pretty much makes this transparent to the vo_opengl interpolation code.
* video: pass future frames to VOwm42015-07-017-44/+142
| | | | | | | | | | Now the VO can request a number of future frames with the last parameter of vo_set_queue_params(). This will be helpful to fix the interpolation code. Note that the first frame (after playback start or seeking) will usually not have any future frames (to make seeking fast). Near the end of the file, the number of future frames will become lower as well.
* af_lavrresample: log actual channel layout conversionswm42015-06-301-3/+6
| | | | | With all the reordering etc. that can go on in this filter, it's useful to see what upmix/downmix it's actually performing.
* demux_lavf: check for NAN rotation angleswm42015-06-301-3/+5
| | | | Yep, the FFmpeg API can return this.
* player: slim down A/V desync warningwm42015-06-301-17/+5
| | | | | I don't think most of these suggestions are overly helpful. Just get rid of them.
* build: always regenerate version hashwm42015-06-303-30/+17
| | | | | | | | | Until now, it only used the hash from the previous configure run, instead of trying to get the latest hash. The "old" build system did this correctly - we just have to use the existing logic in version.sh. Since waf supports separate build dirs, extend version.sh with an argument for setting the path of version.h.
* manpage: fix copy&paste mistakeswm42015-06-301-22/+20
| | | | | | | These are definitely not per-track. (Maybe we should just provide a script or such which pretty-prints "native" property output.
* input.conf: invert mouse volume controlMartin Herkt2015-06-301-2/+2
| | | | Scrolling right should increase volume, not decrease it.
* input: improve wording of key binding messageswm42015-06-301-2/+2
|
* ao_coreaudio: restore physical format if it can't be set exactlywm42015-06-302-2/+14
| | | | | | | | May help with (supposedly) bad drivers, which can put the device into some sort of broken state when trying to set a different physical format. When the previous format is restored, it apparently recovers. This might make the change-physical-format suboption more robust.
* ao_coreaudio: support native mono outputwm42015-06-291-0/+2
| | | | | | | We can be pretty sure that AudioUnit will remix for us. Before this commit, we usually upmixed to stereo, because the stereo and multichannel layouts were the only whitelisted ones.
* ao_coreaudio: log hotplug events explicitlywm42015-06-291-3/+6
|
* video: fix panscan in vertical casewm42015-06-291-3/+8
| | | | | If the black bars appeared on the left/right borders, panscan=1 didn't make the video cover the whole screen.
* DOCS/man: fix some grammar errorsDaniel Bergmann2015-06-293-4/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vaapi: prefer direct display over copy-backwm42015-06-291-1/+1
| | | | | | Again. With the old OpenGL interop dropped, this probably works better than vaapi-copy now. Last time we defaulted to vaapi-copy, because the OpenGL interop could swap U/V planes and other stupid crap. We'll see.
* vaapi: treat cropped decoder output slightly more correctlywm42015-06-291-2/+13
| | | | | | | | | | | | Work around that FFmpeg doesn't distinguish between surface and cropped size. The decoder always aligns the surface size to something "convenient" (e.g. 16 for h264), and to get to the correct cropped size, the output image's width/height is reduced. Using the cropped size instead of the real surface size breaks the libva API in certain cases, so we simply store and use the original size in our per-surface struct. (If data is cropped on the left/top borders, hw decoding will simply display these - FFmpeg doesn't let us do better.)
* vaapi: fix potential NULL deref on memory allocation failurewm42015-06-291-2/+3
|
* vaapi: remove vaDeriveImage() code pathwm42015-06-291-40/+17
| | | | | | | In theory, this code path avoids a copy. In practice, it never seems to get enabled at all. But it does have potential for weird bugs or performance issues (like being mapped from non-cacheable memory), so kill it.
* x11: remove trailing spaceswm42015-06-291-1/+1
|
* x11: Handle external fullscreen togglesEduardo Sánchez Muñoz2015-06-282-1/+44
| | | | | | | | | | | | | | | Some window managers let you change the fullscreen state of any window using a key combination. For example, on XFWM you can use Alt+F11 and on Compiz you can configure a key combination with the "Extra WM actions" plugin. With this change mpv will handle these fullscreen state changes. So, if you enter into fullscreen mode using the WM's shortcut and then you use mpv's fullscreen toggle, you will get back into window mode. Merges PR #2081. Signed-off-by: wm4 <wm4@nowhere>
* demux_mkv: disable ordered chapters if ChapterTimeEnd is missingwm42015-06-281-2/+11
| | | |