summaryrefslogtreecommitdiffstats
path: root/libvo/vo_corevideo.m
Commit message (Collapse)AuthorAgeFilesLines
* 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 to corevideo vo. Still prefer corevideo's own ↵adrian2009-12-151-0/+3
| | | | | | | | | | | | device_id parameter if it's set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30042 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29752Uoti Urpala2009-10-061-4/+5
|\| | | | | | | | | | | | | | | | | As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
| * Fix vo_corevideo with shared buffer after r29606: Only do GUI dependent ↵adrian2009-09-201-4/+5
| | | | | | | | | | | | display config if shared buffer is not enabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29699 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29684Uoti Urpala2009-09-161-40/+22
|\|
| * Factor out duplicated code to set play video scaled by a certain factor.reimar2009-09-041-39/+21
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29646 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Subopt parser subopts should now be const.reimar2009-09-041-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29645 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29644Uoti Urpala2009-09-041-189/+98
|\|
| * Make glContext a local variable, it is not needed outside the functionreimar2009-09-011-2/+2
| | | | | | | | | | | | | | where it is allocated, reference counting takes care of freeing it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29617 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add a dealloc function to corevideo to reduce the memleaks fromreimar2009-09-011-0/+11
| | | | | | | | | | | | | | (for my sample) about 12 MB to 2 MB. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29616 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix some of the major memleaks of vo_corevideo with -fixed-voreimar2009-09-011-24/+27
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29615 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make shm_fd a local variable and close it when we need it no longer, thusreimar2009-09-011-1/+3
| | | | | | | | | | | | | | fixing a file descriptor leak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29609 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reduce vo_corevideo memleaks by initializing static context etc. only oncereimar2009-09-011-14/+26
| | | | | | | | | | | | | | in preinit and freeing the video-specific data before reallocating in config. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29608 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use MPlayer's standard aspect handling functions in corevideoreimar2009-09-011-99/+28
| | | | | | | | | | | | | | instead of reimplementing them incompletely. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29606 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reuse the osx_common convert_key function to convert OSX keycodes to MPlayerreimar2009-08-281-52/+3
| | | | | | | | | | | | | | keycodes instead of its own switch-case in vo_corevideo.m git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29575 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29412Uoti Urpala2009-07-071-6/+10
|\|
| * When used with shared_buffer, there's no need for a NSApp object, which ↵adrian2009-05-181-4/+6
| | | | | | | | | | | | causes MPlayer to be marked as unresponsive. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29314 b3059339-0415-0410-9bf9-f77b7e298cf2
| * When used with shared_buffer, autorelease in each flip_page so objects don't ↵adrian2009-05-181-2/+4
| | | | | | | | | | | | accumulate until exit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29313 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-103/+103
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-103/+103
| |
* | Merge svn changes up to r29277Uoti Urpala2009-05-081-4/+3
|/
* Rename macosx video output driver to corevideo.diego2009-05-041-0/+1156
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29252 b3059339-0415-0410-9bf9-f77b7e298cf2