Commit Graph

33776 Commits

Author SHA1 Message Date
wm4 cafa00841f libaf: rename af_format.h to format.h
af_format.h declares some symbols which are defined in format.c. The
fact that af_format.c is a completely unrelated file is rather
confusing. Having the header and implementation file use the same base
name is more uniform. (af_format.c is the audio conversion filter, while
af_format.h and format.c are about audio formats and their properties.)

Also fix all source files which include this file.
2012-08-29 00:50:26 +02:00
wm4 7c45be712f options, libaf: unify audio format name handling
Remove the duplicated list of audio format names from m_option.c. Remove
"long" audio format names, and let af_fmt2str() print the usual short
format names. The long names were overly verbose, and were actually
rarely user visible. The only difference between af_fmt2str() and
af_fmt2str_short() is that the former prints unknown format values as
hexadecimal string as fallback.
2012-08-29 00:36:44 +02:00
wm4 7bb95cd8a5 options, codecs.conf, img_format: unify imgfmt name handling
Remove the duplication of image format name lists from codec-cfg.c
and img_format.c. Remove the list of "long" image format names from
img_format.c.

One user visible change is that now mplayer won't print "long" format
names anymore: e.g. instead of "Planar 420P 10-bit little-endian",
the name "420p10le" is used. This is consistent with the names used
by the option parser, and also less noisy.

Partially based on mplayer2 commit f98e47574de15, with some differences.
2012-08-29 00:14:11 +02:00
Uoti Urpala d5aa8dc88f cleanup: remove XvMC remains, reformat img_format.c
Remove remaining references to XvMC. It was already not supported;
remove references to the imgfmt too. Reformat img_format.c.
2012-08-28 23:26:16 +02:00
Stefano Pigozzi da374c40de cocoa_common: improve conditional dock hiding from 3259e4a7a
Make the conditional hiding logic introduced in commit 3259e4a7a2a938
("cocoa_common: make fullscreen menubar/dock hiding conditional") work
when mplayer is started with the `fs` and `xineramascreen` options.
2012-08-28 23:21:07 +02:00
Uoti Urpala 3972642cb8 OSD/commands: use osdlevel=3 for osd_show_progression command
The osd_show_progression command ('P' key) created text similar to
what --osdlevel=3 shows, and set that as an OSD message. This message
was static and wasn't updated while visible, even if video position
changed (very noticeable during fast forward, when real OSD position
changes rapidly). Instead of setting a static message, create a new
message type that makes the OSD update code behave as if osd level was
set to 3 for the duration of the message.

The OSD progress bar isn't updated while the message is active.

Based on mplayer2 commit 458001463b2252fc by uau.
2012-08-28 23:18:33 +02:00
wm4 413c6f5b30 af_scaletempo: fix crash on channel reconfiguration
This crash happened when audio channels were reconfigured from 6
channels to 2, and playback speed was set to 2.

The crash is caused by passing a negative size to memcpy. It appears
reinitialization doesn't clear the buffer. As the result, the buffer
can be larger as the maximum buffer size, i.e. the invariant
bytes_queued <= bytes_queue is violated.

Fix this by resetting the buffer length on reconfiguring (set the
bytes_queued vairable to 0). Also reset some other state for clarity
and robustness, although these changes aren't strictly needed for
avoiding the actual crash.

This may also get rid of some noise played right after reinitialization,
as the re-used buffer was in the wrong audio format.
2012-08-26 22:17:27 +02:00
wm4 424822b537 DOCS: add big picture overview over the code
Apparently this was useful for some. Isn't as detailed as general.txt
and others, but broader and less outdated.
2012-08-26 02:17:11 +02:00
wm4 53978d9bda DOCS: remove outdated/useless files 2012-08-25 21:48:34 +02:00
wm4 bac3b08765 Merge remote-tracking branch 'cantabile/manpage_fixes' 2012-08-25 21:40:22 +02:00
wm4 3a0f40afb4 configure: disable optimization if --enable-debug is used
Enabling optimization _still_ causes annoyances when using a debugger,
and it increaes compilation times too.

Now --enable-debug basically replaces the -O2 flag with -g.
2012-08-25 20:04:32 +02:00
wm4 6c13b694fb configure: minor improvement to summary output
Remove printing VO modules that were removed earlier, but were enabled
by configure tests that are still needed.

Print "libavcodecs" with the "Codecs: " output.
2012-08-25 20:03:25 +02:00
wm4 89e7631483 configure: restore DVB support
The code defining CONFIG_DVB[IN] was accidentally removed some time ago.
2012-08-25 19:49:01 +02:00
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
cantabile 753e0956c5 manpage: update default jpeg quality for vo_image 2012-08-24 14:43:51 +03:00
cantabile 85f99bdc1e manpage: update default value of --softvol-max 2012-08-24 14:43:51 +03:00
cantabile e32e273b6b manpage: --screenshot-template: update %n, add %{prop}
Explanation of %{prop} taken from the commit message of commit
12c44610ad (screenshot: make screenshot
filenames configurable).
2012-08-24 14:43:51 +03:00
cantabile d6d2c5e9df manpage: update the list of available screenshot formats
Also update the default value of --screenshot-jpeg-quality
2012-08-24 14:43:50 +03:00
cantabile aa71f190b1 manpage: update example of the status line 2012-08-24 14:43:50 +03:00
cantabile e8ba990d06 manpage: fix ambiguous statement about --(no-)keepaspect 2012-08-24 14:43:50 +03:00
cantabile 6c1d75f4ee manpage: mention that videos' colormatrix and color range flags are honored 2012-08-24 14:43:50 +03:00
cantabile 7c8c2fa4b6 manpage: don't mention nonexistent VOs, command line switches, etc.
Very likely doesn't remove all outdated things.
2012-08-24 14:39:54 +03:00
cantabile 1cbda9c4ed manpage: fix various typos 2012-08-24 14:29:38 +03:00
Rudolf Polzer 2adc81f0a2 vf_dlopen: add a generic filter to load external filters
Usage: -vf dlopen=filename.so:args...

Examples of such filters are provided in TOOLS/vf_dlopen/
2012-08-23 13:13:53 +02:00
wm4 2e6450c7cc img_format, m_option: make image format name list globally available
And add functions for converting them from/to the name string.
2012-08-23 13:12:43 +02:00
wm4 b65424f5c2 osd_libass: fix displaying empty text, fix API usage
If empty text is rendered, the bounding box is empty. Instead of
continuing with a bogus bounding box that would result in garbage
being rendered on screen, make the OSD image invisible.

This happened when playing demuxer SRT subtitles (e.g. SRT embedded in
MKV) with -no-ass at the moment a subtitle line disappeared.

Unrelated to this issue, fix libass API usage. Delete the event with
libass_flush_events(), instead of trying to reuse the previous event.

Based on a patch by uau.
2012-08-21 18:58:15 +02:00
Uoti Urpala 009d9d8706 Adjust ffmpeg/libav #includes to work with recent upstream changes
The <libavutil/avutil.h> stopped including <libavutil/common.h>
recursively in recent ffmpeg/libav git revisions. As a result, some
files no longer got needed definitions, causing a build failure.
Modify #include lines in various files to fix build with the latest
versions of ffmpeg/libav headers.
2012-08-21 18:22:00 +02:00
cantabile a1380f3945 video: honor the video's colormatrix and color range flags
If either of them is not defined, the old behavior is used:
- the colormatrix is guessed based on resolution.
- the color range is assumed to be tv aka limited range.
2012-08-21 18:17:41 +02:00
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