summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* player: add missing \n to a messagewm42015-07-131-1/+1
|
* manpage: fix typowm42015-07-131-1/+1
| | | | The (...) was closed, but never opened.
* sub: call ass_set_fonts() only oncewm42015-07-131-10/+3
| | | | | | | | | | | | | ass_set_fonts() is called by mp_ass_configure_fonts(), which was called every time a subtitle renderer was initialized. I'm not sure why this was done - I can't find a good reason, and most likely there's none. However, it did cause problems with an experimental libass branch. It crashed some time after switching to a second subtitle track. The branch will hopefully be merged soon, and it seems unlikely that libass wants to fix its problems with its ridiculous API (rather it should normalize its API so that the issue doesn't happen in the first place), so just apply this change. It makes our code simpler too.
* player: extend --hls-bitrate optionwm42015-07-133-8/+17
| | | | Fixes #2116.
* player: put --term-playing-msg in a separate log categorywm42015-07-131-1/+3
| | | | Fixes #1983.
* demux: handle Matroska-style replaygain tags as wellwm42015-07-121-0/+8
| | | | | | | Matroska doesn't follow the usual ReplayGain conventions, and doesn't distinguish between track/album values. Fixes #2128.
* demux: refactor replaygain tag handlingwm42015-07-121-17/+19
| | | | | For the following commit. Also print the replaygain values in verbose mode.
* bootstrap: change waf primary mirrorStefano Pigozzi2015-07-121-1/+1
| | | | | Requested by waf's developer. The ftp mirror is going to be closed down in the short future.
* build: fix version.h creationStefano Pigozzi2015-07-122-5/+18
| | | | | Previous code did not retrigger a relink when version.h changed since it didn't use a waf task.
* player: use exit code 0 by default for quit, 4 for signals, etc.Philip Sequeira2015-07-114-8/+9
| | | | | | Default key bindings in encoding mode also use code 4, because scripts will probably want to fail if encoding is aborted (leaving an incomplete file).
* vo_opengl: reduce verbose outputwm42015-07-111-26/+2
| | | | | | | | | Outputting the detected OpenGL features was useless and redundant with the extension loading output. Also, remove MPGL_CAP_3D_TEX from OpenGL(ES) 3.0. This block didn't include the glTexImage3D function, so that was pointless and couldn't have worked. The OpenGL 2.1 block does it correctly.
* vo_vdpau: Implement rotation supportPhilip Langdale2015-07-111-8/+84
| | | | | | | | | | | | | | | | | | | | VDPAU has explicit support for rotating surfaces, and it is far less expensive than using the normal rotation filter (which would require reading video frames back into system memory), it is desirable to implement the VO rotation capability. To do this, we need to render the video frames to an output surface, without rotation, and then render from that surface to the final output surface to apply the rotation. It is important that the intermediate surface is the same size as the final one (only not rotated) so that hqscaling can be applied if requested by the user. (hqscaling is a mixer capability and so takes effect when the video surface is rendered to an output surface) Finally, we must remember to explicitly clear the final output surface as VDPAU only auto-clears output surfaces when rendering video surfaces.
* vo_opengl: reimplement tscale=oversampleNiklas Haas2015-07-112-10/+33
| | | | Closes #2102.
* vf_vdpaurb: Add a new filter for reading back vdpau decoded framesPhilip Langdale2015-07-115-1/+124
| | | | | | | | | | | | | | | | | Normally, vdpau decoded frames are passed directly to a suitable vo (vo_vdpau or vo_opengl) without ever touching system memory. This is efficient for output purposes, but prevents any of the regular filters from being used with such frames. This new filter implements a read-back step to pull the frames back into system memory where they can be acted on by other filters. Eventually the frames will be sent to the vo as if they were normal software-decoded frames. Note that a vdpau compatible vo must still be used to ensure that the decoder is properly initialised. Signed-off-by: wm4 <wm4@nowhere>
* player: parse and expose m3u playlist titleswm42015-07-105-4/+28
| | | | Requested. Closes #2100.
* video: don't force video refresh if video is restartingwm42015-07-101-1/+3
|
* video: add a way to disable automatic stereo conversionwm42015-07-103-3/+5
| | | | Fixes #2111.
* vf_stereo3d: drop internal implementationwm42015-07-101-393/+15
| | | | Leave the libavfilter wrapper only.
* stream_file: remove an indirectionwm42015-07-101-17/+13
| | | | Remove the "fd" local variable, and always use "p->fd" directly.
* stream_file: cosmetics: shorten variable namewm42015-07-101-10/+10
| | | | Can't be bothered to type this much.
* gl_hwdec: change wording in verbose messagewm42015-07-101-1/+1
|
* player: refactor chapter seek codewm42015-07-103-24/+7
| | | | | | | mp_seek_chapter() had only 1 caller. Also the code was rather roundabout; the entire function can be compressed to 5 lines of code. (The new code is functionally the same - "mpctx->last_chapter_seek = -2;" was effectively a dead assingment.)
* client API: fix mpv_get_property_async() string casewm42015-07-101-1/+1
| | | | | | | The logic for this code didn't survive the previous refactor. It always crashed in async mode. Fixes #2121.
* stream_file: initialize `fd`Ben Boeckel2015-07-091-1/+2
| | | | | Use the fd variable and delay assignment to priv->fd to mirror other branches of the if/else tree.
* demux_mkv: improve video duration detection heuristicwm42015-07-092-17/+35
| | | | | | | | | | | Extend the --demuxer-mkv-probe-video-duration behavior to work with files that are partial and are missing an index. Do this by finding a cluster 10MB before the end of the file, and if that fails, just read the entire file. This is actually pretty trivial to do and requires only 5 lines of code. Also add a mode that always reads the entire file to estimate the video duration.
* stream_file: add fd:// protocolwm42015-07-092-2/+15
|
* player: disable seeking even if the cache is enabledwm42015-07-085-3/+11
| | | | | | | | | | | | | | Until now, if a stream wasn't seekable, but the stream cache was enabled (--cache), we've enabled seeking anyway. The idea was that at least short seeks would typically fall within the cache. And if not, the user was out of luck and terrible things happened. In other words, it was unreliable. Be stricter about it and remove this behavior. Effectively, this will for example disable seeking in piped data. Instead of trying to be clever, add an --force-seekable option, which will always enable seeking if the user really wants it.
* player: never overwrite stop_play fieldwm42015-07-085-13/+21
| | | | | | | This is a real pain: if a quit command is received, it's set to PT_QUIT. And then other code could overwrite it, making it not quit. The annoying bit is that stop_play is written and read in many places. Just not overwriting it unconditionally seems to be the best course of action.
* input: fix exit code for quit-watch-later commandwm42015-07-081-1/+1
| | | | It should have the same default as the "quit" command.
* command: allow changing deinterlace property any timewm42015-07-081-1/+1
| | | | Don't require video decoding to be active.
* vf_vdpaupp: don't attempt to deinterlace progressive frameswm42015-07-083-6/+14
|
* mp_image: fix vf_vdpaupp referenceswm42015-07-081-2/+0
| | | | | | | | | | Some code called by vf_vdpaupp.c calls mp_image_new_custom_ref(), but out of convenience doesn't reset the buffers. Make this behavior ok. (The assert() was there to catch usage errors, but the same error could already happen before the refcount changes were made, so the check is not overly helpful.) Fixes #2115.
* vaapi: drop compatibility crap and vo_vaapi deinterlacerwm42015-07-085-97/+16
| | | | | | | | | | | Drop libva versions below 0.34.0. These are ancient, so I don't care. Drop the vo_vaapi deinterlacer as well. With 0.34.0, VPP is always available, and deinterlacing is done with vf_vavpp. The vaCreateSurfaces() function changes its signature - actually it did in 0.34.0 or so, and the <va/va_compat.h> defined a macro to make it use the old signature.
* vf_vavpp: don't attempt to deinterlace progressive frameswm42015-07-083-0/+12
|
* vaapi: increase number of additional surfaceswm42015-07-081-6/+2
| | | | | | | | | | | | | | | | | | | Sometime recently, hardware decoding started to fail if h264 with full reference frames was decoded, and --vo=vaapi was used. VAAPI requires registering all surfaces that the decoder will ever use in advance, so if the playback chain uses more surfaces than originally allocated, we fail and drop back to software decoding. I'm not really sure why or when this started happening. Commit 7b9d7265 for one is not the cause - it can be reproduced with earlier commits. It also seems to be timing dependent. Possibly it has to do with the way vo.c retains previous surfaces, and the way they can be queued/unqueued asynchronously. Increasing the number of reserved additional surfaces by 1 fixes it. (Though I have no idea where exactly all these surfaces are being used. Or rather, _when_.)
* command: make deinterlace property use interlaced-only yadif modewm42015-07-072-2/+3
|
* vf_yadif: expose interlaced frame modewm42015-07-072-14/+9
| | | | | Also remove the enabled suboption, which did nothing. (It was probably broken at some point.)
* vo_opengl_cb, vo_opengl: add option for preloading hwdec contextwm42015-07-078-14/+42
| | | | | | | | See manpage additions. This is mainly useful for vo_opengl_cb, but can also be applied to vo_opengl. On a side note, gl_hwdec_load_api() should stop using a name string, and instead always use the IDs. This should be cleaned up another time.
* options: cleanup hwdec name mappingswm42015-07-072-10/+20
| | | | | | | | | Now there's a "canonical" table for mapping the names, that other code can use, without having to rely too much on option code magic. Also, use the central HWDEC constants, instead of magic values. (There used to be semi-ok reasons to do this, but now it makes no sense anymore.)
* vo_opengl_cb: drop frames eagerly if frames are not renderedwm42015-07-071-1/+7
| | | | | libmpv users might stop calling the frame render callback for stupid reasons, at which point video frames would pile up.
* 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
| | | | |