summaryrefslogtreecommitdiffstats
path: root/video
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup some include statementswm42013-07-122-4/+1
|
* core: change open_stream and demux_open signaturewm42013-07-121-1/+1
| | | | | | | | | | | This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well.
* Merge branch 'master' into remove_old_demuxerswm42013-07-082-14/+17
|\ | | | | | | | | | | Conflicts: DOCS/man/en/changes.rst DOCS/man/en/options.rst
| * Merge remote-tracking branch 'origin/low_quality_intel_crap'Martin Herkt2013-07-082-14/+17
| |\ | | | | | | | | | | | | Conflicts: video/out/gl_video_shaders.glsl
| | * Merge branch 'master' into low_quality_intel_crapwm42013-04-3042-3417/+4238
| | |\ | | | | | | | | | | | | | | | | | | | | Conflicts: video/out/gl_video_shaders.glsl video/out/vo_opengl.c
| | * | vo_opengl: avoid texture arrays for compatibility with Intel low quality crapwm42013-03-052-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a0b43a1 changed textures to an array, because additional per-texture information was needed and managing this as array is more elegant. This broke playback on Windows with Intel drivers (window shows green video, even though subtitles/OSD work correctly). So change it back to make it work again. Affected driver: Intel(R) HD Graphics 3000 9.17.10.2932
* | | | Remove old demuxerswm42013-07-071-4/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete demux_avi, demux_asf, demux_mpg, demux_ts. libavformat does better than them (except in rare corner cases), and the demuxers have a bad influence on the rest of the code. Often they don't output proper packets, and require additional audio and video parsing. Most work only in --no-correct-pts mode. Remove them to facilitate further cleanups.
* | | dither: don't use long doublewm42013-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes compilation with broken libcs, like on Cygwin. C99 absolutely requires long double and associated functions like expl, even if long double is double. But newlib (used by cygwin) omits declaration for these if long double is equivalent to double. The extra precision is not needed here, so remove it to make life easier for the single person using mpv with cygwin.
* | | core: remove mp_fifo leftoverswm42013-07-043-3/+0
| | |
* | | wayland: remove mp_fifo headerAlexander Preisinger2013-07-031-1/+0
| | |
* | | wayland: fix typoAlexander Preisinger2013-07-031-1/+1
| | |
* | | wayland: remove unused membersAlexander Preisinger2013-07-031-2/+0
| | |
* | | wayland: remove mp_fifoAlexander Preisinger2013-07-021-7/+7
| | |
* | | wayland: implement MOUSE_LEAVEAlexander Preisinger2013-07-021-0/+2
| | |
* | | core: cleanup more mp_fifo leftoverswm42013-07-025-34/+33
| | | | | | | | | | | | Now only the OSX and Wayland parts are using this.
* | | core: remove mp_fifo indirectionwm42013-07-022-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason mp_fifo specifically handled double clicks, and other than that was a pointless wrapper around input.c functionality. Move the double click handling into input.c, and get rid of mp_fifo. Add some compatibility wrappers, because so much VO code uses these functions. Where struct mp_fifo is still used it's just a casted struct input_ctx.
* | | input: require VOs to send key up events, redo input key lookupwm42013-07-026-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making key up events implicit was sort-of a nice idea, but it's too tricky and unreliable and makes the key lookup code (interpret_keys()) hard to reason about. See e.g. previous commit for subtle bugs and issues this caused. Make key-up events explicit instead. Add key up events to all VOs. Any time MP_KEY_STATE_DOWN is used, the matching key up event must use MP_KEY_STATE_UP. Rewrite the key lookup code. It should be simpler and more robust now. (Even though the LOC increases, because the new code is less "compact".)
* | | w32_common: prevent display power managementJames Ross-Gowan2013-06-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Handling SC_MONITORPOWER doesn't seem to prevent the screen from dimming. The recommended way to do this in Windows XP and Vista is to call SetThreadExecutionState with ES_DISPLAY_REQUIRED. Windows 7 also has the PowerCreateRequest/PowerSetRequest/PowerClearRequest APIs but they're probably too complicated for this task.
* | | w32_common: prevent that window dragging and mouse input interferewm42013-06-291-1/+1
| | |
* | | w32_common: refactor mouse button code, handle mouse up eventswm42013-06-291-31/+39
| | | | | | | | | | | | | | | Instead of sending a single event on click, send both down and up events.
* | | input: trigger mouse_leave key bindings if mouse leaves mouse areawm42013-06-291-2/+5
| | | | | | | | | | | | | | | | | | Also, implement mouse leave events for X11. But evne on other platforms, these events will be generated if mouse crosses a section's mouse area boundaries within the mpv window.
* | | input: handle mouse movement differentlywm42013-06-294-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, mouse movement events emitted a special command ("set_mouse_pos"), which was specially handled in command.c. This was once special-cased to the dvdnav and menu code, and did nothing after libmenu and dvdnav were removed. Change it so that mouse movement triggers a pseudo-key ("MOUSE_MOVE"), which then can be bound to an arbitrary command. The mouse position is now managed in input.c. A command which actually needs the mouse position can use either mp_input_get_mouse_pos() or mp_get_osd_mouse_pos() to query it. The former returns raw window-space coordinates, while the latter returns coordinates transformed to OSD- space. (Both are the same for most VOs, except vo_xv and vo_x11, which can't render OSD in window-space. These require extra code for mapping mouse position.) As of this commit, there is still nothing that uses mouse movement, so MOUSE_MOVE is mapped to "ignore" to silence warnings when moving the mouse (much like MOUSE_BTN0). Extend the concept of input sections. Allow multiple sections to be active at once, and organize them as stack. Bindings from the top of the stack are preferred to lower ones. Each section has a mouse input section associated, inside which mouse events are associated with the bindings. If the mouse pointer is outside of a section's mouse area, mouse events will be dispatched to an input section lower on the stack of active sections. This is intended for scripting, which is to be added later. Two scripts could occupy different areas of the screen without conflicting with each other. (If it turns out that this mechanism is useless, we'll just remove it again.)
* | | cocoa_common: uninit fs window properlyStefano Pigozzi2013-06-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | In fullscreen `s->window` is the windowed window. So freeing that didn't get rid of the FS window and OpenGL view. Fixes #122 [ci skip]
* | | csputils.h: don't recursively include libavcodec headerwm42013-06-283-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | Some functions (avcol_spc_to_mp_csp() etc.) used libavcodec enum types as parameters. Remove these in order to get rid of the avcodec.h include statement. This prevents that avcodec.h is recursively included by dozens of files. Fix mp_image.c, which used the header without explicitly including avcodec.h.
* | | vo_opengl: handle chroma locationwm42013-06-289-3/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the video decoder chroma location flags and render chroma locations other than centered. Until now, we've always used the intuitive and obvious centered chroma location, but H.264 uses something else. FFmpeg provides a small overview in libavcodec/avcodec.h: ----------- /** * X X 3 4 X X are luma samples, * 1 2 1-6 are possible chroma positions * X X 5 6 X 0 is undefined/unknown position */ enum AVChromaLocation{ AVCHROMA_LOC_UNSPECIFIED = 0, AVCHROMA_LOC_LEFT = 1, ///< mpeg2/4, h264 default AVCHROMA_LOC_CENTER = 2, ///< mpeg1, jpeg, h263 AVCHROMA_LOC_TOPLEFT = 3, ///< DV AVCHROMA_LOC_TOP = 4, AVCHROMA_LOC_BOTTOMLEFT = 5, AVCHROMA_LOC_BOTTOM = 6, AVCHROMA_LOC_NB , ///< Not part of ABI }; ----------- The visual difference is literally minimal, but since videophiles apparently consider this detail as quality mark of a video renderer, support it anyway. We don't bother with chroma locations other than centered and left, though. Not sure about correctness, but it's probably ok.
* | | video: add a new method to configure filters and VOswm42013-06-2816-139/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The filter chain and the video ouputs have config() functions. They are strictly limited to transfering the video size and format. Other parameters (like color levels) have to be transferred separately. Improve upon this by introducing a separate set of reconfig() functions, which use mp_image_params to carry format parameters. This struct contains all image format related parameters from config(), plus additional parameters such as colorspace. Change vf_rotate to use it, as well as vo_opengl. vf_rotate is just an example/test case, but vo_opengl will need it later. The intention is also to get rid of VOCTRL_SET_YUV_COLORSPACE. This information is now handed to the VOs via reconfig(). The getter, VOCTRL_GET_YUV_COLORSPACE, will still be needed though.
* | | mp_image: copy palette only if allocatedwm42013-06-281-1/+2
| | | | | | | | | | | | | | | | | | Normally, we assume that IMGFMT_PAL8 always has a palette allocated in plane 1. But there may be corner cases in ffmpeg where it doesn't (namely pseudo-pal stuff).
* | | vf_rotate: fix params >= 4wm42013-06-281-0/+2
| | |
* | | options: remove -lavdopts debug suboptionwm42013-06-281-4/+0
| | | | | | | | | | | | This can be set as avopt instead.
* | | cocoa_common: schedule a redraw frame after a non live resizeStefano Pigozzi2013-06-251-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A redraw forces recalculation of panscan and other stuff not accounted for in the resize_redraw codepath. This is actually a hack but works really well in my tests. Thanks @wm4 and @Cpuroast for the idea. Fixes #86 [ci skip]
* | | Merge branch 'sub_mess2'wm42013-06-251-1/+1
|\ \ \ | | | | | | | | | | | | ...the return.
| * | | stream: remove padding parameter from stream_read_complete()wm42013-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems like a completely unnecessary complication. Instead, always add a 1 byte padding (could be extended if a caller needs it), and clear it. Also add some documentation. There was some, but it was outdated and incomplete.
* | | | OSX: fix compilation with 10.7 SDKStefano Pigozzi2013-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent work in the OS X parts of the code started using clang's support for Obj-C's support for Literals and Subscripting. These particular language features remove a lot of boilerplate code and allow to interact with collections as consicely as one would do in scripting languages like Ruby or Python. Even if these are compiler features, Subscripting needs some runtime support. This is provided with libarclite (coming with the compiler), but we need to add the proper method definitions since the 10.7 SDK headers do not include them. That is because 10.7 shipped before this language features. This will cause some warnings when compiling with the 10.7 SDK because the commit also redefines BOOL to make autoboxing/unboxing of BOOL literals to work. If you need to test this for whatever reason on 10.8, just pass in the correct SDK to configure's extra cflags: ./configure --extra-cflags='-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk' Fixes #117
* | | | vo_lavc: remove unused variablewm42013-06-181-1/+1
| | | |
* | | | osdep: remove shmem wrapperwm42013-06-181-1/+0
| | | | | | | | | | | | | | | | This is unused now that the cache is always threaded.
* | | | vo_lavc: do NOT fill pict_type from the mp_imageRudolf Polzer2013-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing this makes the encoder force the same pict type as original, which is often not even possible. Rather let the codec decide! As there is no documented value to mean "decoder shall pick", I rather save/restore the default value filled by libavcodec.
* | | | vo_lavc: use mp_image_copy_fields_to_av_frameRudolf Polzer2013-06-171-4/+1
|/ / /
* | | fix compile, sorryRudolf Polzer2013-06-161-0/+1
| | |
* | | encode_lavc strings: use new option syntaxRudolf Polzer2013-06-161-2/+2
| | |
* | | vf_dlopen filters: add an "ildetect" filter that detects interlacingRudolf Polzer2013-06-161-4/+21
| | | | | | | | | | | | | | | The filter analyzes each frame for combing, and decides at the end whether the content is likely interlaced, telecined or progressive.
* | | cocoa_common: implement VOCTRL_UPDATE_WINDOW_TITLEStefano Pigozzi2013-06-161-2/+11
| | | | | | | | | | | | | | | Un