summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux_mkv: remove unnecessary codewm42015-07-201-4/+0
| | | | This did nothing. It's a leftover from ancient times.
* demux_mkv: parse FLAC channel layoutswm42015-07-201-0/+67
| | | | | | | | | | | | | | | | | | Handle a relatively recently introduced hack, that allows FLAC audio to have arbitrary channel layouts, instead of just the predefined fixed ones. This is actually supported by FFmpeg, but since the demuxer (instead of the decoder) handles this in FFmpeg, we need to add special- code to our mkv demuxer. (The way FFmpeg does this seems a bit backwards, since now every demuxer for a format that can handle FLAC needs to contain this logic as well.) The FLAC hack is relatively terrible: we need to parse the FLAC headers, look for a VorbisComment, parse the VorbisComment, and then retrieve the magic WAVEFORMATEXTENSIBLE_CHANNEL_MASK entry. But the hack is officially endorsed, as the official FLAC tools use it. (Although I couldn't find a trace of it in the format specification. Should I be surprised?)
* vo_opengl: make oversample the default for opengl-hq as wellNiklas Haas2015-07-201-1/+1
| | | | | This was supposed to have changed back when oversample was reintroduced in 3007250. Fixes #2155.
* af_lavrresample: always reinit resampler on filter reinitwm42015-07-191-18/+1
| | | | | | | | This was a minor optimization to potentially avoid resampler reconfiguration when the filter is reinitialized. But filter reinitialization is a rare event, and the case when no reconfiguration is needed is even rarer. As such, this is an unnecessary micro- optimization and only adds potential for bugs.
* af_lavrresample: don't unnecessarily print remix messagewm42015-07-191-8/+8
| | | | | | | | | This message bloats verbose log output if e.g. audio speed is frequently readjusted, such as when syncing audio to video. So don't print the message if only speed is changed. (This case requires reconfiguration, but can't change the input/output channel maps.) Also do not print the message if no remixing is done at all.
* TOOLS/zsh.pl: die loudly if mpv fails to runPhilip Sequeira2015-07-191-2/+13
|
* vf_vapoursynth: relicense to LGPL 2.1+wm42015-07-191-7/+7
| | | | | | | | | This was requested by someone. All code was written by myself; some minor changes by 2 contributors who agreed to general LGPL relicensing. 1 line of code is by someone unknown who possibly wasn't asked (setting the "display_fps" variable), and which can be reasonably ignored as it makes up only 0.1% of the file.
* build: update waf to 1.8.12Stefano Pigozzi2015-07-181-2/+2
|
* command: add track-list/N/audio-channels propertydeuiore2015-07-183-0/+14
| | | | | | Signed-off-by: wm4 <wm4@nowhere> (With some heavy modifications from the original patch.)
* vo_opengl: make the size of interpolation textures exactNiklas Haas2015-07-181-2/+2
| | | | | | | | | | | | I still have no idea why this is needed, maybe some weird off-by-one in some shitty driver? Either way, the difference for a working setup shouldn't be too major, the most noticeable effect would be somewhat worse performance when resizing the video during playback with interpolation enabled using the mouse. That's a specific enough side effect for me to not care as much about it. Fixes #1814.
* screenshot: don't write PNG colorspace tags by defaultwm42015-07-183-2/+3
| | | | | | Generates too much discussion and confusion. Fixes #2051.
* sub: add option for stretching image subtitles to screenwm42015-07-185-0/+17
| | | | | | | Probably makes users happy who want bitmap subtitles to show up in the screen margins, and stops them from doing idiotic crap with vf_expand. Fixes #2098.
* av_log: remove dumb shitwm42015-07-181-24/+1
| | | | | | | It's the user's fault if he/she/it does something that is not recommended. Fixes #2110.
* vo_opengl: cleanup frame reupload logicwm42015-07-171-8/+9
| | | | | | | | There are some situations when redrawing is requested, but the current frame was deleted. This could happen when switching e.g. hw decoding mid-stream. Separate uploading/drawing and fix the condition.
* build: fix windows compilation after cleanStefano Pigozzi2015-07-171-3/+5
| | | | broken since 4730e0aabab
* TOOLS: make autodeint detect telecine in parallelKevin Mitchell2015-07-161-45/+26
| | | | This avoids having to rewind the video for a second telecine detection pass.
* vo_opengl: refactor queue configurationwm42015-07-164-23/+29
| | | | | | | Just avoid some code duplication. Also, gl_video_set_options() having a queue size output parameter is weird at best. While I don't appreciate that this commit suddenly requires gl_video.c to deal with vo.c directly in a special case, it's simply the best place to put this function.
* vo: fix number of future frameswm42015-07-162-2/+2
| | | | | | That was 2 too many. Also fix a documentation comment.
* build: make mpv.rc depend on version.hStefano Pigozzi2015-07-151-0/+4
|
* vo_opengl: reject future images in different formatswm42015-07-151-1/+2
| | | | | | | | | | | | | The VO will be provided with future frames even if the format changes mid-stream. This caused a crash if these frames were actually used (i.e. interpolation mode was enabled). Fixes a crash when deinterlacing is toggled during playback, and the deinterlacer changes the stream format (as it can happen e.g. if the decoder outputs nv12, which in turn happens with hw decoding). (On a side note, future frames are always non-NULL. Also, the current frame is of course always in the correct format.)
* vaapi: destroy derived VAImage after each usewm42015-07-151-0/+4
| | | | Appears to be required by some hardware. Whatever.
* vo_vaapi: drop unused fieldwm42015-07-151-2/+0
|
* vaapi: don't assume vaQueryImageFormats() returns sorted listwm42015-07-151-8/+13
| | | | | | | | | | | | | vaQueryImageFormats() returns a randomly ordered list - so we shouldn't assume the first format on the list which works is the best. This effectively switches to nv12 instead of yuv420p on some drivers. We handle this by reusing va_to_imgfmt[], and ordering it by preference. We hardcode that GPUs prefer nv12 pver yuv420p. In theory we could do complicated probing (allocate dummy surface + use vaDeriveImage on it, then retrieve the FourCC) - but all things which could break assumption in the future are not supported yet (like 10 bit or 4:4:4), so this is fine.
* Revert "vaapi: remove vaDeriveImage() code path"wm42015-07-151-17/+40
| | | | | | This reverts commit d660e67be9cc7d79d81e0c09c2720ea6d0a35e3a. Fixes #2123.
* vaapi: allow allocating additional surfaces during decodingwm42015-07-151-3/+2
| | | | | | | | | | | | | Fixes problems with --vo=opengl:interpolation. The issue here is that vo_opengl retains more surfaces than what was preallocated for the decoder. Until now, we just explicitly failed to decode frames for which no additional surfaces are available. Since modern drivers usually are fine with not "registering" surfaces before the decoder is created, just allow allocating additional surfaces if needed. (We also could probably recreate the HW decoder, since the HW decoder should be stateless. But let's try to avoid raising the overall complexity of the code.)
* vo_opengl: simplifywm42015-07-151-26/+11
| | | | | After recent changes, there is no reason why gl_video_set_image() should exist anymore. So merge it back into gl_video_upload_image().
* player: show larger cache sizes in MB on status linewm42015-07-141-1/+5
|
* build: don't make version.sh create version.h by defaultwm42015-07-142-7/+6
| | | | | You could actually run version.sh, and then the waf build system could accidentally pick up the generated (and most likely stale) version.h.
* vf_vdpaupp: Don't crash when evaluating interlacing of NULL mpiPhilip Langdale2015-07-141-1/+1
| | | | | | | The interlaced frame test needs to be aware that the input mpi might be NULL - this happens at the end of a stream when the input frames have all been submitted but frames still need to be drained from the decoder.
* README: remove dead links to mailing listswm42015-07-141-4/+0
| | | | | | These were deleted due to inactivity. Fixes #2135.
* 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