ao_dsound.c depended on the same configure check as vo_directx.c, which
was removed in commit 0e2c48a3ce. This accidentally disabled
inclusion of ao_dsound.
Fix it by adding a new check. Also, move it below ao_portaudio on the
auto-select list, as ao_dsound is considered deprecated.
Unrelated to that, move ao_lavc below ao_null to prevent it from being
auto-selected.
The change detection signalled a full re-upload on initialization, but
no texture reallocation. Binding the uninitialized buffer caused an
OpenGL error.
Fixes error messages on start with "opengl-hq".
GL_RGB16 doesn't seem to work universally (e.g. Intel). Use GL_RGB by
default, and use GL_RGB16 for "opengl-hq" only.
This may require users of Intel GPUs to manually experiment with the
fbo-format suboption when using "opengl-hq", as GL_RGB16 doesn't seem to
work there in some cases (black screen).
It's not really known whether PBO use causes problems of any kind (most
likely not). They should slightly increase performance. Use them by
default with "opengl-hq".
Even though PBOs don't have anything to do with rendering quality,
"opengl-hq" provides a test bed for features that should be enabled by
default, but aren't out of fear for regressions.
Change the default settings for vo_opengl to highest performance and
compatibility, but lowest quality. Use bilinear as default scaler.
Add "opengl-hq" as alias for high quality settings. This alias uses
exactly the same settings as vo_opengl did before this commit.
Normally, we don't want to call glGetError() all the time, because this
supposedly causes slowdowns. (I could not measure any on Linux with
nVidia binary drivers; maybe it's due to the fact that we have only a
few, expensive calls per frame.)
However, having to ask users to add the "debug" suboption when trying to
diagnose problems is very annoying. Since most errors happen during
initialization only, enabling it for the first 5 frames only is an
interesting compromise.
This renames vo_gl3 to vo_opengl, and makes it the default. The old
vo_gl is still available under "opengl-old".
We keep "gl3" as alias to "opengl" for short-term compatibility.
For OSX/Cocoa, the autoprobe order changes (prefer the "opengl" over
"opengl-old").
Remove "gl_nosw". This was a compatibility alias for "opengl-old", and
there's no point in keeping it.
Now both GL3 (for vo_gl3) and legacy context context creation (for
vo_gl) use the same code to create the X window. Only actual GL context
creation is different.
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.
When audio codec initialization fails, reinit_audio_chain() will call
uninit_player() to close the AO. mpctx->ao is set, but mpctx->mixer.ao
is still NULL. uninit_player() assumes both variables are always the
same, and calls mixer_uninit(), even though mpctx->mixer.ao is NULL.
That function tries to access the ao without NULL check if mute was
enabled.
Fix this in mplayer.c by not relying on the assumption that
mpctx->ao == mpctx->mixer.ao. Also, add a check for NULL to mixer.c
(function muxer_uninit()). One of the checks is redundant and only one
of them is needed, but we add both for general robustness.
Most of these have very limited actual use, or are even entirely
useless. They only serve to bloat the codebase and to make life harder.
Drowning users in tons of barely useful filters isn't exactly helpful
either. Some of these filters were redundant or marked as obsolete.
The dlopen and lua (to be added soon) video filters provide ways to add
custom filters.
Detailed listing for each filter with reasons (with contributions from
divVerent and lachs0r):
1bpp:
Replaced by "scale".
2xsai:
Pixel art scaling algorithm, useless with lossy video.
blackframe:
Not very useful. Apparently one use is combining it with scripts,
that pass the
bmovl:
Weirdly complex and insane (using FIFO commands), questionable use.
cropdetect:
Only sort-of useful when used with scripts, and then it will be
very fragile.
It's probably better to use the dlopen rectangle filter, or to
implement the common use-case in a better way.
decimate:
Not needed/useful with modern video codecs, is an
encoding-only filter.
denoise3d:
"hqdn3d" is better.
detc:
Some of the worse deteleciners.
dint:
Useless, actually crashes. (On an assert in vf.c that is disabled
by default in mplayer-svn.)
dvbscale:
Not even practical, and the same effect can be achieved through
other means.
eq:
Worse/older version of eq2.
field:
Limited use, available as dlopen filter.
fil:
Quoting the manpage:
This filter is very similar to the il filter but much faster,
the main disadvantage is that it does not always work.
Especially if combined with other filters it may produce
randomly messed up images, so be happy if it works but do not
complain if it does not for your combination of filters.
filmdint:
Kind of redundant with pullup, and slightly worse.
fixpts:
Never useful. (Most if not all filters have been fixed for PTS.)
framestep:
Questionable use. For things like creating thumbnails, ffmpeg or
--sstep should be used.
geq:
Limited use, will be redundant with the "lua" filter.
halfpack:
Useless, probably redundant with "scale".
harddup:
Useless.
hue:
Most VOs support this.
il:
Useless.
ivtc:
Another of the worse deteleciners.
kerndeint:
A bad deinterlacer.
lavc:
For DVB output devices. We removed that support.
lavcdeint:
A bad deinterlacer, was already deprecated.
Still available as --vf=pp=fd.
mcdeint:
A broken deinterlacer that uses lavc internals.
ow:
Very slow, barely any quality benefit over "hqdn3d".
palette:
Done by "scale".
perspective:
Files with incorrect perspective are extremely rare. About the
only real-world use for this is keystone correction, which is
usually done in hardware by the projector or by graphics
drivers/compositors.
pp7:
Another useless postprocessing filter with bad and complicated code.
Use libpostprocess with "pp" instead.
qp:
Useless.
remove-logo:
Redundant with delogo, which is better and more practical.
rgbtest:
Useless.
sab, smartblur, boxblur:
Blur filters, redundant to "unsharp".
softskip:
Does nothing.
spp, fspp, uspp:
Useless postprocessing filters. "spp" needs ffmpeg internals.
"fspp" is the optimized version of the "spp" filter (???), while
"uspp" is the slow version (????).
Use libpostprocess with "pp" instead.
telecine:
Evil and useless. Available as dlopen filter for testing
purposes.
test:
Useless.
tfields:
Useless, probably.
tile:
Questionable use. Available as dlopen filter.
tinterlace:
Evil and useless.
yuvcsp:
Probably useless.
yvu9:
Redundant with "scale".
Also remove the following left-over files: vd_null.c, vqf.h
Apparently, libav doesn't have the change for the new way to create a
libavformat context merged yet. So, we can't use that...
Rather, this commit fixes format specific avoptions another way.
On the downside, invalid format options are now detected very late, and
any attempt to set an option value to +something or -something will
append to the previously set option value (this logic can no longer be
specific to options of bitflag type, as finding out the option type is
what we simply cannot do with this interface).
Remove a pointless and broken check for avctx->codec->encode.
1) The check does not test for anything useful.
2) AVCodecContext.encode is a private field and is not supposed to be
accessed from outside of lavc.
2a) AVCodecContext.encode does not exist anymore in latest libavcodec,
so this block fails to build.
This allows to define which stream is to be used as first output stream.
This is useful because dvdauthor refuses VOB files where the audio
stream is the first stream.
When timestamps jump by more than 30 seconds, assume an unexpected
discontinuity. Fixes encoding aborts (i.e. no more frames written) at
DVD cell switches.
When the first frame of a telecine pattern did not generate an output
frame (because it is a 0 or a 1), this could lead to the first two
output frames getting equal pts values.
When the first frame of a telecine pattern generates exactly one output
frame (i.e. when the telecine pattern starts with 2 or 3), then the
output was correct before this comment, and still is unchanged.
When the first frame of a telecine pattern generates more than one
output frame (i.e. when it starts with 4 to 9), then output pts are
still broken. This is not really solvable without knowing the frame
duration, or delaying output by one frame.
Otherwise it heavily violates the manpage's description, and describing
what it did before in the documentation is something too complicated to
describe in the English language.
rawvideo is a rather primitive demuxer that doesn't implement track
switching. The problem was that during track switching the demuxer
implementations normally set the stream IDs in order to do the switch,
and since rawvideo obviously didn't do that, so the current stream in
ds->sh / demuxer->video->sh was set to NULL. (The frontend always
assumes track switching is successful, which is a reasonable
assumption - failing due to missing video codecs etc. is in separate
codepaths.) Later, demux_rawvideo_fill_buffer() in demux_rawvideo.c
tried to dereference the NULL stream and crashed.
Other trivial single-stream demuxers worked fine, because they didn't
try to access ds->sh.
When setting an alias option, its value is not saved in the file-local
options case. The ensure_backup function in m_config.c exits if it
encounters an aliased option, because it should not be saved
additionally to the original option. However, the original option is
likely never saved in this case.
Change it so that ensure_backup always accesses the original option.
The original option is the one that first appears in the option list.
The m_option_value union is supposed to contain a field for each
possible option type (as long as it actually stores data). This helps
avoiding silly temporary memory alocations. Using a pointer to an union
and to a field of the union interchangeably should be allowed by
standard C.
This removes the alternative values like "off", "0", "false" etc., and
also the non-English versions of these.
This is done for general consistency. It's better to have a single way
of doing things when multiple ways don't add singificant value.
Also update some choices for consistency.
The old maximum is 100%. Raise it to PA_VOLUME_UI_MAX, which is about
150%. PA_VOLUME_UI_MAX is the PulseAudio recommended UI-settable
maximum volume, so it seems to be a good idea to use that.
--softvol is enabled by default. For most audio outputs, this is a good
thing, as they have either their own (bad) soft volume implementation,
or control the system mixer. With ao_pulse, the situation is a bit
different: it supports per-application volume (i.e. volume control is
not really global). More importantly, ao_pulse uses a rather large audio
buffer, and changing the volume with mplayer's volume filter has a large
delay. With the native ao_pulse volume control, it's instant, because
PulseAudio's audio filtering happens at a later stage in its processing
pipeline (inaccessible for mplayer).
This means native volume control should really be allowed for ao_pulse,
while it's the reverse for other audio outputs. Make --softvol a choice
option, and add a new "auto" choice. This is default and will use PA's
volume control with ao_pulse, and mplayer's volume filter otherwise
(i.e. the old softvol behavior).
OpenAL is disabled by default, because it supposedly inteferes with
some other configure tests and makes them fail silently.
Previously, --enable-openal followed configure's utterly braindead
semantics and disabled auto detection. However, since OpenAL was
disabled by default, there was no easy way to enable OpenAL at all,
even if it was explicitly requested. Solve this by making
--enable-openal use auto detection.
When playing a network stream, the cache is automatically enabled. We
don't want the cache to stay enabled when playback ends. (For example,
the next file to be played could be a local file, and even if that is
relatively contrieved, we want to do the right thing.)
Introduced the flag M_OPT_LOCAL to force an option to be always file
local. This allows enabling the old mplayer semantics on a per option
basis.
Now it actually aborts, even if the abort command is not the first
command.
Make a policy change: commands before the abort command are silently
thrown away. Previously, normal commands were run after the abort
command finished (so they were run out of order). I'm not sure which
way is the best, all things considered, but the new way is simpler.
fixes issue with | less, where mplayer broke less's terminal
expectations and made less quit
Note this means that read() will be blocking again. Should be ok, as we
always check via select() before reading.
Basically, the encoding code path wanted to set osdlevel=0 as default,
while normal playback needs osdlevel=1. For this purpose, osdlevel was
set to -1 (i.e. invalid) initially to detect whether the --osdlevel
option was explicitly set. When encoding was not configured
(CONFIG_ENCODING undefined), the osdlevel value was not set from
-1 to 1 properly, and the OSD remained invisible by default.
Fix this by getting rid of this logic. It shouldn't be needed, since
osdlevel=1 never shows any OSD messages without user interaction.
Should this ever change, we could still check whether encoding is in
progress, or add another option to allow OSD rendering during encoding.
cocoa_common was hiding the dock and menubar unconditionally when
going fullscreen. This means they were hidden even if they weren't on
the screen mplayer2 was going fullscreen on, resulting in poor user
experience.
Change the fullscreen function in the cocoa backend to check that
mplayer2 is on the same screen as the menubar/dock before hiding them.