summaryrefslogtreecommitdiffstats
path: root/libvo/vo_corevideo.m
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-457/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* screenshot: remove hack for passing anamorphic image sizewm42012-11-011-5/+2
| | | | | | | | | | With anamorphic video (display with non-1:1 PAR, e.g. DVD), the display size was passed using the mp_image fields w/h, which was blatantly incorrect. w/h are the normal image dimensions, while width/height are the "uncropped" storage size (used internally by vf.c). Add a display_w/h, and use that for the display size. Make all VOs that can do screenshots use it.
* screenshot: let VOs pass colorspace information via mp_imagewm42012-11-011-0/+2
| | | | | | | | | This removes the hack that screenshot_save() got the colorspace information from the decoder. Instead, require the VOs to set the colorspace information on the mp_images used to pass around the screenshot data. This is more correct, as the image may have been converted/modified in the video filter chain, although there's nothing yet in the video filter chain which does this correctly.
* Merge branch 'master' into osd_changeswm42012-10-241-2/+12
|\ | | | | | | | | Conflicts: libvo/vo_xv.c
| * cocoa_common: use IOKit to perform power managementStefano Pigozzi2012-10-161-0/+10
| | | | | | | | | | | | This allows to remove the call to the deprecated `UpdateSystemActivity`. The additional benefit is power management is disabled only if the video is really playing. A paused video will not stop the system from idling.
| * cocoa_common: save state in the vo structStefano Pigozzi2012-10-161-2/+2
| | | | | | | | | | Save the cocoa state in an instance variable for the Objective-C part of the code and use a field in the vo struct for the raw C part of the code.
* | vo_corevideo: add screenshot capabilityStefano Pigozzi2012-10-241-0/+48
| | | | | | | | | | | | | | | | | | Added screenshot capability to the corevideo VO by sending back the raw data from the CVPixelBuffer. Also added "screenshot window" functionality from the other OpenGL based VOs, which uses glReadPixels to read image data back. This was moved to gl_common to avoid duplication.
* | vo_corevideo: fix EOSD artifactsStefano Pigozzi2012-10-241-13/+16
| | | | | | | | | | | | The new EOSD code suffered from artifacts due to missing setup of a projection matrix. This commit fixes the problem and uniforms the resize code to the one driving vo_opengl_old.
* | vo_corevideo: uninitialize CoreVideo objects before OpenGLwm42012-10-241-1/+1
| |
* | VO, sub: refactorwm42012-10-241-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD, VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT. Remove draw_osd_with_eosd(), which rendered the OSD by calling VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes a callback as argument. (This basically works like the old OSD API, except multiple OSD bitmap formats are supported and caching is possible.) Remove all mentions of "eosd". It's simply "osd" now. Make OSD size per-OSD-object, as they can be different when using vf_sub. Include display_par/video_par in resolution change detection. Fix the issue with margin borders in vo_corevideo.
* | Remove things related to old OSDwm42012-10-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To ease changing all the VOs to the new OSD rendering, fallbacks, conversions, support code etc. was left all over the code. Now that all VOs have been changed, all that code is inactive. Remove it. Strip down spudec.c. We don't need the old grayscale and scaling stuff anymore. (Not removing spudec itself yet - I'm not confident that the libavcodec DVD sub decoder is sufficient, and it would also require some hacks to get DVD palette and resolution information from libdvdread to libavcodec.) The option --spuaa, --spualign, --spugauss were used with the old sub scaling code, and don't do anything anymore.
* | Merge branch 'master' into osd_changeswm42012-10-161-5/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile command.c libvo/gl_common.c libvo/vo_corevideo.m libvo/vo_opengl.c libvo/vo_opengl_old.c libvo/vo_opengl_shaders.glsl sub/ass_mp.c sub/osd_libass.c sub/sd_ass.c
| * vo_gl3: make it work on OpenGL 2.1wm42012-10-031-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now vo_gl3 should work with standard OpenGL 2.1, as long as the GL_ARB_texture_rg extension is available. Optional features, which require features that are always in OpenGL 3.0, but are available as extensions only in OpenGL 2.1, are automatically disabled. The force-gl2 suboption, which was an unreliable hack to run vo_gl3 in an OpenGL 2.1 context, is removed. Significant changes are done to the extension loader to make it easier to identify optional OpenGL features. Context creation is a bit changed to simplify the code and to handle the fallback better if OpenGL 3 context creation fails, and creating an OpenGL legacy context is attempted. Based on the initial work by Rudolf Polzer <divverent@xonotic.org>, which included making the shader GLSL 1.20 compatible, and more.
* | sub: cosmetics: move things aroundwm42012-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move sub-bitmap definitions from dec_sub.h to sub.h. While it's a bit odd that OSD data structures are in a file named sub.h, it's definitely way too strange to have them in a file about subtitle decoding. (Maybe sub.h/.c and the sub/ directory should be split out and renamed "osd" at a later point.) Remove including ass_mp.h (and the libass headers) where possible. Remove typedefs for mp_eosd_res and sub_bitmaps structs. Store a mp_eosd_res struct in osd_state instead of just w/h. Note that sbtitles might be rendered using different sizes/margins when filters are involved (the subtitle renderer is not supposed to use the OSD res directly, and the "dim" member removed in the previous commit is something different).
* | sub, VO: remove vo_osd_resized() functionwm42012-10-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | VOs which could render the OSD in window size (as opposed to video size, like vo_xv) and which could cache the OSD called this when the window size changed. This was needed, because VOs used another OSD function to check whether the OSD changed before passing the new window size to the OSD code. This was really just an artifact of OSD change detection, and now that the affected VOs use the new OSD rendering API, it's done automatically.
* | vo_corevideo: add EOSDwm42012-10-161-101/+22
| | | | | | | | Completely untested.
* | sub: create sub_bitmap array even when using libasswm42012-10-161-4/+3
|/ | | | | | | | | | | | | | One sub_bitmaps struct could contain either a libass ASS_Image list, or a mplayer native list of sub-bitmaps. This caused code duplication in vo_vdpau.c and bitmap_packer.c. Avoid this by creating such a sub_bitmap array even with libass. This basically copies the list and recreates it in mplayer's native format. It gets rid of the code duplication, and will make implementing extended subtitle and OSD rendering in other VOs easier. Also do some cosmetic changes and other preparations for the following commits.
* osx: fix buildStefano Pigozzi2012-08-081-2/+2
| | | | adapt the osx VOs to build against the latest changes.
* osd: minor simplification of vo_osd_changed()wm42012-08-011-2/+2
| | | | | | | | | | | | | | | | | | vo_osd_changed() was a weird function: it was used both to query and mutate state, which is a bad combination. The VOs used it to query and reset the state, and the mplayer frontend mostly used it to set the state. In some cases, the frontend did both (that code used a variable "int hack" to backup the state and set it again). Simplify it and make the VOs use a vo_osd_has_changed() function to query whether the OSD bitmaps have to be recreated. vo_osd_changed() on the other hand is now used to update state only. The OSD change state is reset when osd_draw_text() is called. Update vo_corevideo.m to use vo_osd_resized() as well (forgotten change from libass-OSD merge). Simplify osd_set_text() and its usages.
* vo_corevideo: remove font_load codeStefano Pigozzi2012-08-011-2/+0
| | | | | This was probably forgotten in the commit that removed the dependency on freetype.
* vo_corevideo, vo_sharedbuffer: put private state in vo->privStefano Pigozzi2012-07-271-25/+29
| | | | | | | These VOs were already using a struct for all private data but the struct variable itself was static. Change them to store the address in vo->priv. Also change them to use the new automatic private data allocation and option parsing mechanism.
* vo_corevideo: restructure this video outputStefano Pigozzi2012-04-261-338/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure this video output to be similar to vo_gl, even if simpler and less feature complete (for example it's still missing EOSD support). Ideally, it should act as a decent fallback in the case where something breaks in the OSX support of vo_gl. Here's a summary of what changed: * Remove the shared buffer code since it wasn't using any function from the CoreVideo API. Moreover, its presence in vo_corevideo was forcing the non-GUI related code to perform more image copies than necessary. Equivalent shared-buffer functionality will be added in a separate new VO in the next commit (this means OSX GUIs will need to specify a different VO). * Clean up the code to conform a bit more to the mplayer2 conventions. Enforce 80 column wrapping, use a private struct for file variables, use the new libvo api. * Add OSD rendering using OpenGL instead of writing directly on the video image data. * Simplify the logic for the rendering function when dealing with panscan. * Add VOCTRL_REDRAW_FRAME support. * Add colormatrix support by using the built-in API provided by CoreVideo.
* vo_corevideo: use cocoa_common to display the windowStefano Pigozzi2012-04-261-763/+150
| | | | | | | Change vo_corevideo to use cocoa_common to create and manage the window. This doesn't affect external OSX GUIs, since they don't use vo_corevideo window management, but only read the image data from the shared buffer.
* vo_corevideo: use soft tabs (4 spaces)Stefano Pigozzi2012-04-261-684/+684
|
* vo_corevideo: fix key interpretation with modifiersStefano Pigozzi2011-11-261-2/+9
| | | | | | | | When interpreting a key event, use the "charactersIgnoringModifiers" method of the event in order to extract Alt+key combinations while keeping the normal meaning of "key". When the right alt modifier is pressed use the "characters" method to allow AltGr behavior to be used to generate different characters.
* input: move all key code lists to input/keycodes.hUoti Urpala2011-05-021-3/+1
| | | | | | | | | | | | | Move the definitions of all special key codes (those not passed by ASCII value) to input/keycodes.h. Before they were spread between osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus some special values in input.h. This was especially inconvenient as the codes had to be coordinated to not conflict between the files. The change requires a bit of ugliness as appleir.c includes <linux/input.h> which contains various conflicting KEY_* definitions. Work around this by adding a special preprocessor variable which can be used to avoid defining these in keycodes.h.
* vo_corevideo: add key_modifier_alt only when pressing left option keyStefano Pigozzi2011-03-181-1/+4
|
* vo_corevideo: fix menubar showing 2 apples on snow leopardStefano Pigozzi2011-03-111-1/+4
|
* vo_corevideo: support modifier keys in keyboard inputStefano Pigozzi2011-03-031-2/+11
|
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-1/+1
|
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: Move variable into the only function it's used inreimar2010-11-021-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31826 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: move mouse hiding to check_eventsreimar2010-11-021-23/+21
| | | | | | | | Move mouse hiding code to check_events, this allows mouse hiding to continue to work with -idle -fixed-vo, after the video has finished but the last frame is still displayed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31825 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: Make the Quit menu entry workreimar2010-11-021-0/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31824 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: simplify check_eventsreimar2010-11-021-1/+1
| | | | | | Simplify check_events: avoid seemingly pointless untilDate argument. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31823 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: change window-closing handlingreimar2010-11-021-2/+5
| | | | | | | | Change window-closing handling so it works properly if the KEY_CLOSE_WIN is rebound to e.g. skip to next file or not bound at all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31822 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo, vo_quartz: remove useless kQuitCmdreimar2010-11-021-5/+0
| | | | | | | | | | | | Remove kQuitCmd, it has no purpose or effect at all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31811 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unused kQuitCmd from vo_quartz. While just as useless as for corevideo, the "Quit" menu item at least works through kHICommandQuit here. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31812 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: indentation fixesreimar2010-11-021-23/+23
| | | | | | | | | | Cosmetics: indentation fixes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31808 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix indentation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31810 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: Avoid some code duplication.reimar2010-11-021-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31809 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: Simplify update_screen_inforeimar2010-11-021-7/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31806 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid some code duplication in update_screen_info. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31807 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: avoid dangerous castsreimar2010-11-021-3/+2
| | | | | | Declare variables with proper types to avoid dangerous pointer casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31805 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo.m: remote useless parentheses and castsreimar2010-11-021-11/+11
| | | | | | | | | | | | | | Remove useless (). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31802 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove yet more useless () git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31803 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31804 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_corevideo: Send KEY_CLOSE_WIN instead of KEY_ESC for quitreimar2010-11-021-2/+2
| | | | | | | Send KEY_CLOSE_WIN instead of KEY_ESC when the user requested corevideo to quit, KEY_ESC might have been rebound to something else. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31801 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31097Uoti Urpala2010-04-261-6/+2
|\
| * Avoid duplicating mouse-movement command-generation code.reimar2010-04-251-5/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31091 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Deduplicate enable_mouse_movements declaration.reimar2010-04-251-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31089 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31020Uoti Urpala2010-04-261-17/+28
|\|
| * Fix RGB support for corevideo: corevideo can only supportreimar2010-04-051-8/+22
| | | | | | | | | | | | | | | | | | ARGB and BGRA, which depending on endianness matches only one of RGB32 and BGR32. Also add RGB24 support which works independent of endianness, git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31016 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Enable OSD also for BGR32, the code is the same as for RGB32.reimar2010-04-051-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31015 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Implement VOCTRL_DRAW_IMAGE instead of the deprecated draw_frame, avoidingreimar2010-04-051-10/+6
| | | | | | | | | | | | | | an extra memcpy in case of stride mismatch. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31014 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30967Uoti Urpala2010-04-261-17/+1
|\|
| * Refactor OS X foreground process setting into a separate function.diego2010-03-261-17/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30964 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30055Uoti Urpala2009-12-181-8/+15
|\|
| * Add support for -geometry to corevideo.adrian2009-12-151-8/+12
| | | | | | | | | | | | | | Based on a patch by Tim Wojtulewicz (timwoj at ieee dot org). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30043 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add -xineramascreen support t