summaryrefslogtreecommitdiffstats
path: root/libvo
Commit message (Collapse)AuthorAgeFilesLines
* Adjust ffmpeg/libav #includes to work with recent upstream changesUoti Urpala2012-08-211-1/+1
| | | | | | | | The <libavutil/avutil.h> stopped including <libavutil/common.h> recursively in recent ffmpeg/libav git revisions. As a result, some files no longer got needed definitions, causing a build failure. Modify #include lines in various files to fix build with the latest versions of ffmpeg/libav headers.
* video: honor the video's colormatrix and color range flagscantabile2012-08-212-0/+36
| | | | | | If either of them is not defined, the old behavior is used: - the colormatrix is guessed based on resolution. - the color range is assumed to be tv aka limited range.
* osd: get rid of useless initialization functionwm42012-08-202-20/+0
| | | | | The function merely printed redundant messages that were not visible by default.
* cocoa_common: add HiDPI/retina supportStefano Pigozzi2012-08-163-17/+63
| | | | | | | | | | | | | | | | | | | | With a HiDPI screen, for performance and backwards compatibility reasons, AppKit requests an OpenGL surface with a pixel number that equals the user points number. After the image is rendered to this smaller surface, it is upscaled so that its dimensions are comparable across screens of different DPIs. The applied scaling is not that good and makes the video/subtitles blurry; this is not acceptable for a video player. Request AppKit to use a high resolution OpenGL surface to back the mplayer2 OpenGL view. Also set the window pixel size information correctly in the VO object by converting user points to actual pixels. All the system version checks are done at runtime so that the feature is available on OSX 10.7 even with a binary compiled with older SDKs. Also replace is_lion_or_better() with is_osx_version_at_least(10, 7, 0) which is defined in osx_common.
* cocoa_common.m: add missing config.h includeStefano Pigozzi2012-08-161-0/+2
| | | | This is needed for the check on CONFIG_SDL in this file.
* cleanup: osx_common: remove unused functionsStefano Pigozzi2012-08-162-53/+0
| | | | | | | | | Remove functions that aren't called anymore: * `osx_foreground_hack` was replaced by the NSApplication's activateIgnoringOtherApps: in cocoa_common. * Aspect ratio functions were not called by the "new" cocoa backend, since the corresponding menu item was deleted.
* cocoa_common: refactor menu generationStefano Pigozzi2012-08-161-16/+41
| | | | | This commit is supposed to make the menu generation a little more readable. It also fixes menu generation for the `cmd+q` entry.
* gl_common: fix compilation on OS X 10.8Stefano Pigozzi2012-08-161-0/+6
| | | | | | | | | As of OS X 10.8 Apple completely removed X11 from the system. gl_common.h was including gl.h using the path <GL/gl.h>. This path comes from the X11 headers, which are missing in 10.8. Change gl_common.h to include gl.h from Apple's OpenGL implementation as <OpenGL/gl.h> if X11/XQuartz is not detected.
* VO: remove vo_directfb2 and vo_directxwm42012-08-164-2691/+0
| | | | | | | | | | | | While being able to play videos on a framebuffer device would be nice, I didn't need it, and couldn't even test it (buggy nvidia binary drivers that disable framebuffers, buggy DirectFB that crashes when using the X11 backend). It's just dead weight, get rid of it. vo_directx was very horrible, and by today it's mostly useless. I didn't remove it, because there was that-guy who told me in amazement how awesome mplayer was, because it was the only video player fast enough for fast playback on his system when using vo_directx. Sorry, that-guy.
* vo_vdpau: fix crash when vo_vdpau initialization failswm42012-08-161-1/+1
| | | | | | | | This happened on system without a vdpau driver installed. It's especially bad because vdpau is the default VO. I'm not sure when this bug was introduced, and it seems to exist in upstream mplayer2 too.
* video_out: fix crash when VO autoselection failswm42012-08-161-2/+3
| | | | | | | | init_best_video_out() did not manage the memory for vo->window_title correctly, and free'd it twice when initialization failed (that's due to talloc_free_children() being called). When the next VO was tried, it reused the dangling pointer. Initialize this member somewhere else lazily instead.
* vo_sharedbuffer: remove this VOStefano Pigozzi2012-08-153-310/+0
| | | | | | | | | | | | | | Since slave mode is not planned to be kept, this VO is useless and I'm removing it. This VO was useful for OSX GUIs. Since in cocoa you can't embed views in windows from other processes, this VO was writing to a sharedbuffer with mmap. The OSX GUIs would then read from the buffer and render the image with an external renderer. If in the future we will want to support GUIs we will need to reasearch the IOSurface framework. This allows to share kernel managed image data across processes and integrates well with OpenGL.
* osx: fix buildStefano Pigozzi2012-08-082-3/+3
| | | | adapt the osx VOs to build against the latest changes.
* osd: remove FAST_OSD codewm42012-08-073-79/+1
| | | | | | This code has never been active by default, ever since it was added back in 2001. You had to edit config.h or configure manually to enable it.
* VO: remove old VO gluewm42012-08-079-330/+0
| | | | | | | This transition to a new VO API started over 4 years ago. It's time to finally end it, and get rid of the horrible hacks. Also removes some previously undetected dead code from spudec.c.
* osx_common: remove old VO include, modify change_movie_aspect()wm42012-08-072-4/+5
| | | | | | | | The only reason the old VO related header old_vo_defines.h was included was probably to gain access to the current VO struct in the function change_movie_aspect(). Make that function take a parameter instead. This function seems to be unused.
* vo_directx: convert to new VO APIwm42012-08-071-68/+78
|
* win32: fix compilation on MinGWwm42012-08-071-1/+1
| | | | | | | | | | | | | | | The commit 74df1d8e05aa2 (and f752212c62353) replaced the configure endian check with byte order macros defined by standard headers. It turns out that MinGW-w64 actually doesn't define these macros in the sys/types.h system header. (I assumed it does, because a quick test seemed to work. But that was because gcc -W -Wall doesn't warn against undefined macros. You need -Wundef for that.) MinGW-w64 has a sys/params.h header defining these macros, but sys/types.h doesn't include it, so it's useless without special casing the mplayer code. Add a hack top configure instead. Define the macros directly, and assume MinGW-w64 only works on little endian machines. The other changes are basically random typos and superficial oversights.
* vo_null: reformat and use new VO APIwm42012-08-071-48/+42
|
* Remove V4L2 decoder support (vo_v4l2 and ao_v4l2)wm42012-08-073-288/+0
| | | | | | | | | | | The removed VO and AO took MPEG data and decoded it with V4L2. I'm not exactly sure what's the use of this today, but get rid of it. As far as feeding video data to V4L2 is concerned, there are other ways. For example, there is this script, that feeds yuv4mpeg formatted raw video data to V4L2: https://raw.github.com/umlaeute/v4l2loopback/master/examples/yuv4mpeg_to_v4l2.c
* vo_v4l2: reformat, use new VO APIwm42012-08-071-165/+153
| | | | | Actually, this is probably completely broken, and there are better ways to get mplayer output into a V4L2 device.
* vo_caca: use new VO APIwm42012-08-071-33/+54
|
* vo_directfb2: reformat and convert to new VO APIwm42012-08-071-938/+1083
| | | | | | No effort was put into moving static variables into a priv struct. The VO wasn't tested, because DirectFB's X11 backend didn't work for me (it crashed, not just with mplayer, but also SDL applications).
* vo_x11: reformat, use new VO APIwm42012-08-071-375/+397
| | | | This also involves moving the static variables into a priv struct.
* libvo: remove videodev_mjpeg.hwm42012-08-061-141/+0
| | | | This was used by stream/tvi_v4l.c, which was removed a while ago.
* VO: remove vo_gif89a, vo_md5sum, vo_yuv4mpegwm42012-08-064-996/+0
| | | | | | | | The encoding branch by divverent can handle of these via libavformat. Note: for some reason, libav/ffmpeg have a GIF muxer only, and no demuxer. The gif configure checks needef for the mplayer internal gif demuxer can't be removed yet.
* VO: remove vo_jpeg, vo_png, vo_pnm, vo_tgawm42012-08-065-1443/+0
| | | | All of these have been replaced by vo_image.
* vo_image: add outdir optionwm42012-08-061-8/+42
| | | | | The function checked_mkdir is taken from vo_jpeg, with the error handling stripped down to a reasonable level.
* vo_image: add new video output for writing imageswm42012-08-063-1/+172
| | | | This is supposed to replace vo_png and others.
* video_out: rename privsize member to priv_sizewm42012-08-063-5/+5
|
* options: get rid of some compatibility stuffwm42012-08-061-5/+0
| | | | | | | | | Doesn't make sense because we broke/are going to break compatibility with everything anyway. Remove mechanism for warning the user against disabled options. Remove colorspace alternative option values.
* m_config: implement m_config_new in terms of m_config_simplewm42012-08-041-1/+2
| | | | | Also change m_config_simple() such that you need to register options using m_config_register_options().
* options: revert passing around talloc contextswm42012-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 48f0692ab9 "options: make option struct the talloc parent of options". This made things actually more complicated. It introduced a new parameter to the option parse and copy functions, which was used inconsistently. Some code passed a parent, some not. Morever, you have to call m_option_free() anyway, because not all options actually respect the talloc parent. There is also the question whether passing NULL as parent is supposed to work, or if you still have to implement m_config_free(). On the other hand, this simplifies nothing. I assume the intention was being able to free all option values with a single talloc_free() call, but the same goal can be reached by simply freeing the m_config struct. (The m_config talloc destructor will free each option values.) Get rid of the talloc parent context parameter. This essentially reverts commit 48f0692ab9 ("options: make option struct the talloc parent of options"). In video_out.c, make the VO priv struct the talloc parent for the m_config object, so that destroying the VO will free the options. The ability to free the m_config struct and all its managed options was introduced in commit 89a17bcda6c.
* mplayer: never exit mplayer from within the play loopwm42012-08-041-1/+0
| | | | | | | | | | | | | | | | | The only place exit_player() should be called is the main() function. exit_player() should be the only function allowed to call exit(). This makes it easier to guarantee proper deinitialization, and allows using the --leak-report flag without showing false positives. The quit slave command now sets a flag only. It uses the same mechanism that's normally used to advance to the next file on the playlist, so the rest of the playback path should be able to react to the quit command quickly enough. That is, the player should react just as fast to quit requests in practice as before this commit. In reinit_audio_chain(), the player was actually exited if init_audio_filters() failed. Reuse the normal error handling path to handle this condition.
* x11_common: remove some code duplicationwm42012-08-031-114/+54
| | | | This sin was committed in 2002.
* mplayer: do not create X11 state in player frontendwm42012-08-035-12/+21
| | | | | | | | | | | | | This is about the vo_x11_init_state() call. It basically opens a X11 connection. It's called in the main() function once. It's not really clear why this isn't done on VO creation instead. Maybe one reason was that --no-fixed-vo used to be the default: when playing a new file, the full VO state would be free'd and recreated. Keeping the X11 connection possibly improved things, although the question is how. In summary, there is no good reason to do this, and it only adds platform specific details to the player frontend. Do the X11 initialization in the respective VOs instead.
* vo_yuv4mpeg: support writing to stdoutmplayer-svn2012-08-031-3/+5
| | | | | | | | | | | | | | | | | | | | yuv4mpeg: support writing to stdout instead of file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34861 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow using -vo yuv4mpeg for files with resolution changes. Not all programs can read such files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34862 b3059339-0415-0410-9bf9-f77b7e298cf2 vo_yuv4mpeg: flush userspace FILE buffers after each frame. Potentially reduces delay when piping to stdout/fifo. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34879 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* libmpcodecs: use 128 instead of 64 to define non-native RGB image formatsmplayer-svn2012-08-031-2/+2
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34659 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* vo_x11: X11 non-native RGB/BGR "emulation" only works for 32bitmplayer-svn2012-08-031-3/+2
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34658 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* vo_caca: reformat and various fixesmplayer-svn2012-08-031-174/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commits by various authors. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34337 b3059339-0415-0410-9bf9-f77b7e298cf2 vo_caca: Port to libcaca 1.x API, which is widespread enough nowadays. patch by Paul B. Mahol, onemda gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34338 b3059339-0415-0410-9bf9-f77b7e298cf2 caca: support mouse events and more keys. Patch by Paul B. Mahol [onemda gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34359 b3059339-0415-0410-9bf9-f77b7e298cf2 caca: for ordinary keys, send key events on press instead of release. This is consistent with how other vos behave. Patch by Paul B. Mahol [onemda gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34360 b3059339-0415-0410-9bf9-f77b7e298cf2 caca: process all pending events instead of exactly one per check_events. Patch by Paul B. Mahol [onemda gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34361 b3059339-0415-0410-9bf9-f77b7e298cf2 Reindent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34362 b3059339-0415-0410-9bf9-f77b7e298cf2 Use lookup_keymap_table instead of a large number of switch cases. Patch by Paul B. Mahol [onemda gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34363 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: diego
* vo_md5sum: support printing to stdoutmplayer-svn2012-08-031-1/+4
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34313 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* x11: change stop_xscreensaver default to 1 to be more user-friendlymplayer-svn2012-08-031-1/+1
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34076 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* x11: make the stop-xscreensaver option behave as described in the man pagemplayer-svn2012-08-031-1/+1
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34074 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vo_null: do not accept hwaccel formatsmplayer-svn2012-08-031-0/+2
| | | | | | | | Do not accept hwaccel formats since they need special vo support and thus will actually not work with it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33953 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* VO: remove VO direct renderingwm42012-08-028-152/+0
| | | | | | | | | | | | | | | | | | | This was disabled by default, and could be enabled with -dr. It was disabled by default because it was buggy: there were issues with OSD corruption. It wasn't entirely sane for OpenGL based VOs either. OpenGL can chose to drop mapped pixel buffer objects, requiring the application to map and fill the buffer again. But there was no mechanism in mplayer to fill the lost buffer again. (It seems this rarely happened in practice, though.) On the other side, users liked the --dr flag, because it promised them more speed. I'm not sure if it actually helped with speed, but it's unlikely it had any real advantages on modern systems. In order to evade the --dr cargo culting in mplayer config files, it's best to get rid of it.
* mplayer: expand --title as property, remove --use-filename-titlewm42012-08-022-5/+4
| | | | | | | | | The --title option, which sets the GUI window caption, is now expanded as slave mode property string (like osd_show_property_text). Make the default value for --title include the filename. This makes a behavior similar to --use-filename-title the default. Remove the --use-filename-title option, as it's redundant now.
* osd: minor simplification of vo_osd_changed()wm42012-08-014-5/+5
| | | | | | | | | | | | | | | | | | 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.
* Remove dead codewm42012-08-016-46/+0
| | | | | | | | | | | | | This was done with the help of callcatcher [1]. Only functions which are statically known to be unused are removed. Some unused functions are not removed yet, because they might be needed in the near future (such as open_output_stream for the encode branch). There is one user visible change: the --subcc option did nothing, and is removed with this commit. [1] http://www.skynet.ie/~caolan/Packages/callcatcher.html
* 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_gl3: support changing cmdlinewm42012-08-011-2/+82
|
* VO: add mechanisms to change VO commandline for VOs supporting itwm42012-08-011-0/+2
|
* Change <endian.h> include to <sys/types.h>wm42012-07-312-2/+2
| | | | | This seems to be more portable. Should fix compilation on OSX and FreeBSD. Apparently also works on MinGW-w64.
* mplayer: turn playtree into a list, and change per-file option handlingwm42012-07-311-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - There is no playtree anymore. It's reduced to a simple list. - Options are now always global. You can still have per-file options, but these are optional and require special syntax. - The slave command pt_step has been removed, and playlist_next and playlist_prev added. (See etc/input.conf changes.) This is a user visible incompatible change, and will break slave-mode applications. - The pt_clear slave command is renamed to playlist_clear. - Playtree entries could have multiple files. This is not the case anymore, and playlist entries have always exactly one entry. Whenever something adds more than one file (like ASX playlists or dvd:// or dvdnav:// on the command line), all files are added as separate playlist entries. Note that some of the changes are quite deep and violent. Expect regressions. The playlist parsing code in particular is of low quality. I didn't try to improve it, and merely spent to least effort necessary to keep it somehow working. (Especially ASX playlist handling.) The playtree code was complicated and bloated. It was also barely used. Most users don't even know that mplayer manages the playlist as tree, or how to use it. The most obscure features was probably specifying a tree on command line (with '{' and '}' to create/close tree nodes). It filled the player code with complexity and confused users with weird slave commands like pt_up. Replace the playtree with a simple flat playlist. Playlist parsers that actually return trees are changed to append all files to the playlist pre-order. It used to be the responsibility of the playtree code to change per-file config options. Now this is done by the player core, and the playlist code is free of such details. Options are not per-file by default anymore. This was a very obscure and complicated feature that confused even experienced users. Consider the following command line: mplayer file1.mkv file2.mkv --no-audio file3.mkv This will disable the audio for file2.mkv only, because options are per-file by default. To make the option affect all files, you're supposed to put it before the first file. This is bad, because normally you don't need per-file options. They are very rarely needed, and the only reasonable use cases I can imagine are use of the encode backend (mplayer encode branch), or for debugging. The normal use case is made harder, and the feature is perceived as bug. Even worse, correct usage is hard to explain for users. Make all options global by default. The position of an option isn't significant anymore (except for options that compensate each other, consider --shuffle --no-shuffle). One other important change is that no options are reset anymore if a new file is started. If you change settings with slave mode commands, they will not be changed by playing a new file. (Exceptions include settings that are too file specific, like audio/subtitle stream selection.) There is still some need for per-file options. Debugging and encoding are use cases that profit from per-file options. Per-file profiles (as well as per-protocol and per-VO/AO options) need the implementation related mechanisms to backup and restore options when the playback file changes. Simplify the save-slot stuff, which is possible because there is no hierarchical play tree anymore. Now there's a simple backup field. Add a way to specify per-file options on command line. Example: mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3 will have the following options per file set: f1.mkv, f4.mkv: -o0 -o3 f2.mkv, f3.mkv: -o0 -o3 -o1 -o2 The options --{ and --} start and end per-file options. All files inside the { } will be affected by the options equally (similar to how gl