Commit Graph

492 Commits

Author SHA1 Message Date
wm4 4e89851aa1 Merge branch 'master' into osd_changes
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
2012-10-16 07:30:30 +02:00
wm4 cf61928eec vo_gl, options: remove doublebuffering option (--double)
Useless. It complicated the code and caused flicker, and was useless
otherwise. The manpage describes this option as "should not normally
be used".

One possibly useful effect from the point of view of the user was that
vsync was disabled. You can do this with the --vsync option, or by
changing X/driver settings directly.
2012-10-16 07:26:31 +02:00
wm4 85d185441a Merge branch 'input_changes' into master
Conflicts:
	DOCS/man/en/vo.rst
	etc/input.conf
	input/input.c
	m_property.c
2012-10-12 11:53:53 +02:00
wm4 c9df2c8bd8 sub: add --ass-style-override option to disable style overrides
There are a number of options which modify ASS subtitle rendering. Most
of these do things that can interfere with the styling done by subtitle
scripts, resulting in incorrect rendering. Add the --ass-style-override
option to make it easy to disable all overrides. This helps trouble-
shooting, and makes it more practical to use the override features. (You
can simply toggle the ass-style-override property at runtime, should
one of the style override options break subtitle rendering at a certain
point.)

This mainly affects whether most --ass-* options are applied, as well
as --sub-pos. Some things, like explicit style overrides loaded with
--ass-force-style, can't be changed at runtime using the
ass-style-override property.
2012-10-12 10:13:42 +02:00
wm4 fd56c168ae options: add --status-msg
Replaces the status line with a custom string.

This is probably useful for hacking old slave mode applications into
working again. Even if not, this might be generally useful.
2012-10-12 10:13:42 +02:00
wm4 dec53f760e commands: add more property-option bridge uses, rename some options
Make more properties use the property-to-option bridge to reduce code
size and to enforce consistency. Some options are renamed to the same
as the properties (the property names are better in all cases).

Do some other minor cleanups. One bigger issue was memory management of
strings: M_PROPERTY_TO_STRING assumed the strings were statically
allocated, and no dynamic allocations could be returned. Fix this in
case the need for such properties arises in the future. Get rid of
m_property_string_ro(), because it's not always clear that the "action"
parameter is M_PROPERTY_SET and the string argument will be used.
2012-10-12 10:10:31 +02:00
wm4 1a5a7a4929 options: accept "yes" and "no" only for flags
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.
2012-10-12 10:10:31 +02:00
wm4 3d67041089 options: remove CONF_TYPE_POSITION
This was the option parser for the off_t C type. These days, off_t is
always int64_t, so replace all its uses by int64_t and CONF_TYPE_INT64.

Fix the --sstep option. It used CONF_TYPE_INT with an off_t variable,
which will result in invalid memory accesses. Make it use type double
instead, which seems to make more sense for this option.
2012-10-12 10:10:30 +02:00
wm4 10437c35df commands: rename "osdlevel" option and property, make it a choice
Rename both the option and property to "osd-level", which fits a bit
better with the general naming scheme. Make it a choice instead of an
integer range. I failed to come up with good names for the various
levels, so leave them as-is.

Remove the useless property handler for the "loop" property too.
2012-10-12 10:10:30 +02:00
wm4 6f1486b397 commands: replace --hardframedrop, change framedropping property
Replace --hardframedrop with --framedrop=hard. Rename the framedrop
property from "framedropping" to "framedrop" for the sake of making
command line options have the same name as their corresponding
property. Change the property to accept choice values instead of
numeric values.

Remove unused/forgotten auto_quality variable.
2012-10-12 10:10:30 +02:00
Rudolf Polzer 327a5d0ecf encode: add options --ovfirst and --oafirst
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.
2012-09-29 15:04:40 +02:00
wm4 7fe56f1602 options: accept "yes" and "no" only for flags
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.
2012-09-23 14:58:21 +02:00
wm4 425ac31a3b softvol, ao_pulse: prefer ao_pulse volume control by default
--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).
2012-09-23 14:57:01 +02:00
wm4 af14474879 options: make cache option always per-file
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.
2012-09-23 14:56:30 +02:00
wm4 f5f0c66d1f options: rename noconfig to no-config, nocache to no-cache
This how it's supposed to be. The manpage has the correct names.
2012-09-18 21:08:20 +02:00
Rudolf Polzer f5b8b6ac12 encode: video encoding now supported using mencoder-like options 2012-09-18 21:08:20 +02:00
Stefano Pigozzi 70e7d63ba0 core, timeline: cache external ordered chapter files too
Previously, Matroska source files other than the initially opened one
were always accessed without caching. Enable cache for extra files
too. A separate cache process/thread is started for each file, which
is less than optimal but probably better than no caching if the user
explicitly enabled cache. This commit only implements caching for
Matroska ordered chapters (not for EDL timeline).

To build the timeline we need to demux the files in the current
directory to look for segments with matching uuid. This first demux is
done with no cache since we don't need to read a lot of the stream. If
the file is recognized as one of the needed sources it's reopened with
cache enabled.

Also move the stream_cache_size global variable to the options struct.

Conflicts:
	cfg-mplayer.h
	mplayer.c
	stream/stream.h
	timeline/tl_matroska.c
2012-09-18 21:07:30 +02:00
wm4 b94cdc4baf options: change --vid, --aid, --sid options
The --vid, --aid, --sid options now accept the values 'off' and 'auto',
instead of having the user deal with the numeric values -2 and -1. The
numeric values are not allowed anymore.

Remove the --audio option. It was probably meant as compensation option
for --no-audio. There are no such options for sub/video, and it was not
documented, so just remove it. The replacement is "--aid=auto".

Also do some updates to the manpage.
2012-09-18 21:07:30 +02:00
wm4 c955549204 options: change --loop option, and extend choice option type
The --loop option takes slightly different parameters now. --loop=0
used to mean looping forever. Now it means looping is disabled (this is
more logical: 2 means playing 2 more times, 1 means playing 1 more time,
and 0 should mean playing not again).

Now --loop=inf must be used to enable looping forever.

Extend choice types to allow an optional range of integers as values.
If CONF_RANGE is added to the flags of a m_option_type_choice option,
m_option.min/max specify a range of allowed integer values. This can be
used to remove "special" values from make integer range options. These
special values are unintuitive, and sometimes expose mplayer internals
to the user. The (internal) choice values can be freely mixed with the
specified integer value range. If there are overlaps, the choice values
are preferred for conversion to/from strings.

Also make sure the extension to choice options works with properties.
Add the ability to step choice properties downwards, instead of just
upwards.
2012-09-18 21:07:29 +02:00
wm4 d29d4df634 options: remove M_OPT_IMPLICIT_DEFAULT
This was to make an option without value use the option's default value
(e.g. --term-osd is the same as --term-osd=auto). Make it simpler by
handling this case as an empty choice.

The flag was probably needed when option handling still did ambiguous
argument parsing.
2012-09-18 21:07:29 +02:00
wm4 f97a85595b options: remove -subalign
It can't be re-implemented, because this isn't supported by libass. The
-subalign option and the associated sub-align slave property did
nothing. Remove them.
2012-09-18 21:07:29 +02:00
wm4 128bc6a21e Remove VESA/FBDEV remains, clean up example.conf
Remove VESA and FBDEV specific code that was forgotten when the
respective VOs were removed. Remove references to old or broken
stuff from example.conf.
2012-09-18 21:04:46 +02:00
Uoti Urpala 435d7c97c9 cleanup: remove pointless #defines
Remove the following #defines, which should never change in practice:

CONFIG_FAKE_MONO, OUTBURST, FAST_OSD, FAST_OSD_TABLE
The configure script hardcoded these to particular values in config.h.
They could only be changed by manually editing it. I don't think
anyone would want to.

X11_FULLSCREEN
This once did something, but became meaningless years ago and was now
always set to true if the files using it were compiled at all.

Conflicts:
	configure
	libvo/osd.c
	libvo/vo_gl.c

Merged from mplayer2. The OSD defines were already removed in this fork.
2012-09-18 21:04:46 +02:00
wm4 e181547db1 Remove support for libnemesi RTSP streaming
Removed due to being a maintainance burden.
Support for FFmpeg is available.
2012-08-20 15:36:03 +02:00
wm4 3a5d5f01d4 Remove support for LIVE555 RTSP streaming
The main excuse for removing this is that LIVE555 deprecated the API
the mplayer implementation was using. The old API still seems to be
somewhat supported, but must be explicitly enabled at LIVE555
compilation, so mplayer won't always work on any user installation.

The implementation was also very messy, in C++, and FFmpeg support is
available as alternative.

Remove it completely.
2012-08-20 15:36:03 +02:00
wm4 8ca3ec1562 libmpdemux: remove demux_real, demux_viv, demux_audio
libavformat replaces demux_audio completely. I don't know/care what
vivo (demux_viv) is. libavformat has a Real demuxer; it seems it works
slightly better, with a different set of bugs.
2012-08-20 15:36:02 +02:00
wm4 aebfbbf2bd Remove win32/qt/xanim/real binary codecs loading
Remove the win32 loader - the win32 emulation layer, as well as the
code for using DirectShow/DMO/VFW codecs. Remove loading of xanim,
QuickTime, and RealMedia codecs.

The win32 emulation layer is based on a very old version of wine.
Apparently, wine code was copied and hacked until it was somehow able
to load a limited collection of binary codecs. It poked around in the
code segment of some known binary codecs to disable unsupported win32
API calls to make them work. Example from module.c:

    for (i=0;i<5;i++)  RVA(0x19e842)[i]=0x90; // make_new_region ?
    for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ?
    for (i=0;i<5;i++)  RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ?
    for (i=0;i<9;i++)  RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ?
    for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads

Just to show how utterly insane this code is. You wouldn't want even
your worst enemy to have to maintain this. In fact, it seems nobody
made major changes to this code ever since it was committed.

Most formats can be decoded by libavcodecs these days, and the loader
couldn't be used on 64 bit platforms anyway. The same is (probably)
true for the other binary codecs.

General note about how support for win32 codecs could be added back:

It's not possible to replace the win32 loader code by using wine as
library, because modern wine can not be linked with native Linux
programs for certain reasons. It would be possible to to move DirectShow
video decoding into a separate process linked with wine, like the
CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which
uses the dshownative library to use DirectShow codecs on Windows.
2012-08-16 17:16:33 +02:00
wm4 0e7cf9518a core: intentionally cripple slave mode
Rename -slave to -slave-broken to prevent slave mode applications from
working. Do this to prevent horrible user experiences, in case someone
should attempt to try this version of mplayer with smplayer and others.
This also makes it clear that we don't intend to keep slave mode
compatibility, because the slave mode protocol is horrible and bad.

See the changes in options.rst for further reasons and comments.
2012-08-15 23:59:45 +02:00
wm4 5f57d27656 image_writer: add option parsing
image_writer now provides its own option parsing, and screenshot.c and
the mplayer frontend use it.
2012-08-06 17:48:30 +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 94782e464d options: get rid of ambiguous option parsing
Options parsing used to be ambiguous, as in the splitting into option
and values pairs was ambiguous. Example:

    -option -something

It wasn't clear whether -option actually takes an argument or not. The
string "-something" could either be a separate option, or an argument
to "-option". The code had to call the option specific parser function
to resolve this.

This made everything complicated and didn't even have a real use. There
was only one case where this was actually used: string lists
(m_option_type_string_list) and options based on it. That is because
this option type actually turns a single option into a proxy for several
real arguments, e.g. "vf*" can handle "-vf-add" and "-vf-clr". Options
suffixed with "-clr" are the only options of this group which take no
arguments.

This is ambiguous only with the "old syntax" (as shown above). The "new"
option syntax always puts option name and value into same argument.
(E.g. "--option=--something" or "--option" "--something".)

Simplify the code by making it statically known whether an option takes
a parameter or not with the flag M_OPT_TYPE_OLD_SYNTAX_NO_PARAM. If it's
set, the option parser assumes the option takes no argument.

The only real ambiguity left, string list options that end on "-clr",
are special cased in the parser.

Remove some duplication of the logic in the command line parser by
moving all argument splitting logic into split_opt(). (It's arguable
whether that can be considered code duplication, but now the code is a
bit simpler anyway. This might be subjective.)

Remove the "ambiguous" parameter from all option parsing related code.

Make m_config unaware of the pre-parsing concept.

Make most CONF_NOCFG options also CONF_GLOBAL (except those explicitly
usable as per-file options.)
2012-08-05 23:51:49 +02:00
wm4 70c455a596 m_options: get rid of CONF_NOSAVE
This was already treated like CONF_GLOBAL.

Profiles can actually be file-local, as long as the profile sets file
local options only. Allow them to do so.
2012-08-04 19:59:56 +02:00
wm4 c0abc94a4b options: fix forgotten --sound => --audio rename 2012-08-03 13:25:57 +02:00
wm4 a78bb28ed6 sub: simplify code by always defining sub_cp 2012-08-03 06:53:10 +02:00
mplayer-svn bbc9fccd46 cache2: allow cache sizes up to 4 TB
Remove variable that is only assigned but never used.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34791 b3059339-0415-0410-9bf9-f77b7e298cf2

Allow using a cache size of up to 4 TB.
Obviously anything close to 4 GB will always fail
on 32 bit systems.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34792 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace off_t by int64_t in cache code.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34793 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove casts that are no longer necessary.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34794 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix header file after r34793.

Patch by Stephen Sheldon, sfsheldo gmail com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34802 b3059339-0415-0410-9bf9-f77b7e298cf2

Put #include <inttypes.h> into the header file where it should be.

Reported by Stephen Sheldon, sfsheldo gmail com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34798 b3059339-0415-0410-9bf9-f77b7e298cf2

Correct r34798.

The header only needs stdint.h while the C file needs inttypes.h.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34799 b3059339-0415-0410-9bf9-f77b7e298cf2

Author: reimar
2012-08-03 01:52:40 +02:00
wm4 ebaaa41f2a Remove teletext support
Teletext requires special OSD support. Because I can't even test
teletext, I can't restore support for it. Since teletext can be
considered ancient and obscure, and since it doesn't make sense to keep
the remaining teletext code without being able to use it, I'm removing
it.
2012-08-03 00:12:46 +02:00
wm4 2aef9e2ef3 stream: remove V4L TV input and V4L radio support
There are V4L2 drivers, and the old V4L stuff seems plain unnecessary.
2012-08-02 23:51:54 +02:00
wm4 7059c15f4a mplayer: rip out --capture support
While this was an interesting idea, it wasn't actually useful.
Basically it dumped the raw data (as requested by the demuxer) into a
file. The result is only useful if the file format was raw or maybe
some MPEG packet stream, but not with most modern file formats.
2012-08-02 23:22:52 +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 59b938c8aa stream: remove native RTSP/RTP/PNM support
There are still various other RTSP implementations available, such as
libnemesi, live555, and libav. The mplayer native version was a huge
chunk of old unmaintained code.
2012-08-01 17:47:14 +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
wm4 423a75250f mplayer: make display of playback status more uniform
The code to format the playback time was duplicated a few times. There
were also minor differences in how the time is formatted. Remove most
of these differences. This also fixes a bug in the output of the
osd_show_progression command, introduced in 74e7a1e937.

There was some logic to display the percent position in the OSD status
for a short while after seeking. Remove that logic and always display
the percent position.

Make --osd-fractions a flag option. This removes the ability to show
the number of frames played since the start of the current second
(i.e. the fraction of the time was turned into a frame number). This
features wasn't so great anyway, because modern video file formats
don't always have a (valid) FPS set, and could lead to inaccurate
display.

Still to sort out:

Unfortunately, the terminal status is still formatted differently from
the OSD, and even worse, it has a completely different time source.

Not sure if I like how the status line looks now (it's a bit "full"?).
Maybe it will be changed again later.
2012-08-01 00:42:06 +02:00
wm4 6e020e66e0 mp_msg: remove filename_recode
This was intended for translating filenames from filesystem charset to
the terminal charset. Modern sane platforms use UTF-8 for everything,
and on Windows we use unicode APIs, so this is not needed anymore.

Remove filename_recode, all uses of it, options and configure checks
related to terminal output charset, and code that tries to determine
the same.
2012-07-31 01:35:53 +02:00
wm4 c78ba1c55c mplayer: remove stream dumping capability
This had very limited usefulness, and you're much better off using
ffmpeg directly. Even if that should not be sufficient, the mplayer
encoding branch might provide a better way out.
2012-07-30 22:55:50 +02:00
wm4 1fde09db6f Remove some demuxers and decoders
Most of these demuxers and decoders are provided in better form by
libav, while the mplayer builtin ones are essentially unmaintained. The
only legimitate use case for not using the libav ones was working around
libav bugs or bugs related to the way mplayer uses libav. Instead of
trying to keep dead code alive, development effort should go into
improving libav or the mplayer libav glue code.

Note that the libav demuxer have been preferred over the mplayer builtin
ones for a while in mplayer2. There were some exceptions: playing DVDs
with dvdnav or playing network sources. (That's because some stream
modules and network.c requested explicit file formats, such as
DEMUXER_TYPE_MPEG_PS, which mapped to builtin demuxers.) With this
commit, they are switched to use libav. One caveat is that the requested
format is not passed to libavformat, instead we rely on the auto probing
to select the correct libav demuxer (see code in demux_open_stream()).
2012-07-30 22:14:32 +02:00
wm4 4d689631b8 options: remove some CONF_TYPE_PRINT placeholder options
Most of these printed "feature X is not implemented". Not very useful.
2012-07-30 02:14:27 +02:00
wm4 5c630c96cd options: rename --no-sound to --no-audio 2012-07-30 02:04:00 +02:00
wm4 d83211722e options: remove "no" options variants
The old option parser required adding two options for each flag option:
e.g. "-video" and "-novideo". Later, code was added to handle the "no-"
prefix automatically for flag options. Remove the "no" prefixed options
entirely (unless they are not flag options, then just rename them), and
require the user to use the "no-" prefix instead.

You can't use the old prefix anymore.

Old: -novideo
New: --no-video
2012-07-30 02:02:23 +02:00
wm4 87cb5c683d mplayer: remove --autoq
Whatever that was, it has no use anymore.
2012-07-30 01:49:35 +02:00