Commit Graph

3816 Commits

Author SHA1 Message Date
wm4 eb1182eb50 vo_image: add outdir option
The function checked_mkdir is taken from vo_jpeg, with the error
handling stripped down to a reasonable level.
2012-08-06 17:52:47 +02:00
wm4 c7b66d99d1 vo_image: add new video output for writing images
This is supposed to replace vo_png and others.
2012-08-06 17:52:17 +02:00
wm4 b43adea6c8 video_out: rename privsize member to priv_size 2012-08-06 17:51:53 +02:00
wm4 1ce5ca5f26 options: get rid of some compatibility stuff
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.
2012-08-06 00:10:13 +02:00
wm4 6031b8e22c m_config: implement m_config_new in terms of m_config_simple
Also change m_config_simple() such that you need to register options
using m_config_register_options().
2012-08-04 19:59:56 +02:00
wm4 37c03f2c81 options: revert passing around talloc contexts
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 89a17bcda6.
2012-08-04 19:59:56 +02:00
wm4 9a2f4e10e7 mplayer: never exit mplayer from within the play loop
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.
2012-08-04 19:59:56 +02:00
wm4 adde96a814 x11_common: remove some code duplication
This sin was committed in 2002.
2012-08-03 06:30:47 +02:00
wm4 b4d9647d18 mplayer: do not create X11 state in player frontend
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.
2012-08-03 05:55:02 +02:00
mplayer-svn 2d513fac33 vo_yuv4mpeg: support writing to stdout
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
2012-08-03 02:53:21 +02:00
mplayer-svn cb2f0e7c38 libmpcodecs: use 128 instead of 64 to define non-native RGB image formats
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34659 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cehoyos
2012-08-03 01:46:25 +02:00
mplayer-svn 47a0e4fadd vo_x11: X11 non-native RGB/BGR "emulation" only works for 32bit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34658 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cehoyos
2012-08-03 01:44:11 +02:00
mplayer-svn 094acd6884 vo_caca: reformat and various fixes
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
2012-08-03 01:35:18 +02:00
mplayer-svn 595928542a vo_md5sum: support printing to stdout
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34313 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:33:12 +02:00
mplayer-svn c0c47c3474 x11: change stop_xscreensaver default to 1 to be more user-friendly
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34076 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:26:33 +02:00
mplayer-svn 9c76680dfb x11: make the stop-xscreensaver option behave as described in the man page
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34074 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:26:32 +02:00
mplayer-svn 4f04019338 vo_null: do not accept hwaccel formats
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
2012-08-03 01:13:02 +02:00
wm4 e48b21dd87 VO: remove VO direct rendering
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.
2012-08-02 22:07:38 +02:00
wm4 d5315a678e mplayer: expand --title as property, remove --use-filename-title
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.
2012-08-02 02:37:00 +02:00
wm4 168293e0ae osd: minor simplification of vo_osd_changed()
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.
2012-08-01 18:23:28 +02:00
wm4 c92538dfaa Remove dead code
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
2012-08-01 17:07:35 +02:00
Stefano Pigozzi 38e705b3e4 vo_corevideo: remove font_load code
This was probably forgotten in the commit that removed the dependency on
freetype.
2012-08-01 08:44:58 +02:00
wm4 b4aedefe80 vo_gl3: support changing cmdline 2012-08-01 01:35:58 +02:00
wm4 e9a18efa2b VO: add mechanisms to change VO commandline for VOs supporting it 2012-08-01 01:06:59 +02:00
wm4 f752212c62 Change <endian.h> include to <sys/types.h>
This seems to be more portable. Should fix compilation on OSX and
FreeBSD. Apparently also works on MinGW-w64.
2012-07-31 23:37:56 +02:00
wm4 89a17bcda6 mplayer: turn playtree into a list, and change per-file option handling
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 global
options and multiple files are handled). When playback of a file starts,
the per-file options are set according to the command line. When
playback ends, the per-file options are restored to the values when
playback started.
2012-07-31 21:33:26 +02:00
wm4 17b69493b7 libvo: remove exit_player_bad()
For some reason, these 3 VOs basically call exit() if something
went wrong.
2012-07-30 15:46:05 +02:00
wm4 3c98615069 vo_gl, vo_gl3: honor global --vsync option
Both VOs will now by default try to set vsync according to the global
vsync setting. By default, vsync is enabled, and passing --no-vsync will
disable it.

The --vsync option used to matter for vo_vesa only, but that VO has been
removed.
2012-07-30 01:42:54 +02:00
wm4 43da1e78c4 Rip out 3DNOW support
Ancient AMD specific enhancement to the MMX instruction set. Officually
discontinued by AMD.

Note that support for this was already disabled in the previous commit.
This commit removes the actual code.
2012-07-30 01:38:14 +02:00
wm4 74df1d8e05 Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
   your CPU. Your binary will only crash if you try to run it on a
   different system that has less features than yours.
   This was the default, I think.
c) Runtime detection.

The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.

One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.

Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.

Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.

Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)

Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)

Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-30 01:37:28 +02:00
wm4 a4bab723b3 fastmemcpy.h: remove code duplication
Remove the mem2agpcpy_pic function, which is obviously duplicated from
the other function in this file.

Untested, as this is only used by the directx and directfb2 VOs.
2012-07-30 01:36:35 +02:00
wm4 273a6623e7 libvo: remove custom assembler memcpy implementations (aka fastmemcpy)
aclib[_template].c contained inline assembler versions of memcpy using
MMX/SSE/3dnow etc. instructions. It's possible that this gave quite a
speed a decade ago, but it's unlikely to have any use on modern
systems. Also, libc implementations already have their own
optimizations for the native memcpy function.

I did not verify my assumptions eith benchmarks, so I could be wrong.

Also note that some platforms have extremely crappy libc
implementations, and it's well possible that these might suffer from a
major performance loss (hello Windows). Unfortunately, I do not care.
2012-07-30 01:33:40 +02:00
wm4 08caadb9c0 bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstr
Replace all uses of bstr() with bstr0().
Also remove the ridiculous C++ workaround.
2012-07-28 23:47:42 +02:00
wm4 74e7a1e937 osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.

Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)

Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.

Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.

Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.

Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.

The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-07-28 23:36:07 +02:00
wm4 16145ff43f libvo, libao: remove useless video and audio output drivers
Some of these have only limited use, and some of these have no use at
all. Remove them. They make maintainance harder and nobody needs them.
It's possible that many of the removed drivers were very useful a dozen
of years ago, but now it's 2012.

Note that some of these could be added back, in case they were more
useful than I thought. But right now, they are just a burden.

Reason for removal for each module:
    vo_3dfx, vo_dfbmga, vo_dxr3, vo_ivtv, vo_mga, vo_s3fb,
    vo_tdfxfb, vo_xmga, vo_tdfx_vid:
        All of these are for very specific and outdated hardware. Some
        of them require non-standard kernel drivers or do direct HW
        access.
    vo_dga: the most crappy and ancient way to get fast output on X.
    vo_aa: there's vo_caca for the same purpose.
    vo_ggi: this never lived, and is entirely useless.
    vo_mpegpes: for DVB cards, I can't test this and it's crappy.
    vo_fbdev, vo_fbdev2: there's vo_directfb2
    vo_bl: what is this even? But it's neither important, nor alive.
    vo_svga, vo_vesa: you want to use this? You can't be serious.
    vo_wii: I can't test this, and who the hell uses this?
    vo_xvr100: some Sun thing.
    vo_xover: only useful in connection with xvr100.
    ao_nas: still alive, but I doubt it has any meaning today.
    ao_sun: Sun.
    ao_win32: use ao_dsound or ao_portaudio instead.
    ao_ivtv: removed along vo_ivtv.

Also get rid of anything SDL related. SDL 1.x is total crap for video
output, and will be replaced with SDL 2.x soon (perhaps), so if you
want to use SDL, write output drivers for SDL 2.x.

Additionally, I accidentally damaged Sun support, which made me
completely remove Sun/Solaris support. Nobody cares about this anyway.

Some left overs from previous commits removing modules were cleaned up.
2012-07-28 20:44:59 +02:00
wm4 f53dcf163d build: remove bin_to_header.py and use TOOLS/file2string.py instead
TOOLS/file2string.py was recently added upstream, so bin_to_header.py
is not needed anymore. Also fix vo_gl3.c, since file2string.py works
slightly different from my script.
2012-07-28 20:44:07 +02:00
wm4 51e198c2a1 Merge remote-tracking branch 'origin/master'
Conflicts:
	.gitignore
	bstr.c
	cfg-mplayer.h
	defaultopts.c
	libvo/video_out.c

The conflict in bstr.c is due to uau adding a bstr_getline function in
commit 2ba8b91a97. This function already existed in this branch.
While uau's function is obviously derived from mine, it's incompatible.
His function preserves line breaks, while mine strips them. Add a
bstr_strip_linebreaks function, fix all other uses of bstr_getline, and
pick uau's implementation.

In .gitignore, change vo_gl3_shaders.h to use an absolute path
additional to resolving the merge conflict.
2012-07-28 17:24:05 +02:00
Stefano Pigozzi 7dfaaa9510 vo_sharedbuffer: remove from autoprobe list
This video output is headless and only intended to work with GUIs
explicitly asking for it. This makes it useless to have it in the
autoprobe list.
2012-07-27 16:53:57 +03:00
Stefano Pigozzi 02add991fb vo_corevideo, vo_sharedbuffer: put private state in vo->priv
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.
2012-07-27 16:52:22 +03:00
Uoti Urpala 31458a51b5 vo_vdpau: disable refresh-aware frame timing when composited
Under a compositing window manager the current VDPAU implementation
behaves differently than without it. Frame flip timing info becomes
incorrect (I guess it only reflects when the frame was sent to the
compositor, not when it was actually shown), and there is no
limitation to at most one frame switch per refresh like without
compositing. Detect whether a compositing window manager is active and
disable refresh-aware frame timing and dropping in this case,
similarly to what fps=-1 would do. This behavior can be controlled
with the new suboption "composite-detect".

Disabling the refresh-aware logic makes timing somewhat less accurate.
Because the video switch rate limit isn't there, the lack of frame
dropping on player side does not impose a hard limit on video FPS, but
does reduce performance somewhat as redundant frames are drawn in
memory.

The existence of a compositing window manager does not guarantee that
the current window is actually composited, so the current check is not
foolproof. In particular, some WMs have support for a "unredirect
fullscreen windows" option. Support for such things could be improved.
2012-07-27 03:40:38 +03:00
Uoti Urpala 0a1fc392b4 vo_vdpau: fix possible crash after preemption
Preemption recovery code could change the vc->vdp pointer when
recreating the VDPAU device. However, some other code cached the value
of vc->vdp in local variables over calls to handle_preemption(), and
could then crash when using the stale value later. Make the device
creation code keep the same vc->vdp instead of freeing and
reallocating it, so that the old pointer value is never invalidated
now.
2012-07-16 21:08:42 +03:00
Uoti Urpala 39a45c7a17 build: use python3 to generate some files previously in git
Some files used during build are generated with Python scripts in
TOOLS/. Before, the generated files were included in the git tree.
Start creating them at build time. This introduces a build-dependency
on python3.

The files in question are:
libvo/vdpau_template.c
libmpdemux/ebml_types.h
libmpdemux/ebml_defs.c
2012-07-16 21:08:42 +03:00
Uoti Urpala 9426c5f92a VO: implement shared option handling, use for vdpau
Add infrastructure that allows VOs to specify the suboptions they
take, and get the values directly parsed into their private struct.
The option functionality available with the new system is the same as
for top-level player options. Convert vo_vdpau to use the new system
instead of the old subopt_helper.
2012-07-16 21:08:42 +03:00
Stefano Pigozzi dd77d9e912 cocoa: return the real CGLPixelFormatObj
vo_cocoa_cgl_pixel_format is returning a cached CGLPixelFormatObj.
Return the current one by querying the OpenGL context.
2012-05-15 10:37:58 +02:00
Stefano Pigozzi f47f741c5e cocoa: don't request a depth buffer size 2012-05-15 10:37:58 +02:00
Stefano Pigozzi 77be8b1240 cocoa: gl3: make window creation fail on <10.7
Versions of OSX prior to 10.7 do not support OpenGL 3. Fail the window
creation when that is the case.
2012-05-15 10:37:58 +02:00
Stefano Pigozzi 43337db0a4 cocoa: gl3: support querying of colors bit depth
Add support for querying the bit depth of the colors from the OpenGL
context. This allows to perform dithering correctly.
2012-05-15 10:37:58 +02:00
Stefano Pigozzi 4a2bd440dd cocoa: handle failure on pixel format creation
This didn't make any difference on with OpenGL 2.1, but with the
introduction of OpenGL3.2 it's possible for the pixel format creation to
fail (if OpenGL3.2 is not supported).

This code handles the failure case accordingly.
2012-05-14 16:28:43 +02:00
wm4 4add4f708e screenshot, vo_png: fix dependency on sizeof(AVFrame)
In order to stay binary compatible with libavcodec, applications should
not dependent on sizeof(AVFrame). This means allocating AVFrame on the
stack is not allowed, and the function avcodec_alloc_frame() must be
used to allocate an AVFrame instead.

Partially based on a patch by uau.
2012-04-29 10:01:55 +02:00
wm4 97ac824124 Merge remote-tracking branch 'origin/master'
Conflicts:
	bstr.c
	bstr.h
	libvo/cocoa_common.m
	libvo/gl_common.c
	libvo/video_out.c
	mplayer.c
	screenshot.c
	sub/subassconvert.c

Merge of cocoa_common.m done by pigoz.

Picking my version of screenshot.c. The fix in commit aadf1002f8 will
be redone in a follow-up commit, as the original commit causes too many
conflicts with the work done locally in this branch, and other work in
progress.
2012-04-29 10:01:28 +02:00