Commit Graph

33563 Commits

Author SHA1 Message Date
wm4 83f21cec7b man: remove documentation for deleted stuff
Also make some minor cosmetic changes.
2012-08-02 22:07:19 +02:00
wm4 504e2336b7 manpage: merge new manpage
About a year ago, ubitux converted most of the old manpage from the
hard to maintain nroff format to reStructuredText. This was not merged
back into the master repository immediately. The argument was that the
new manpage still required work to be done. However, progress was very
slow. Even worse: the old manpage wasn't updated, because it was
scheduled for deletion, and updating it would have meant useless work.

Now the situation is that the new manpage still isn't finished, and the
old manpage is grossly out of sync with the player. This is not helpful
for users. Additionally, keeping the new manpage in a separate branch,
while the normal development repository for code had the old manpage,
was very inconvenient, because you couldn't just update the
documentation in the same commit as the code.

Even though the new manpage isn't finished yet, merging it now seems to
be the best course of action. Squash-merge the manpage development
branch [1], revision e89f5dd3f2, which branches from the mplayer2
master branch after revision 159102e0cb.

Committers:

* Clément Bœsch <ubitux@gmail.com> (Initial conversion to RST.)
* Uoti Urpala <uau@mplayer2.org> (Many updates.)
* Myself (Minor edits.)

Most text of the manpage has been directly taken from the old manpage,
because this is a conversion, not a complete rewrite.

[1] http://git.mplayer2.org/uau/mplayer2.git/log/?h=man
2012-08-02 22:05:27 +02:00
wm4 ed3f0c3e4b vf: remove VFCAP_FLIPPED and VFCAP_CONSTANT
These were unused.
2012-08-02 02:51:33 +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 c7a15ed0dd m_config: reallow specifying static default values for string options
Commit dc2a4863af introduced a new way of specifying default values
for strings (you're supposed to use OPTDEF_STR() instead of putting it
into the option struct, such as it was done in defaultopts.c). The code
to handle the old way was explicitly disabled, which caused random
crashes when used.

Allow the old way again. With the main option struct in particular, I
see no reason why some option defaults should be specified in
defaultopts.c, and some directly along the options.
2012-08-02 02:37:00 +02:00
wm4 16c6e1dee9 cpudetect: remove unused/forgotten crap 2012-08-01 23:49:06 +02:00
wm4 9dbe8e1b84 input: change bind_keys() to use bstr
This seems rather pointless considering there are still stupid
bstrdup0()s left, but maybe this is the right direction.
2012-08-01 23:43:17 +02:00
wm4 a87084c841 Makefile: move commands from distclean to clean and add missing files
There is no reason why generated source files shouldn't be part of the
clean target, as opposed to distclean. On the contrary, having them
in distclean only looks dangerous when trying to deal with broken
dependency rules. Move them to clean, except config.h (which would
require configure to be run again).

Also, some recently added generated files were missing from the clean
targets.
2012-08-01 23:25:52 +02:00
wm4 4b8fa8a597 build: remove references to cpuinfo
This was a horrible little tool to detect the host CPU at build time.
Forgotten in commit 74df1d8e05.

Also remove forgotten codec-cfg entry in .gitignore .
2012-08-01 23:05:59 +02:00
wm4 b35d89d42b input: replace internal key binds with included etc/input.conf
The internal array of default key bindings is removed. Include the
file etc/input.conf at compile time (using the file2header tool), and
parse the default binds from etc/input.conf at startup time.

This lowers maintainance overhead, and makes sure the default bindings
and etc/input.conf don't deviate. Commit f30bf73bf2 already
made sure etc/input.conf matches the default bindings, so this commit
shouldn't change anything user-visible.
2012-08-01 22:52:28 +02:00
wm4 d1ccee76b1 input: refactor: store builtin key binds along user user binds
Builtin (i.e. default) binds are still separately handled, and this
commit shouldn't change any user-visible behavior.
2012-08-01 22:45:35 +02:00
wm4 deddef4c75 input: simplify input.conf parsing
Now input.conf is loaded into memory at once, instead of streaming the
file into the parser.

The real reason for this change is that I want to be able to read the
config file from memory. (Using fmemopen() would have been simpler, but
that is available on sane platforms only.)
2012-08-01 21:50:24 +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 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
Stefano Pigozzi 7175f178de gitignore: add osd_font autogenerated file 2012-08-01 08:49:05 +02:00
Stefano Pigozzi f05013cf86 mangle: change preprocessor define for macosx
__DARWIN is still not defined, use __APPLE__ instead
2012-08-01 08:46:20 +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 4f80c5ee42 mplayer: remove pos parameter from sadd* functions
The code will be simpler. Also slower, because strlen is removed, but
it's very unlikely this matters at all.
2012-08-01 01:01:26 +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 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 0744d99c5d Fix compilation of vf_fspp on OSX
OSX mangles symbols with "_".
2012-07-31 23:36:43 +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 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 6e8633c734 configure: remove checks for malloc.h and alloca()
Including <malloc.h>, especially if all you want is malloc(), has no
legitimate uses (on sane platforms at least). Remove the check for it,
and remove all uses in the code.

Remove unused check for alloca().
2012-07-30 22:14:33 +02:00
wm4 261243496e configure: remove memalign check
Also, replace the only use of memalign: use av_malloc instead in sub.c.
(av_malloc allocates with the required alignment restrictions.)
2012-07-30 22:14:33 +02:00
wm4 7cdfd2ba39 mplayer: change how pause status is indicated in terminal
Pausing the player used to print the message "=====  PAUSE  =====". It
also inserted a newline for some reason. When pausing and unpausing a
lot, the terminal would be clobbered with "old" useless status lines.

Remove the pause message, and display the status message instead. This
looks better, doesn't fill up the terminal with crap, and needs less
code.

Side note: when cache is enabled, the status line is reprinted on every
idle iteration to reflect possible cache changes. If the platform's
WAKEUP_PERIOD is very small (like on Windows) and terminal output is
slow (like on Windows), it's possible that this leads to a minor
performance degradation. This is probably not a problem (and I don't
care anyway), but maybe something that should be kept in mind.
Disabling the status line with --quiet will help.
2012-07-30 22:14:32 +02:00
wm4 4f86c0a3a4 mplayer: status line: better indication whether audio/video is active 2012-07-30 22:14:32 +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 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 bff71641f6 Merge remote-tracking branch 'origin/master' 2012-07-30 15:42:32 +02:00
wm4 6b4cdfe1c8 Remove XMMS plugin support
XMMS has been dead since 2007.
2012-07-30 02:19:50 +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 f867a97b48 mplayer: cosmetics: give A/V desync message same form as help text 2012-07-30 02:11:02 +02:00
wm4 eb75758138 mplayer: de-crapify builtin help text
Remove all the options that mattered in 2001 only. Use new option
syntax.
2012-07-30 02:06:39 +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 128c5839ed mplayer: redo terminal status line output
Instead of displaying audio and video separately, there's now one
position printed. The idea is that displaying both audio and video
position is redundant. The A/V synchronisation is still printed, so
that you can see if the video time is off.

Also, always print the duration of the file, not only when playing
audio only.

Print "ct" (average A/V sync change) and the number of dropped frame
only if they're significant.

Remove output of outdated and crapified things, like frame position
(these can't be reasonably done with modern media formats, and the
playback code paths for these don't touch them).

This will break some slave mode applications, because they attempt to
parse the status line.
2012-07-30 01:49:35 +02:00
wm4 87cb5c683d mplayer: remove --autoq
Whatever that was, it has no use anymore.
2012-07-30 01:49:35 +02:00
wm4 0f48820ecc mplayer: remove benchmarking/CPU accounting code
The code used for benchmarking and showing CPU stats in the status line
was inaccurate, misleading and fragile. The final nail in the coffin is
the fact that many libav decoders are multithreaded now, and mplayer
couldn't possibly measure the CPU time consumed by them.

Add the --untimed option. This makes the video untimed, just like
--benchmark did (still requires disabling audio synchronization).
2012-07-30 01:49:35 +02:00
wm4 69c13af381 ass_mp.c: remap libass log levels
libass is way too chatty. The application using it shouldn't be forced
to print useless messages, especially not if the action was initiated
by the application, and libass successfully completes it.

Note that this might be a problem that should be fixed in libass, but
remapping the log levels is needed anyway (instead of relying on the
coincidence that the log level values are similar).
2012-07-30 01:49:35 +02:00
wm4 bf3b3d138d mplayer: remove extra "\n" in output 2012-07-30 01:49:26 +02:00
wm4 5404fa26f9 mplayer: do not print version by default
The msg level for the version output is elevated to verbose. When
running mplayer without arguments, the version is printed a second
time (with default msg level) before the help output.
2012-07-30 01:49:26 +02:00
wm4 f113e20794 ao_pulse: don't always print error message if PulseAudio unavailable
PulseAudio is rather high on the auto proving order (to avoid using an
emulated sound API), but it prints an annoying error message if the
PA client library can't connect to a server. On the other hand, we do
want this error message printed if the user explicitly selects the
pulse audio output driver.

Add a flag to indicate that an AO is opened due to auto probing.
ao_pulse checks that flag, and if it's set, do not print if the
initialization error is PA_ERR_CONNECTIONREFUSED, whcih I assume is
the error signalling PulseAudio unavailability. (This error happens
if no PulseAudio server is installed.)
2012-07-30 01:46:04 +02:00
wm4 d80b84f1a0 mixer: silence message about inserting volume filter
But only if softvol is enabled. Otherwise, it should be a warning.
2012-07-30 01:46:04 +02:00
wm4 caeff2b1be mixer: make softvol default, and raise softvol-max to 200
mplayer is not a mixer control panel.
2012-07-30 01:46:04 +02:00
wm4 cc0c0ef9b7 libmpcodecs: silence lines reading "AUDIO:" and "VIDEO:"
Both of these are not very interesting, and redundant with the
corresponding VO/AO initialization messages.
2012-07-30 01:46:04 +02:00