The mplayer DVD sub decoder is the only remaining OSD image producer
that still requires the old mplayer OSD format (SUBBITMAP_OLD_PLANAR).
To make supporting this format optional in VOs, add a step that allows
converting these images to RGBA in case the VO doesn't have direct
support for it.
Note: the mplayer DVD sub decoder uses the old mplayer OSD format
(SUBBITMAP_OLD_PLANAR), which is assumed to use premultiplied alpha.
However, it seems DVDs allow only binary transparency, so the rendered
result will be the same.
Before this commit, the OSD was drawn using libass, but the resulting
bitmaps were converted to the internal mplayer OSD format. We want to
get rid of the old OSD format, because it's monochrome, and can't even
be rendered directly using modern video output methods (like with
OpenGL/Direct3D/VDPAU).
Change it so that VOs can get the ASS images directly, without
additional conversions. (This also has the consequence that the OSD can
render colors now.) Currently, this is vo_gl3 only. The other VOs still
use the old method. Also, the old OSD format is still used for all VOs
with DVD subtitles (spudec).
Rewrite sub.c. Remove all the awkward flags and bounding boxes and
change detection things. It turns out that much of that isn't needed.
Move code related to converting subtitle images to img_convert.c. (It
has to be noted that all of these conversions were already done before
in some places, and that the new code actually makes less use of them.)
This basically pushes the old OSD bitmaps via VOCTRL_DRAW_EOSD to the
VO, instead of using the old callback-based interface.
Future commits will change the code such that sub.c pushes images
rendered by libass directly, rather than converting them to the old
OSD format first.
One sub_bitmaps struct could contain either a libass ASS_Image list, or
a mplayer native list of sub-bitmaps. This caused code duplication in
vo_vdpau.c and bitmap_packer.c.
Avoid this by creating such a sub_bitmap array even with libass. This
basically copies the list and recreates it in mplayer's native format.
It gets rid of the code duplication, and will make implementing extended
subtitle and OSD rendering in other VOs easier.
Also do some cosmetic changes and other preparations for the following
commits.
This greatly simplifies the code and makes alt tab behave like it is supposed
to: it doesn't put the mplayer window behind the other ones when losing focus.
If you have other programs that are displaying themselves above the normal
window level, avoid them or use --ontop.
This allows to remove the call to the deprecated `UpdateSystemActivity`. The
additional benefit is power management is disabled only if the video is really
playing. A paused video will not stop the system from idling.
Video Decode Acceleration Framework is a framework by Apple to provide
GPU assisted H.264 decoding. It is available on Mac OS X v10.6.3 and
later with Mac models equipped with the NVIDIA GeForce 9400M, GeForce 320M,
GeForce GT 330M, ATI HD Radeon GFX, Intel HD Graphics and others.
This commit uses the new video decoder added in FFmpeg based upon this
framework.
Add a make task and python script to create a Mac OS X Application Bundle
to be used when compiling with the --enable-macosx-finder and
--enable-macosx-bundle configure flags.
The main svg icon was created by me and heavily inspired by Apple's iTunes
and AppStore icon designs. We are still looking for something better.
For the audio, movie and subtitles icons I added the main logo to MPlayer OSX
Extended icons.
Use with `make osxbundle` after running configure and make.
Reduces code needed for implementing string and int64_t read-only
properties.
Originally, there actually was a m_property_string_ro(), but it was
removed, as that would have implicitly strdup'ed the string. But the
new name m_property_strdup_ro() should make it quite clear what is
happening.
In input test mode, key bindings won't be executed, but are shown on the
OSD. The OSD includes various information, such as the name of the key,
the command itself, whether it's builtin, and the config file location
it was defined.
The input test mode can be enabled with "--input=test". No effort is
spent trying to react to key bindings that normally exit the player;
they are treated just like any other binding.
If parsing a command fails, its location is printed. The location is
the path to the input.conf, and the line number of the key binding and
the associated input command.
Apparently libass can't be made to not interpret "\n" as escape. That
means "\n" can't be printed literally. Use the same hack that was added
to mplayer2 when that project merged osd_libass.c: add an invisible
zero-width joiner character between "\" and "n". It seems U+FEFF is
deprecated, because it has been redefined as BOM mark. Use U+2060, which
seems to be the replacement.
open_stream() and open_output_stream() checked for filename==NULL, and
if true, printed an error message asking to report this as bug.
Internal logic errors should just crash. Use assert() instead.
Clean up handling of libquvi (which resolves URLs of streaming sites
into URLs to the actual media playable by mpv). Move the code out of
open.c to quvi.c, and invoke it explicitly from mplayer.c, instead of
trying to resolve every filename passed to open_stream().
This allows easily passing metadata from the quvi context to the
frontend. Expose QUVIPROP_PAGETITLE as "media-title" property, and use
that instead of "filename" for the mplayer window title. (For YouTube,
this is the video title.) It's cleaner too.
Handle a potential reliability issue: check quvi_getprop return values.
Since open.c contains barely anything but the open_stream() stub, move
that to stream.c and delete open.c.
Always recognize input commands for optional features (like TV commands
etc.). If these features are disabled, the commands are parsed, but
simply do nothing.
This fixes annoying warnings on start with the default/builtin
input.conf, if certain optional features are not compiled.
The second scaling filter (cscale) was never reset correctly due to a
fatal oversight. In particular, this could lead to OpenGL errors, if
the new filter needs a 2D texture, but the old texture was 1D (because
init_scaler reuses the texture).
FFmpeg and Libav are starting to return a growing number of planar samples
when decoding formats that save data like that.
In this first implementation planar formats are immediately converted to
packed formats. Fututre developments should move to use libavresample.
Original work by Nicolas George on mplayer(1).
Change fmt-conversion.h to include <libavutil/pixfmt.h> instead of
<libavutil/avutil.h> which no longer indirectly includes the former.
This fixes compilation with latest Libav. Also remove superfluous
config.h #include.
The pixfmt.h #include is needed for 'enum PixelFormat'. avutil.h
already stopped including pixfmt.h more than a year ago, but that did
not cause visible breakage at the time. AFAIK the C standard does not
allow incomplete enum types, but it seems that GCC and other relevant
compilers accept function declarations using not-yet-defined enum
types without warnings. However, Libav now renamed 'enum PixelFormat'
to 'enum AVPixelFormat', adding a '#define PixelFormat AVPixelFormat'
for backwards compatibility. We need this compatibility define because
we're still using the PixelFormat name, but it of course does not work
if pixfmt.h is not included; thus the missing include now caused a
compilation failure.
This changes the name of this project to mpv. Most user-visible mentions
of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the
default config file location are changed as well.
The new default config file location is: ~/.mpv/
Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI,
which has been removed from mplayer2 ages ago.
We don't have a logo, and the MS Windows resource files sort-of require
one, so leave etc/mplayer.ico/.xpm as-is.
Remove the debian and rpm packaging scripts. These contained outdated
dependencies and likely were more harmful than useful. (Patches which
add working and well-tested packaging are welcome.)
Allow the values "up" and "down" as step argument for the cycle input
command. Previously, this argument was a float, which specified an
arbitrary step value and direction (similar to the add command).
Instead of "1" and "-1", "up" and "down" is to be used.
Float values are still accepted. That capability might be removed in the
future, as there's probably hardly any actual use for arbitrary step
values.
There are a number of options which modify ASS subtitle rendering. Most
of these do things that can interfere with the styling done by subtitle
scripts, resulting in incorrect rendering. Add the --ass-style-override
option to make it easy to disable all overrides. This helps trouble-
shooting, and makes it more practical to use the override features. (You
can simply toggle the ass-style-override property at runtime, should
one of the style override options break subtitle rendering at a certain
point.)
This mainly affects whether most --ass-* options are applied, as well
as --sub-pos. Some things, like explicit style overrides loaded with
--ass-force-style, can't be changed at runtime using the
ass-style-override property.
The --sub-pos option and sub-pos property control the vertical position
of a subtitle.
Also change how sub-pos is handled in the old subtitle renderer (used
with -no-ass). The new behavior doesn't render subtitles out of the
screen if the subtitle is located near the top screen border and has
too many lines.
Replaces the status line with a custom string.
This is probably useful for hacking old slave mode applications into
working again. Even if not, this might be generally useful.
And it never was. This property is write-only and exists only for
setting the program. Making it readable is possible, but would require
demuxer changes.
This disables warning messages when the legacy input command bridge is
used. For now, user input.confs should just keep working as if nothing
has changed. The deprecation warnings will be enabled again at a later
point, and the legacy bridge will be eventually removed.
The user-visible track IDs are normalized and don't match with whatever
the demuxer uses.
Completely untested. It might actually work with both demux_lavf and
demux_ts.
The property-to-option bridge (when properties change values normally
set by the command line parser) uses M_PROPERTY_GET_TYPE to get the
exact option type. In these cases, the entry in mp_properties[] is
unused, except for the name field and the property callback. Instead,
mp_property_generic_option() implements M_PROPERTY_GET_TYPE and returns
the m_option as defined in cfg-mplayer.h. However, if a property is
unavailable, mp_property_generic_option() is never actually called, and
M_PROPERTY_GET_TYPE will return the dummy option entry.
We could make sure that the dummy option entry equals the option entry
defined in cfg-mplayer.h. But this would duplicate all information.
Add a dummy option type m_option_type_dummy, which is used by entries
using the property-to-option bridge. Make M_PROPERTY_GET_TYPE fail if
this type is encountered.
This dummy should never be used, as it isn
The OSD bar is very annoying when seeking. Especially when the seeks
are very small, the OSD doesn't show any interesting information. The
exact seeking commands are a use case where the user definitely never
wants to see a seek bar.
The "no-osd" prefix was introduced earlier to disable OSD selectively
based on the key binding. Extend this, and allow the user to force
display of an OSD bar ("osd-bar"), OSD message ("osd-msg") or both
("osd-msg-bar"). This changes mainly how property setting functions
behave.
The default behavior is still the same.
Allow using the choice type (as it used for command line) for arguments
of input commands. Change the magic integer arguments of some commands
(like seek) to use choices instead. The old numeric values are still
allowed (but only those which made sense before, not arbitrary
integers).
In order to do this, remove the input.c specific types (like
MP_CMD_ARG_INT) completely and specify commands using the m_option
types.
Also, add the special choice "-" to some arguments. It's supposed to
signify the default value, so arguments can be easily skipped. Maybe the
choice option should recognize this and not change the previous value,
but we'll leave this for later.
For now, leave compatibility integer values for all new choice
arguments, e.g. "0" maps to 0. We could let the choice option type do
this automatically, but we don't, because we want user input values and
internal mplayer values decoupled in general. The compatibility options
will be removed one day, too.
Also, remove optional args for strings - would require either annoying
additional code, or copying strings twice. It's not used, so remove it.