Commit Graph

1777 Commits

Author SHA1 Message Date
wm4 27a8610c56 input: add ability to disable all default bindings for an input section
Add a flags parameter to mp_input_set_section(). Add a flag that defines
whether bindings in the default section are used or not. This is useful
for special functionality, where the normal key bindings may have
unwanted effects.

For example, it shouldn't be possible to seek during encoding. However,
you want to be able to cancel the encoding process gracefully. For that
purpose, the "encode" section of input.conf could be made exclusive:

    mp_input_set_section(mpctx->input, "encode", MP_INPUT_NO_DEFAULT_SECTION);

And input.conf could contain this definition:

    RIGHT seek 10
    q {encode} quit

Then only the key "q" would be bound during encoding.
2012-08-24 14:30:25 +02:00
wm4 41d6ddf5fb mplayer: enable talloc leak report if special environment is variable set
The functionality enabled with the --leak-report option is very useful
for debugging. Introduce a check for the MPLAYER_LEAK_REPORT environment
variable, and enable talloc leak report if it's set to "1".

The environment variable encourages enabling leak report permanently
during development. It's also a bit harder to get wrong: if the
--leak-report option is not the first option, it's silently ignored.
You can't put this option into a config file either. Enabling this
with --enable-debug in configure is not an option, because the leak
report code doesn't seem to be thread-safe, and thus is a bit dangerous.

Also, move the code to the very beginning to make sure leak report is
enabled before any other talloc function is used. Otherwise, these
allocations could be missed.
2012-08-20 15:36:05 +02:00
wm4 6386b11324 mplayer: fix command line arguments log output
In commit 94782e464d, code was added to remove the first
command line argument. (Because that is essentially useless.) The code
for printing with command line on -v still assumed the first argument
should be skipped.
2012-08-20 15:36:05 +02:00
wm4 41fbcee1f5 Remove dvdnav support (DVD menus)
When the internal mplayer MPEG demuxer was removed (commit 1fde09db),
the default demuxer when using dvdnav was set to libavformat. Now it
turns out that this doesn't work with libavformat. It will terminate
playback right after the audio runs out (instead of looping it like the
video, or whatever it's supposed to do). I'm not sure what exactly the
problem is, but since 1. even mplayer-svn can't handle DVD menus
directly (missing highlights), 2. DVD menus are essentially worthless,
and 3. I don't directly watch DVDs, don't bother with it and remove it.

For basic playback, there's still libdvdread support.

Also, use pkg-config for libdvdread, and drop support for in-tree
libdvdread. Remove support for in-tree libdvdcss as well.
2012-08-16 17:17:49 +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 bc1034aac2 mplayer: cosmetic changes to status line output
The terminal status line (showing playback status etc.) was too long
for the standard 80 column width in some cases. Shorten the output by
abbreviating some fields with single letters.

Change "(PAUSED!)" to "(Paused)". This looks nicer.

Move the speed field forward and omit the explicit "header". It's
probably intuitively clear that "x2.00" means double speed.

The field showing the playback time in seconds was padded with spaces.
This just takes space away and wasn't really needed.
2012-08-16 00:04:11 +02:00
wm4 80d2c6b141 mplayer: remove playlist demuxer hack
This was a hack for .mov reference files. The mov demuxer, which
triggered this code, has been removed in commit 1fde09db6f.
The code serves no purpose anymore, and it was bogus in the first
place. (This mov feature should have been handled either by the core's
timeline support, or as normal playlist.)
2012-08-16 00:02:04 +02:00
wm4 43bd4ab3a2 vf_expand: remove OSD support
It's not clear why this video filter supported OSD rendering.
The manpage says:
    "Can be used for placing subtitles/OSD in the resulting black bands."
But every single VO already does this if vf_expand adds black borders.
This feature is 100% pointless.
2012-08-16 00:00:58 +02:00
wm4 fb563de255 sub: fix confusion of ass_library handles
Commit 7484ae8e2e attempted to introduce two ass_library handles
(as it was needed to deal with how ass_library manages fonts), but the
commit was completely bogus: it assumed osd_state->ass_library would be
used by osd_libass.c only, which is not the case. As result, some of the
subtitle code used the wrong ass_library handle.

We need two ass_library handles in osd_state. The one from the mplayer
core for subtitles (osd_state->ass_library), and one for OSD rendering
(osd_state->osd_ass_library).
2012-08-07 19:21:46 +02:00
wm4 7484ae8e2e osd_libass: allocate separate ASS_Library for OSD
osd_libass.c used the same ASS_Library object as the player core. This
caused a problem: when playing a new file, all fonts loaded by the
ASS_Library object were unloaded, including the OSD font. Parts of the
OSD would stop being rendered correctly.

Solve this by creating a separate ASS_Library, with its own set of
fonts.
2012-08-07 02:15:27 +02:00
wm4 0268b1a445 osd: reset OSD change state even if VO doesn't draw OSD
Commit 168293e0ae assumed the OSD drawing routines (which have the
functions osd_draw_text/_ext as entrypoint) would always be called, and
relied on that to reset the change flag.

Some VOs, such as vo_null, didn't do this. Pausing could turn into
endless framestepping in some cases. Restore the part of the OSD drawing
logic that dealt with this. (Alternatively, the VOs could be obliged to
always call the OSD drawing routines, even if the VO doesn't actually
draw the OSD. But it seems even more messy to rely on that.)
2012-08-07 01:58:43 +02:00
wm4 89b7cb0331 win32: fix compilation on MinGW
The commit 74df1d8e05 (and f752212c62) 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.
2012-08-07 01:09:42 +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 ab63072b47 mplayer: make OSD stack a member of MPContext
This also requires that the OSD stack related functions carry a pointer
to MPContext.

Free the OSD stack items (mp_osd_msg) at exit by making MPContext the
talloc parent. (E.g. when exiting while something is still displayed on
the OSD.)
2012-08-04 19:59:56 +02:00
wm4 855449e67c mplayer: free return value of chapter_name() 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 c7be71ae71 command, mplayer: free return value of demuxer_stream_lang() 2012-08-04 19:59:55 +02:00
wm4 a425777b96 mplayer: fix invalid memory access in print_stream()
This is a regression introduced by commit 9c02ae7e95.
2012-08-04 19:59:55 +02:00
wm4 714226b20c playlist: rename params_count field to num_params for consistency
Other (newer) parts of mplayer use this convention, so don't introduce
new conventions.
2012-08-04 19:59:55 +02:00
wm4 c7fe5f58e3 mplayer: rearrange misleading code
The print_timeline() function actually had contained some code that
changed the MPContext state. Since you wouldn't expect that from a
function named print, move that code out of the function. The
misleading code structure was introduced in commit 6f564fe82b.
2012-08-04 19:59:55 +02:00
wm4 a4f7a3df50 mplayer: fix idle mode regressions
Commit 89a17bcda6 simplified the idle loop to run any commands
mplayer receives, not just playlist related commands. Unfortunately, it
turns out many slave commands always assume the presence of a demuxer.
MPContext->demuxer is assumed not to be NULL. This made the player
crash when receiving slave commands like pause/unpause, chapter
control, subtitle selection.

We want mplayer being able to handle this. Any slave command or
property, as long as it's backed by a persistent setting, should be run
successfully, even if no file is being played. If the slave command
doesn't make sense in this state, it shouldn't crash the player.

Insert some NULL checks when accessing demuxers. If sh_video or
sh_audio are not NULL, assume demuxer can't be NULL.

(There actually aren't that many properties which need to be changed. If
it gets too complicated, we could employ alternative mechanisms instead,
such as explicitly marking safe properties with a flag.)
2012-08-04 19:56:23 +02:00
wm4 9c02ae7e95 demuxer: introduce a general stream struct
There are different C types for each stream type: sh_video for video,
sh_audio for audio, sh_sub for sub. There is no type that handles all
stream types in a generic way. Instead, there's a macro SH_COMMON, that
is used to define common fields for all 3 stream structs. Accessing
the common fields is hard if you want to be independent from the stream
type.

Introduce an actual generic stream struct (struct sh_stream), which is
supposed to unify all 3 stream types one day. Once all fields defined
by SH_COMMON have been moved into sh_stream, the transition is complete.

Move some fields into sh_stream, and rewrite osd_show_tracks to use
them.
2012-08-03 13:25:41 +02:00
wm4 e26b7314cf mplayer: fix output of audio/sub language in terminal output
The SH_COMMON lang field seems to be blatantly unreliable and is not
always set by demux_lavf (at least not with dvdnav:// ).

Also fix the same for the show_tracks_osd slave command.
2012-08-03 12:48:03 +02:00
wm4 e13c053665 mplayer: move file loading out of main()
The structure is now as follows:
- main():
    * basic initializations (e.g. init_libav() and more)
    * pre-parse command line (verbosity level, config file locations)
    * load config files (parse_cfgfiles())
    * parse command line, add files from the command line to playlist
      (m_config_parse_mp_command_line())
    * call:
        - handle_help_options():
            * check each help-related option
            * print help if requested
            * main() exits if help was requested
    * call function that works down the playlist:
        - play_files():
            * run idle loop (idle_loop()), until there are files in the
              playlist or an exit command was given (slave mode only)
            * actually load and play a file:
                - play_current_file():
                    * run all the dozens of functions to load the file
                      and initialize playback
                    * run a small loop that does normal playback, until
                      the file is done or a slave command terminates
                      playback
                      (each iteration, run_playloop() is called)
                    * uninitialize playback
            * determine next entry on the playlist to play
            * loop
    * call exit_player_with_rc() (there are many other places which
      use this function, though)
2012-08-03 12:48:02 +02:00
wm4 6f564fe82b mplayer: move things out of main()
The main() function used to be way too big, to the point that it was
unreadable (> 1000 lines).

Move random parts out of the main into new functions.
2012-08-03 07:56:32 +02:00
wm4 a78bb28ed6 sub: simplify code by always defining sub_cp 2012-08-03 06:53:10 +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
wm4 11648493db mplayer: move highly OS specific initialization code out of main()
The intention is to make the main() function smaller (which is at
about 1000 lines currently).

This commit also changes the order of some initializations, but that
should be safe.
2012-08-03 05:09:55 +02:00
wm4 4ced6d4e78 mplayer, stream_tv: move variable initialization
It's not clear why that was done in mplayer's main function.
2012-08-03 04:51:55 +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 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
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 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 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 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 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 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