summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* vf_lavfi: reinit after libavfilter EOFwm42014-05-021-13/+25
| | | | | | Basically, if we feed the filter a new image even after the EOF state has been reached (e.g. because the input stream "recovered"), we want the filter to restart, instead of returning an error forever.
* vo: verify format of queued imagewm42014-05-021-0/+1
| | | | | Currently, only the configured format is accepted, so assert that the playback core code (which handles format changes) is correct.
* video: fix screenshots with anamorphic videowm42014-05-021-2/+2
| | | | | | | (Again.) This was caused by mp_image_set_params() not properly copying d_w/d_h, because mp_image_set_size() resets them.
* vf_vdpaupp: always provide past and future fieldswm42014-05-021-1/+1
| | | | | | | | | | | Some non-deinterlacing filters (potentially denoising) also use additional frames for filtering. The vdpau docs suggest providing at least 1 future and 2 past _fields_, which means we need to provide 1 past frame (the future field is already the other field of the current field, and both fields are in the same frame). We can easily achieve this by buffering an additional frame in the non- deint case.
* vo_vdpau: keep colorspace flagswm42014-05-021-1/+2
| | | | | Since vdpau_mixer.c initializes the YUV conversion using the mp_image flags, these images should have all flags set properly.
* video: move video frame queue from vo_vdpau.c to vo.cwm42014-05-023-145/+102
| | | | | | | | | | | | | | | | | | | | | Remove the special casing of vo_vdpau vs. other VOs. Replace the complicated interaction between vo.c and vo_vdpau.c with a simple queue in vo.c. VOs other than vdpau are handled by setting the length of the queue to 1 (this is essentially what waiting_mpi was). Note that vo_vdpau.c seems to have buffered only 1 or 2 frames into the future, while the remaining 3 or 4 frames were past frames. So the new code buffers 2 frames (vo_vdpau.c requests this queue length by setting vo->max_video_queue to 2). It should probably be investigated why vo_vdpau.c kept so many past frames. The field vo->redrawing is removed. I'm not really sure what that would be needed for; it seems pointless. Future directions include making the interface between playloop and VO simpler, as well as making rendering a frame a single operation, as opposed to the weird 3-step sequence of rendering, drawing OSD, and flipping.
* vo_vdpau: always use mp_image for internal buffer queuewm42014-05-021-44/+39
|
* command, vo_vdpau: respect vdpau deint sub-optionwm42014-05-023-2/+20
| | | | | This is a horrible hack to keep compatibility with the vo_vdpau deint sub-option.
* command: redo deinterlace filter probingwm42014-05-021-18/+27
| | | | | | | Give up on the deint_filters[] array, and probe using explicit code instead. Add additional checks to test the pixel format to avoid annoying warnings when a hardware deinterlacer is inserted when the current video chain is obviously incompatible.
* command: make enabling deinterlacing with vdpau workwm42014-05-021-0/+3
| | | | | | This restores the capability of enabling deinterlacing with the 'cycle deinterlace' command with vo_vdpau, and also makes it work with vo_opengl.
* vf_vdpaupp: allow toggling deinterlacewm42014-05-021-4/+19
| | | | | Basically makes the 'D' key work again. (But only if the filter is already inserted.)
* vo_vdpau: apply vo_vdpau postprocessing optionswm42014-05-021-2/+16
| | | | | | | | | | | | | The previous commits changed vo_vdpau so that these options are set by vf_vdpaupp, and the corresponding vo_vdpau were ignored. But for compatibility, keep the "old" options working. The value of this is questionable - maybe the vo_vdpau options should just be removed. For now, at least demonstrate that it's possible. The "deint" suboption still doesn't work, because the framerate doubling logic required for some deint modes was moved to vf_vdpaupp. This requires more elaborate workarounds.
* vdpau_mixer: allow overriding frame optswm42014-05-024-4/+10
| | | | So a caller can override the filter options dictated by vf_vdpaupp.
* vo_vdpau: support vf_vdpauppwm42014-05-021-248/+43
| | | | | | | | | | This is slightly incomplete: the mixer options, such as sharpen and especially deinterlacing, are ignored. This also breaks automatic enabling of interlacing with 'D' or --deinterlace. These issues will be fixed later in the following commits. Note that we keep all the custom vdpau queue stuff. This will also be simplified later.
* vo_opengl: make it work with vf_vdpauppwm42014-05-021-50/+8
| | | | | | | This uses mp_vdpau_mixer_render(). The benefit is that it makes vdpau deinterlacing just work. One additional minor advantage is that the video mixer creation code is factored out (although that is a double- edged sword).
* vf_vdpaupp: allow non-vdpau inputwm42014-05-021-5/+42
| | | | | | | So you can use vdpau deinterlacing without using vdpau hardware decoding. vf_vavpp does something similar.
* vdpau: add a postprocessing pseudo-filterwm42014-05-026-2/+555
| | | | | | | | | | | This factors out some code from vo_vdpau.c, especially deinterlacing handling. The intention is to use this for vo_vdpau.c to make the logic significantly easier, and to use it for vo_opengl (gl_hwdec_vdpau.c) to allow selecting deinterlace and postprocessing modes. As of this commit, the filter actually does nothing, since both vo_vdpau and vo_opengl treat the generated images as normal vdpau images. This will change in the following commits.
* vo: document draw_imagewm42014-04-301-0/+6
|
* vo_lavc: remove code with no effectwm42014-04-301-1/+0
| | | | This field will also removed in the future.
* video: improve error messageswm42014-04-302-3/+2
|
* vf: print error if filtering a frame failswm42014-04-301-1/+4
| | | | | The filters don't always print an error on their own, and printing an error is better than silently dropping the frame.
* TOOLS: better documentation of lua scriptsKevin Mitchell2014-04-293-0/+66
|
* TOOLS: improve autocrop.luaKevin Mitchell2014-04-291-9/+75
| | | | | | | | | | It now inserts no filters and does nothing until the hot-key is pressed. This makes it more suitable to be put in ~/.mpv/lua. When the hot-key is pressed, it now inserts the cropdetect filter and waits 1 second (or a --lua-opts specified duration) before gathering the cropdetect metadata and inserting the appropriate crop filter. A second press of the hotkey removes the crop.
* vf_lavfi: reset metadata in reset()Kevin Mitchell2014-04-291-0/+4
| | | | | | It might have been nice not to do this so that metadata could accumulate accross seeks, but it seems libavfilter looses its copy anyway on recreate_graph.
* vf-metadata: fix handling of NULL metadataKevin Mitchell2014-04-292-15/+23
| | | | | | lavfi would segfault due to a NULL dereference if it was asked for its metadata and none had been allocated (oops). This happens for libav which has no concept of filter metadata.
* man: grammar tweak of mp.add_timeout()Kevin Mitchell2014-04-291-3/+3
|
* video: remove redundant mp_image display_w/_h memberswm42014-04-294-22/+7
| | | | | | | | | | | | | | | | | Commit 5e4e248 added a mp_image_params field to mp_image, and moved many parameters to that struct. display_w/h was left redundant with mp_image_params.d_w/d_h. These fields were supposed to be always in sync, but it seems some code forgot to do this correctly, such as vf_fix_img_params() or mp_image_copy_attributes(). This led to the problem in github issue #756, because display_w/_h could become incorrect. It turns out that most code didn't use the old fields anyway. Just remove them. Note that mp_image_params.d_w/d_h are supposed to be always valid, so the additional checks for 0 shouldn't be needed. Remove these checks as well. Fixes #756.
* vo_vdpau: let vdpau scale anamorphic screenshotswm42014-04-291-8/+4
| | | | | | | In theory, returning the screenshot with original pixel aspect would allow avoiding scaling them with image formats that support non-square pixels, but in practice this isn't used anyway (nothing seems to understand e.g. jpeg aspect ratio tags).
* common: add mp_snprintf_append() utility functionwm42014-04-292-0/+23
|
* TOOLS/umpv: make it work with Python 3 (again)wm42014-04-291-3/+6
| | | | | | | Apparently, the 3rd (2nd) parameter to string.translate() function was removed. Also, make_abs() had a mistake - not sure how this passed testing.
* TOOLS/umpv: don't mangle URLswm42014-04-291-1/+16
| | | | | This attempted to prefix the current directory to URLs, because it didn't recognize them as already absolute paths.
* TOOLS/umpv, mpv.desktop: use --no-terminal instead of --really-quietwm42014-04-292-2/+2
| | | | | So this won't initialize terminal handling if stdout happens to be a terminal. It also suppresses all output to stdout/stderr.
* TOOLS/umpv: allow passing 0 fileswm42014-04-291-2/+1
| | | | | Some might use that to just create an empty window with --force-window --idle (for whatever reasons).
* TOOLS/umpv: allow passing optionswm42014-04-291-2/+14
| | | | But only via a special environment variable.
* TOOLS/umpv: make it work with Python 3wm42014-04-291-1/+1
| | | | Apparently they removed octal literals, and made them invalid syntax.
* vf_vapoursynth: add more VS frame propertieswm42014-04-281-0/+26
| | | | | | | We only support them for input. The frame properties of output frames are ignored (except frame durations). Properties not set for now: _ChromaLocation, _Field, _FieldBased
* vf_vapoursynth: use frame durations instead of _AbsoluteTimewm42014-04-282-8/+27
| | | | | | | | | | | | | Set _DurationNum/_DurationDen on each VS frame, instead of _AbsoluteTime. The duration is the difference between the timestamp of the frame and the next frame, and when receiving filtered VS frames, we convert them back to an absolute PTS by summing them. We pass the timestamps with microsecond resolution. mpv uses double for timestamps internally, so we don't know the "real" timebase or FPS. VS on the other hand uses fractions for frame durations. We can't pass through the numbers exactly, but microseconds ought to be enough to be even safe from accumulating rounding errors.
* vf_vapoursynth: fix memory leak on errorwm42014-04-281-1/+3
| | | | | | Since this leaks video images, and the player keeps feeding new images to the fitler even if it fails, this would probably have disastrous consequences.
* vf_vapoursynth: remove incorrect copyright noticewm42014-04-281-2/+0
| | | | | This file merely started out by copy&pasting vf_lavfi.c and removing everything to have a basic skeleton.
* vf_lavfi: distinguish real errors from other stateswm42014-04-281-2/+11
| | | | Don't just hide real errors, should a filter return them.
* video: don't drop last frame when deinterlacing with yadifwm42014-04-288-11/+39
| | | | | | | | | | | | | | | | | | Or in other words, add support for properly draining remaining frames from video filters. vf_yadif is buffering at least one frame, and the buffered frame was not retrieved on EOF. For most filters, ignore this for now, and just adjust them to the changed semantics of filter_ext. But for vf_lavfi (used by vf_yadif), real support is implemented. libavfilter handles this simply by passing a NULL frame to av_buffersrc_add_frame(), so we just have to make mp_to_av() handle NULL arguments. In load_next_vo_frame(), we first try to output a frame buffered in the VO, then the filter, and then (if EOF is reached and there's still no new frame) the VO again, with draining enabled. I guess this was implemented slightly incorrectly before, because the filter chain still could have had remaining output frames.
* TOOLS: make youtube-dl_mpv.sh executablewm42014-04-281-0/+0
|
* cocoa: refactor sync scheduling to a functionStefano Pigozzi2014-04-281-14/+18
| | | | | | | | | This extracts the scheduling logic to a single function which is nicer to keep it consistent. Additionally make sure we don't schedule sync operations from a sync operation itself since that could cause deadlocks (even if it should not be happening with the current code).
* cocoa: use mainScreen as a fallback for window constrainingStefano Pigozzi2014-04-281-1/+1
|
* cocoa: disallow the titlebar to exit the visibleFrame on the bottom edgeStefano Pigozzi2014-04-281-6/+7
|
* cocoa: add constraints to prevent the window to exit the screenStefano Pigozzi2014-04-281-9/+21
| | | | | | | | Previously the window could be made to completly exit the screen with a combination or moving it close to an edge and halving it's size (via cmd+0). This commit address the problem in the most simple way possibile by constraining the window to the closest edge in these edge cases.
* cocoa: move sync section assignments in vo_controlRyan Goulden2014-04-281-4/+4
|
* cocoa: cosmetics: use NSMakeSizeRyan Goulden2014-04-281-1/+1
|
* cocoa: fix native fullscreenRyan Goulden2014-04-283-62/+71
| | | | | | | | | | | | | | | | | | | | | | | This fixes a couple of issues with the Cocoa `--native-fs` mode, primarily: - A ghost titlebar at the top of the screen in full screen: This was caused by the window constraining code kicking in during fullscreen. Simply returning the unconstrained rect from the constraining method fixes the problem. - Incorrect behavior when using the titlebar buttons to enter/exit fullscreen, as opposed to the OSD button. This was caused by mpv's internal fullscreen state going out of sync with the NSWindow's one. This was the case because `toggleFullScreen:` completely bypassed the normal event flow that mpv expects. Signed-off-by: Ryan Goulden <percontation@gmail.com> Change style for mpv, simplify and refactor some of the constraining code. Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* client API: add chapter change eventwm42014-04-278-1/+25
| | | | Also works for mpv_observe_property() on the "chapter" property.
* vf_vapoursynth: use official AbsoluteTime propertywm42014-04-271-2/+2
| | | | | | | | I thought the "_" in "_AbsoluteTime" was part of the documentation markup. This still doesn't help us with VS filters that change timing; apparently you must use frame durations instead.
* vf_vapoursynth: keep pixel aspect ratiowm42014-04-271-3/+3
| | | | | | | | | | | | Make the filter apply the pixel aspect ratio of the input to the output. This is more useful than forcing 1:1 PAR when playing anamorphic video such as DVDs. VapourSynth itself actually allows passing through the aspect ratio, but it's in a not very useful form for us: it's per video-frame instead of constant (i.e in VSVideoInfo). As long as we don't have a way to allow a filter to spontaneously change output parameters, we can't use this. (And I don't really feel like making this possible.)
* TOOLS: indent lua scripts by 4 spaces instead of 3Kevin Mitchell2014-04-272-55/+55
|
* TOOLS: add lua/drc-controlKevin Mitchell2014-04-271-0/+80
| | | | allows live insertion/deletion/adjustment of drc audio filter
* TOOLS: move autocrop.lua to TOOLS/luaKevin Mitchell2014-04-271-0/+0
| | | | in anticipation of more lua scripts
* build: use -pthread when availableStefano Pigozzi2014-04-271-0/+13
| | | | | | | | | | | | Our code currently tries to link -lpthread and adds stuff like -D_REENTRANT based on the target platform. GCC actually supports to just pass a -pthread compiler and linker flag that will automatically enable threading and define the correct symbols for the platform, so let's try to just use that as our first choice. clang also supports -pthread but it must be used only as a compiler flag, so we also take care of that scenario with this commit.
* build: conditionally use -Wempty-bodyStefano Pigozzi2014-04-261-2/+8
| | | | | | | | | -Wempty-body is not available on all gcc versions but we were using it unconditionally. Also remove the usage from the clang case. clang still defines `__GNUC__` so it still gets all the gcc specific flags. This should fix the build on systems with older gcc versions like OpenBSD which still comes bundled with gcc 4.2 for license issues.
* terminal: always use SA_RESTART with sigaction()wm42014-04-261-1/+1
| | | | | | | One problem is that for example stdio functions won't restart syscalls manually, and instead treat EINTR as an error. So passing SA_RESTART is the only sane thing to do, unless you have special requirements, which we don't.
* demux_mkv: enable parsing for VP9wm42014-04-261-2/+4
| | | | | | | | | | | | VP9 packets can contain 2 frames in some video packets (from which 1 frame is invisible). Due to a design mismatch between libvpx and the libavcodec vp9 decoder, libvpx can take the "full" packets, but lavc vp9 can not. The consequence is that we have to split the packets if we want to feed them to the lavc codec. This is not entirely correct yet: timestamp handling is missing. --demuxer=lavf and ffmpeg native utilities have the same problem. We can fix this only once the ffmpeg VP9 parser is fixed.
* input: fix mouse_leave/OSC behaviorwm42014-04-261-1/+1
| | | | | | | | | This essentially reverts commit cca13efb. The code in the if was supposed to be run only if the mouse button was down, because in this case the mouse area is never considered to be left. Since it was run for every mouse button, mouse_leave wasn't sent. Fixes #745.
* input: fix inverted conditionwm42014-04-261-1/+1
| | | | | | pthread_equal() returns 0 if the threads are not the same, and somehow I got that wrong. The worst is that I actually explicitly checked the manpage when I wrote this code.
* osd: make code C99wm42014-04-261-5/+3
| | | | | | | This used an unnamed union, which is allowed in GNU C and C11, but not C99. This broke the build with some older compilers. Replaces pull request #744.
* Revert "wayland: print waylands display erros"Alexander Preisinger2014-04-261-39/+0
| | | | | | | | | | | | This reverts commit 6e34b0ec1f50612cb2767da3dbc27be0be63041d. There has always been an error message "proxy already has a listener" and I couldn't reproduce where it is comming from until now. The display interface already has a listener and we can't overwrite it. Now remove the code and avoid this error message. Conflicts: video/out/wayland_common.c
* manpage: fix grammarwm42014-04-261-1/+1
|
* manpage: forced->usedwm42014-04-261-1/+1
|
* vf_pp: PP_PICT_TYPE_QP2 is always definedwm42014-04-251-4/+0
|
* stream: use libavformat interrupt callbackwm42014-04-251-1/+12
| | | | | | This will allow to cancel opening slow/stuck network streams faster. How well his work probably depends on the protocol implementation in libavformat.
* stream: make mp_input_check_interrupt thread-safewm42014-04-253-2/+14
| | | | | | | | | | | | | | | |