Commit Graph

33519 Commits

Author SHA1 Message Date
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
wm4 6d6ae638fa lirc: silence output in case LIRC can't be opened
By default mplayer attempts to use LIRC. If LIRC can't be opened, a
bunch of warnings are printed. Since mplayer is often built with LIRC
enabled by default, many users will see these rather pointless
warnings. Lower verbosity, so that the warnings are not visible by
default anymore.
2012-07-30 01:46:04 +02:00
wm4 d86216685b mplayer: silence "Starting playback..." output
This is just noise. Note that this _might_ break some applications
using slave mode.
2012-07-30 01:46:04 +02:00
wm4 c8b0f21154 codecs: prefer libmad over libmpg123
Someone on the internet once told me that MAD is the best mp3 decoder
(and better than mpg123), so he must be right. I used to force mad in
my config file, but now I'm annoyed by the line "Forced audio codec"
that goes along with it.

Because I think that message is necessary and needed to discourage
users from doing stupid things, but I still want to get rid of this
message, I'm simply moving MAD up in the codec selection order.
(Please look away.)
2012-07-30 01:45:08 +02:00
wm4 5b9d01bd49 vd: silence output about aspect ratio
Uninteresting.
2012-07-30 01:45:08 +02:00
wm4 93de744a2b sub: silence output of subtitle search message
This message is not so interesting.
2012-07-30 01:45:07 +02:00
wm4 521a598068 mplayer: let frontend print stream info, instead of demuxers
When playing a file, users (i.e. me) expect mplayer to print a list of
video/audio/subtitle streams. Currently, this is done in each demuxer
separately. This also means the output is formatted differently
depending which demuxer is active.

Add code to print an uniformly formatted streams list in the player
front end. Extend the streams headers to export additional information
about the streams. Change the lavf and mkv demuxers to follow this new
scheme, and raise the log level for the "old" printing functions.

The intention is to make every demuxer behave like this eventually.

The stream list output attempts to provide codec information. It's a
bit hacky and doesn't always provide useful output, and I'm not sure
how to do it better.
2012-07-30 01:42:55 +02:00
wm4 3daf32adfd mplayer: improve the A/V desync warning
Most of the tips that were given didn't help that much. The message
contained a reference to a dead file.
2012-07-30 01:42:55 +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 614f847516 mplayer: remove Linux RTC support
This used /dev/rtc for timing. /dev/rtc root only by default, and I
have a hard time believing that the standard OS functions are not good
enough. (Even if not, support for POSIX high resolution timers should
be added instead, see clock_gettime() and others.)
2012-07-30 01:42:54 +02:00
wm4 7349d39938 configure, mp_msg.h: get rid of MP_DEBUG
The function mp_dbg() was silent if MP_DEBUG was not defined. MP_DEBUG
was defined only if configure was invoked with --enable-debug. Remove
it and make mp_dbg an alias to mp_msg. This has the advantage tha
--enable-debug changes less. (It only adds -g now and disables stripping
the binary on installation.)

Using log levels is the better way to silence annoying debug messages.
2012-07-30 01:40:42 +02:00
wm4 6009965cdd sub: remove unrar_exec
This removes the ability to open compressed bitmap subtitles from rar
files. The code makes me afraid, and I never needed this feature.
2012-07-30 01:40:42 +02:00
wm4 897d1c01bc mplayer: remove crash handler stuff
mplayer tries to catch all signals by default, and displays a "nice"
crash message if a signal is caught. This is mostly useless for
diagnosing problems, and it's extremely fragile. It's likely to cause
more harm than it possibly solves.

Also remove the current_module variable, which was supposed to give a
hint which submodule was being run. This was far from accurate or
useful.

mplayer also caught SIG_CHILD, and tried to wait for any children. This
potentially gets rid of zombies, but I'm not sure which ones. The only
places that fork(), cache2.c and unrar_exec.c, seem to wait for their
child processes properly. Just get rid of it.

Note that we don't even catch SIGTERM. Maybe this will have to be added
back in order to re-enable screensavers and such when the user
terminates mplayer with ^C on the terminal.
2012-07-30 01:38:53 +02:00
wm4 35291b8ad9 vf_scale: don't pass CPU flags anymore
libav detects them automatically.
Also fix a bunch of other VFs, which use the get_sws_cpuflags()
function defined by vf_scale.c.
2012-07-30 01:38:53 +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 94b7db20bc configure: remove pointless checks for yasm etc.
mplayer doesn't use yasm, as or ranlib. They were only needed to
build with internal libav, which is gone.

Also, get rid of nm. nm was used to find out how external symbols are
mangled. Replace this by a platform check in mangle.h. As far as I
know, sane systems don't mangle symbols. Windows prefixes them with
an underscore ("_symbol"). I don't know about OSX.
2012-07-29 00:22:13 +02:00
wm4 46b218ca34 Change version string
Change the "main" name from "mplayer2" to "mplayer". Note that upstream
mplayer2 uses "MPlayer2", and mplayer uses "MPlayer", so it's
unambiguous.

The version.sh script used to put the latest tag into the version
script. The intention was to add a new tag on each release, but this
hasn't been done in over a year, making the tag absolutely pointless.
Remove it. Now "git-SHORTHASH" is used.

Remove the string "MPlayer & mplayer2 teams" after the copyright date,
because that sounded silly.
2012-07-29 00:04:17 +02:00
wm4 806461c5b6 ad_faad: include neaacdec.h instead of faad.h
The faad.h header printed a warning that this header is outdated.
The header neaacdec.h is probably the proper header, so use that.
2012-07-28 23:51:38 +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 ca0979a5db configure: disable win32 emulation by default
The win32 emulation code can be used to load Windows binary codecs.
Unfortunately, this code is extremely whacky and unmaintained. It
consists of an ancient copy of wine, that was hacked to death and
back. It does super-whacky stuff like patching the loaded codecs at
fixed memory offsets to make them work.

Not removing yet, because it still has some limited use, and some of
the code is needed to load codecs when running natively on Windows.
(Actually, I only care because mplayer can get video input from the
webcam of that-one-latop under Windows, which I find far too neat to
just kill all the code.)
2012-07-28 23:36:08 +02:00
wm4 71e51d948c osd: osd_font.h -> osd_font.pfb
osd_font.pfb is an actual font file extracted from osd_font.h.
file2string.py is used to turn it back into a header during the
build process.
2012-07-28 23:36:08 +02:00
wm4 1ee740cceb TOOLS/fil2string.py: fix for use with binary files
The script was written to be able to deal with binary files, but it had
a bug corrupting some data: e.g. a byte sequence 0x1 0x37 was printed as
"\17" (0x1 = escaped as "\1", and 0x37 = kept as literal "7"), which
would be interpreted as single character 0xF.

Always pad octal literals to length 3, which makes the escape sequences
unambiguous.
2012-07-28 23:36:08 +02:00
wm4 85a3a0d5bc osd: remove freetype font rendering code
The previous commit made libass the default OSD renderer. This commit
removes the disabled freetype renderer completely. The commits were
done separately to make rolling back easier, because using libass for
OSD rendering is a risky choice.

Also remove freetype/fontconfig/fribidi code. This is all done by
libass now.

If mplayer is compiled without libass, no OSD is displayed.
2012-07-28 23:36:08 +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 7a06095dc3 Add support for playing video from streaming sites with libquvi
This enables playing URLs from libquvi supported streaming sites
directly, e.g. "mplayer http://www.youtube.com/watch?v=...."

Anything opened with mplayer is checked with libquvi. If it looks like
a URL of a supported streaming site, libquvi is used to extract the
media URL, which is then passed to the lower level mplayer code
instead of the HTML URL. Hopefully the libquvi URL checker works well
enough that it doesn't cause any problems with normal URLs, files, or
whatever else mplayer's stream layer accepts.

Add the --libquvi-format option. the option value is directly passed to
libquvi as requested format. The only values that seem to work for any
streaming site seem to be "best" (best quality) and "default" (lowest
quality). The mplayer option defaults to "best" (overriding libquvi's
default).

Outstanding issues:
- Does libquvi checking every opened file really not cause problems?
  Should there be a runtime option to disable libquvi use?
  (Probably not an issue.)
- Should we check/set the supported protocol? By default libquvi has
  support for all protocols enabled. In the worst case, it might return
  an URL using a protocol not supported by mplayer, even though it
  could extract URLs with other protocols too.
  (Probably not an issue.)
- Somehow export metadata (like media title) to the mplayer frontend?
2012-07-28 22:05:34 +02:00
wm4 42c3a30008 commands: add show_tracks_osd command to display audio and subtitle tracks on OSD
The command lists the audio and subtitle tracks in the current file on the
OSD. It also marks the currently active streams.
Video streams are not shown, as files with more than one video stream are
exceedingly rare.
2012-07-28 20:57:44 +02:00
wm4 af7a29424c commands: add show_chapters_osd command to display chapters on OSD
The command lists the chapters in the current file on the OSD. It also
marks the current chapter.

This is actually a cheap replacement for the chapter select libmenu
functionality.
2012-07-28 20:57:40 +02:00
wm4 ac771d288d osd: enable line breaking for OSD text
OSD text wider than the window will be broken to fit the width. The line
breaking algorithm is naive and intended as temporary, until the OSD
render code is possibly replaced by "something better".

Newline characters are also considered.
2012-07-28 20:57:37 +02:00
wm4 2b5fd80253 core: change format of time properties to match the OSD time format
Time property values converted to strings via M_PROPERTY_PRINT resulted in
a string different to what the OSD displays (if the OSD level is >= 2).

Change it to match the OSD.
2012-07-28 20:56:53 +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 f03eed6469 Makefile: remove unused rule for mplayer-nomain.o 2012-07-28 20:44:59 +02:00
wm4 cee35cd725 Makefile: move dependency rules for autogenerated files
Explicit dependency rules are needed when a source file depends on an
autogenerated file. Move these rules to the same place in the Makefile
as the rules for creating the generated files.

Also, change the rules to declare the direct dependency, not a
transitive one (e.g. codecs.conf.h is needed by codec-cfg.c, not
codec-cfg.o). In practice, this shouldn't change anything, but it's
cleaner.
2012-07-28 20:44:59 +02:00
wm4 b319ae9190 Remove QTX tests
Whatever.
2012-07-28 20:44:59 +02:00
wm4 6c12e80789 Makefile: clean up
There were some targets left for stuff removed in previous commits.
2012-07-28 20:44:59 +02:00
wm4 5368c46453 Rename DOCS/tech/ to DOCS/OUTATED-tech/
While DOCS/tech/ contains lots of documentation about mplayer's
internals, most of it seems outdated, and hasn't been touched in many
years. On the other hand, there still might be useful things in there,
but it's hard to tell which parts.

Instead of deleting all it, rename the directory to "warn" potential
developers that the documentation is completely outdated.
2012-07-28 20:44:59 +02:00
wm4 f606bb6d97 Remove DOCS/xml
This contained _some_ documentation, but it was all old, crappy,
barely maintained. Even if it was maintained, uau hasn't merged
back changes for years.
2012-07-28 20:44:58 +02:00
wm4 6dc1249625 TOOLS: remove useless crap
Most of the scripts in TOOLS seem entirely useless. Remove them.
There were about 3 types of scripts:
- apparent developer tools (like file format dumpers, benchmarks)
  => I doubt any mplayer developer still alive even uses these
- helpers for encoding or ripping stuff
  => mencoder is gone, at least from this version of mplayer
- helpers meant for users (launching mplayer in weird ways, etc.)
  => just no, it will cause you more pain than gain
So no, there is nothing useful.

Under the scripts not deleted, these are needed for building mplayer:
  file2string.py
  matroska.py
  vdpau_functions.py
These might have _some_ use (but still questionable):
  binary_codecs.sh
  checktree.sh
2012-07-28 20:44:58 +02:00
wm4 7d4576cf79 Remove TOOLS/realcodecs
I have no idea what these are about, but it's probably useless outdated
crap. According to TOOLS/README, they are wrappers around
some Real binary codecs. They were added in 2003, and never touched
again (except for cosmetic changes).
2012-07-28 20:44:25 +02:00
wm4 cf9587fc04 Remove ancient kernel device drivers
These were device driver kernel modules for certain prehistoric graphic
cards. The source code indicates these are written against early
2.4 kernels.
2012-07-28 20:44:25 +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