Commit Graph

33848 Commits

Author SHA1 Message Date
cantabile 27262dec1b manpage: correct the definition of full range video 2012-08-21 18:17:37 +02:00
wm4 75693f4f75 manpage: document -use-filename-title removal/replacement 2012-08-20 15:36:06 +02:00
cantabile fa0ea3bd0d parser-cfg: specify which config file contains the unknown option
Also add some punctuation to the warning message.
2012-08-20 15:36:05 +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 988dad5fc7 osd: get rid of useless initialization function
The function merely printed redundant messages that were not visible by
default.
2012-08-20 15:36:05 +02:00
wm4 4adc0064db sub: remove unused definitions 2012-08-20 15:36:05 +02:00
wm4 bd8b9ef6d1 demux_gif: change format of packets to make it work again
The only decoder which could handle demux_gif's output was vd_raw,
which has been removed recently. Instead of re-adding vd_raw, make it
work with vd_ffmpeg.

By coincidence, the FourCC "raw " fits our needs and it understood by
the ffmpeg raw decoder (apparently used in mov files going by
libavcodec/rawdec.c). Since there doesn't seem to be any good way to
transport the palette in mplayer dmuxer packets, create an AVPacket for
this purpose. (struct sh_video provides a "global" palette. Rather than
hacking vd_ffmpeg to use it, it seems cleaner to make demux_gif use
AVPacket, which supports a per-frame palette.)
2012-08-20 15:36:05 +02:00
wm4 53f6eba06c vd_ffmpeg, demux_mng: allow general raw formats, fix MNG demuxer
Change vd_ffmpeg such that if sh_video->format is a mplayer pixel
format, and there's no other codec information, try to play it as raw
video. (The case of no codec information happens if the "generic" ffmpeg
decoder is instantiated, which is tried last. This means clashes with
actual existing formats are less likely.)

demux_mng did not initialize all fields of the bih, which made vd_ffmpeg
do invalid memory accesses when trying to copy the extradata. Also, use
IMGFMT_RGB32 instead of creating the FourCC directly. (They should be
the same, but what if mplayer changes the IMGFMT_* values.)

This also fixes demux_rawvideo.
2012-08-20 15:36:04 +02:00
wm4 6a26b4a665 libmpcodecs: remove redundant audio and video decoders
Probably all of these are supported by libavcodec. Missing things can
be added back.

Also remove qtpalette.h. It was used by demux_mov.c, and should have
been deleted with commit 1fde09db6f.
2012-08-20 15:36:04 +02:00
wm4 6f7ba66817 Remove support for libdv
This removes the libdv demuxer and audio/video decoders. FFmpeg has
support for it, and it's even preferred over the internal decoders.
2012-08-20 15:36:03 +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 fc2ea37694 build: remove leftover bits for internal libdvdread support
Support for internal libdvdread has been removed in commit 41fbcee1f5,
but some bits have been missed in Makefile/configure.

Support for libdvdread as normal library is left unchanged.
2012-08-20 15:36:02 +02:00
Stefano Pigozzi e70b5ee2fd cocoa_common: add HiDPI/retina support
With a HiDPI screen, for performance and backwards compatibility
reasons, AppKit requests an OpenGL surface with a pixel number that
equals the user points number. After the image is rendered to this
smaller surface, it is upscaled so that its dimensions are comparable
across screens of different DPIs. The applied scaling is not that good
and makes the video/subtitles blurry; this is not acceptable for a
video player.

Request AppKit to use a high resolution OpenGL surface to back the
mplayer2 OpenGL view. Also set the window pixel size information
correctly in the VO object by converting user points to actual pixels.

All the system version checks are done at runtime so that the feature
is available on OSX 10.7 even with a binary compiled with older SDKs.

Also replace is_lion_or_better() with is_osx_version_at_least(10, 7, 0)
which is defined in osx_common.
2012-08-16 22:41:09 +02:00
Stefano Pigozzi c15270d3b9 macosx_finder_args: fix file open order
When files are double clicked or drag and dropped to the mplayer2 icon they
can be in random order. This commit forces alphabetical order.

Opening them with command + down arrow already worked correctly.
2012-08-16 22:35:27 +02:00
Stefano Pigozzi 39e28570f1 macosx_finder_args: make work with recent changes 2012-08-16 22:32:26 +02:00
Stefano Pigozzi 87c375e6f2 cocoa_common.m: add missing config.h include
This is needed for the check on CONFIG_SDL in this file.
2012-08-16 22:30:06 +02:00
Stefano Pigozzi 13675fc7dc cleanup: osx_common: remove unused functions
Remove functions that aren't called anymore:

 *  `osx_foreground_hack` was replaced by the NSApplication's
    activateIgnoringOtherApps: in cocoa_common.
 *  Aspect ratio functions were not called by the "new" cocoa backend,
    since the corresponding menu item was deleted.
2012-08-16 22:29:42 +02:00
Stefano Pigozzi dcb90fde25 cocoa_common: refactor menu generation
This commit is supposed to make the menu generation a little more
readable. It also fixes menu generation for the `cmd+q` entry.
2012-08-16 22:28:27 +02:00
Stefano Pigozzi 31d0eb86f3 gl_common: fix compilation on OS X 10.8
As of OS X 10.8 Apple completely removed X11 from the system.
gl_common.h was including gl.h using the path <GL/gl.h>. This path
comes from the X11 headers, which are missing in 10.8.

Change gl_common.h to include gl.h from Apple's OpenGL implementation
as <OpenGL/gl.h> if X11/XQuartz is not detected.
2012-08-16 22:25:13 +02:00
wm4 0e2c48a3ce VO: remove vo_directfb2 and vo_directx
While being able to play videos on a framebuffer device would be nice,
I didn't need it, and couldn't even test it (buggy nvidia binary
drivers that disable framebuffers, buggy DirectFB that crashes when
using the X11 backend). It's just dead weight, get rid of it.

vo_directx was very horrible, and by today it's mostly useless. I didn't
remove it, because there was that-guy who told me in amazement how
awesome mplayer was, because it was the only video player fast enough
for fast playback on his system when using vo_directx. Sorry, that-guy.
2012-08-16 17:17:50 +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
Uoti Urpala c6b03ffef6 demux_lavf: assume audio codec_tag 0 means unset
Libavformat does not distinguish between "no codec_tag given" and
"codec_tag given, value is 0". 0 can be a valid value. Change
demux_lavf to assume that 0 always means unset for audio. This
prevents incorrect selection of the PCM decoder, which includes
"format 0x0" in its codecs.conf entry. The video case accepts 0 iff
codec_id is RAWVIDEO, but there's no obvious similar check possible
for audio. Thus this could possibly cause issues if a file really uses
0 to mean uncompressed audio.
2012-08-16 17:16:33 +02:00
Uoti Urpala 7f0926498c ad_ffmpeg: add sanity check against decoder overreads
The libavcodec Musepack SV8 decoder returned 2 bytes consumed for 1
byte input, which triggered a crash due to negative input packet size
later. Add a sanity check to prevent crashes with this type of minor
decoder overreads. Also add a check to parser consumed data.
2012-08-16 17:16:33 +02:00
Uoti Urpala 202ea8214e stream_file: print strerror() when failing to open a file
stream_file always printed "File not found" if it could not open a
file, even though this could be due to other reasons such as
permission problems. Print strerror() information instead. This
changes the output for "mplayer /etc/shadow" from
File not found: '/etc/shadow'
to
Cannot open file '/etc/shadow': Permission denied
2012-08-16 17:16:32 +02:00
mplayer-svn 214edc0ef2 command: expand properties for "run" command
Change "run" command to expand properties.

Patch by Jan Christoph Uhde [Jan UhdeJc com], documentation
part changed by me.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35081 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-16 17:16:32 +02:00
wm4 4672ff39dd vo_vdpau: fix crash when vo_vdpau initialization fails
This happened on system without a vdpau driver installed. It's
especially bad because vdpau is the default VO.

I'm not sure when this bug was introduced, and it seems to exist in
upstream mplayer2 too.
2012-08-16 17:16:32 +02:00
wm4 1b7b0c93a8 video_out: fix crash when VO autoselection fails
init_best_video_out() did not manage the memory for vo->window_title
correctly, and free'd it twice when initialization failed (that's due
to talloc_free_children() being called). When the next VO was tried,
it reused the dangling pointer. Initialize this member somewhere else
lazily instead.
2012-08-16 17:16:08 +02:00
Rudolf Polzer 850f2b4511 configure: check for python3 existence 2012-08-16 17:16:05 +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 f3bf5ded4a image_writer: make JPG default and increase quality (for screenshots)
The assumption is that JPG screenshots are more useful in general.
Lossless screenshots made from lossy videos are just a waste of space.

Increase JPEG quality a bit. There's a tradeoff between quality and
size, and since JPEG is the default now, attempt to balance the
JPEG settings to provide sane defaults for general use cases.
2012-08-16 00:01:19 +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 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
Stefano Pigozzi 6879d1162c vo_sharedbuffer: remove this VO
Since slave mode is not planned to be kept, this VO is useless and I'm
removing it.

This VO was useful for OSX GUIs. Since in cocoa you can't embed views in
windows from other processes, this VO was writing to a sharedbuffer with
mmap. The OSX GUIs would then read from the buffer and render the image
with an external renderer.

If in the future we will want to support GUIs we will need to reasearch the
IOSurface framework. This allows to share kernel managed image data
across processes and integrates well with OpenGL.
2012-08-15 22:01:39 +02:00
wm4 4e2fe3724b command: fix crash when setting nonexistent property
Commit ebaaa41f2a accidentally removed the final terminator of the
properties array.
2012-08-10 01:30:53 +02:00
wm4 b4dd2194d5 command: fix subtitle selection display
Commit 9c02ae7e95 set the sh variable (see diff) to the struct of
type sh_sub instead the one of sh_stream. Unfortunately this didn't
crash, and merely made the OSD show "unknown" for the language.

Commit 804bf91570 accidentally removed the display of the track
title. Add it back.
2012-08-08 21:45:37 +02:00
Stefano Pigozzi 7fd43b0bcd osx: fix build
adapt the osx VOs to build against the latest changes.
2012-08-08 21:23:28 +02:00
wm4 531778d056 manpage: document gl3, direct3d, portaudio, remove v4l2
The documentation is mostly taken from the help text embedded in the
code of each output driver.

vo_v4l2 and ao_v4l2 have been removed.

Minor modifications to vo_xv, vo_directx and vo_gl.
2012-08-08 00:09:44 +02:00
wm4 97810cbfbd manpage: document per-file options 2012-08-07 22:24:50 +02:00
wm4 d1783c6f7a manpage: add initial documentation about changes
Documents changes from mplayer-svn and mplayer2.

Most of this should probably not be in the manpage, but on a website.
But there is no website yet.
2012-08-07 22:24:29 +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 762ef8d532 codecs.cfg: do not prefer spdifmpa over mpg123 decoder
The generic hardware pass-through decoder ad_spdif (imported from
mplayer-svn) was mistakenly prefered over the default decoder mpg123.
This is the same as mplayer-svn commit 34192.

The spidfmpa entry was marked as "untested", which for inconceivable
reasons is preferred over entries marked "working". (The probe order
is untested, working, buggy. Possibly to "force" untested codecs to be
tested?) I didn't know this behavior, and skipped the corresponding
mplayer-svn commit 34192, as it looked like it would move up the entry
in autoprobe order (not the reverse), which might have been slightly
dangerous, or at least not something we would have to bother with.

The only change in behavior the incorrect entry caused was that playing
a shoutcast mp3 stream displayed "inf" as time on the mplayer status
line, instead the time since joining the stream. (The same can be seen
when starting mplayer-svn with -ac spdifmpa,mpg123 .) I'm not sure why
this happens; I can only guess that when spdifmpa throws away header
data when it fails initializing, or messes up something else.
2012-08-07 19:02:34 +02:00
wm4 796599bcc2 playlist: do not add playlist base path to URLs
The entries of a playlist file usually refer either to local files (in
the same directory as the playlist), or absolute paths like URLs. In
the first case, you want to add the base path of the playlist file to
the files, so that mplayer can find the files. In the second case, the
URLs should not be changed.

Unfortunately, mp_path_join() recognizes URLs as relative paths, and
changes them. E.g. it tried to play /path/to/playlist/http://entry.

Add some code to deal with this properly. The added code uses the same
approach as m_option_type_custom_url in m_option.c, but because it's
so short and trivial, it's perhaps better not to rely on the option
parser code.

It's also unclear whether mp_path_join() should contain this logic,
but maybe it's better to keep the logic of that function clean.
2012-08-07 03:14:53 +02:00
wm4 b27bc9e3c9 command: skipping past the last chapter explicitly stops playback
Skipping past the last chapter as user action means playback of the
current file should be ended. The code did this by doing a relative
seek by 1000000000 seconds, which usually caused playback to stop.
However, it displayed a quite ugly and arbitrary looking number in the
status display.

Fix this by explicitly skipping to the next file, instead of issuing a
seek command. (If there is no next file, the player will exit, just as
before.)

(Note: an alternative way to solve this could have been comparing the
mpctx->video_pts with the mpctx->last_seek_pts in print_status(). If
they're the same, it's likely that the video_pts was set to the seek
request time, and we could print another PTS or no PTS instead.)
2012-08-07 03:01:44 +02:00
wm4 477af1c777 osd: remove FAST_OSD code
This code has never been active by default, ever since it was added
back in 2001. You had to edit config.h or configure manually to enable
it.
2012-08-07 02:21:19 +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