Commit Graph

34268 Commits

Author SHA1 Message Date
wm4 7146a57cfe demux_gif: remove this demuxer in favor of libavformat
The gif support in libavformat/libavcodec as of ffmpeg commit 5603b2
can handle animated gif. The internal demuxer is not needed anymore.
2012-12-03 21:08:51 +01:00
wm4 dd3260185a demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.

libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.

Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)

libavdevice now can be invoked by specifying demuxer and args as in:

    mpv avdevice://demuxer:args

The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.

Note:

libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.

This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.

This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).

To enable libavdevice input, ffmpeg should be built with the options:

    --disable-filter=mp

and mpv with:

    --enable-libavdevice

Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-12-03 21:08:51 +01:00
wm4 aa2c07542f demux_lavf: do not prefix filename passed to libavformat with "mp:"
Opening files with the libavformat AVISynth demuxer ("avs"/avisynth.c)
fails, because the filename we pass to avformat_open_input() is prefixed
with "mp:". Normally, this doesn't matter, because data is read with the
stream interface. The AVISynth demuxer can't use this, because the
Avisynth API (apparently) can't read scripts from memory, and requires
a filename.

The "mp:" prefix used to be required when mplayer's stream layer was
made available as protocol to ffmpeg. This was replaced by setting
custom stream callbacks in de4908 (svn commit 25499), but the prefix
wasn't removed. Since this prefix doesn't have any purpose anymore and
prevents AVS playback from functioning, remove it. Fixes #5.
2012-12-03 21:08:51 +01:00
wm4 3b4682183c vo_xv: try harder to get correctly aligned pointers/strides
To get guaranteed alignment for the chroma planes with typical YV12
playback, we have to double the alignment on the image width, as the
chroma planes have half the image width.

Clear the image with black instead of green to hide scaling artifacts
on the right border of the screen.

(It might be possible to create the image layout ourselves by not
calling XvShmCreateImage(), and filling in our own image width and exact
strides, but that's probably too risky: the Xv client library sends an
X protocol request to query the real image dimension and strides. It is
unknown to me whether X servers or drivers would generally accept an
image with mismatching parameters, even if the image is conceptually
valid.)

Allocate the image with av_malloc() in the non-SHM case. I suspect the
non-SHM case doesn't matter much, though.
2012-12-03 21:08:51 +01:00
wm4 9ace4f1f49 configure: don't check for inttypes.h, it always exists
The presence of inttypes.h is guaranteed by POSIX. We don't need to
check for it. We don't need to provide a compatibility header either.

Apparently libc5 systems didn't provide inttypes.h. libc5 is ancient,
unmaintained, and not used by modern Linux systems.
2012-12-03 21:08:51 +01:00
wm4 08a7cdbfdd configure: remove unused libpng detection 2012-12-03 21:08:51 +01:00
wm4 358dc47314 ao_pcm: fix references to -novideo
The option is -no-video. Remove the deprecated "fast" suboption, which
did nothing and instructed the user to use "-novideo" instead.

Fix a reference to -novideo in encoding.rst.

Add a "generic" entry about -no-* to the list of renamed options. The
change is already explicitly mentioned in the text above the table, but
even if it's redundant, it makes it harder to overlook.
2012-12-03 21:08:48 +01:00
Rudolf Polzer 1085539bde af_lavcac3enc, encode: support planar formats
This fixes operation with current ffmpeg releases.

Note that this planarization is slow and should be reverted once proper
planar audio support is there in mpv.
2012-12-03 20:16:17 +01:00
Stefano Pigozzi 54d998d5e7 osx_common: Avoid deprecated Gestalt calls
Gestalt is deprecated since 10.8. Change the code to read the OS version from
a system plist file.

As mentioned http://stackoverflow.com/a/11072974/499456 Apple engineers are
suggesting this plist reading approach.
2012-12-02 10:42:46 +01:00
Rudolf Polzer 96fb9103b5 encoding-example-profiles: updates, iphone 5 support
Now the scaling for iPhones properly optimizes for the zoomed-in
(pan-scan) view.
2012-12-01 19:51:25 +01:00
Rudolf Polzer bb8e3dd0a2 encoding-example-profiles: fix aac bitrate
Now the enc-to-iphone profiles no longer specify the aac bitrate
explicitly (128k), but take over the default from enc-a-aac (96k).
2012-12-01 18:35:06 +01:00
Rudolf Polzer e22f85ade2 encoding-example-profiles: use 96kbps aac
Previously it used 128kbps libfaac by default, but now that we have
libfdk_aac, we can default to 96kbps at better quality than before.
2012-12-01 17:16:51 +01:00
Rudolf Polzer 5bb51de800 encode: print on log which muxers/codecs are in use
This is consistent with the demuxer/decoder info output mpv already has,
and is also generally useful to know, especially if using
--ao=codec1,codec2,... syntax.
2012-12-01 17:15:44 +01:00
Rudolf Polzer 402aee9f51 DOCS: Add manpage metadata to the rst files.
This fixes the manpage indent issues.
2012-11-29 17:26:02 +01:00
Rudolf Polzer b38f856426 DOCS: Fix some rst error messages
Unfortunately, these do not fix the man page indent issue.
2012-11-29 17:07:26 +01:00
Stefano Pigozzi fea9ea33b2 subassconverter: correctly handle RRGGBB and unknow formats
The following HEX formats are now parsed correctly: `#RRGGBB`, `RRGGBB`.

Moreover this implementation doesn't show the HTML on screen if the input
color is not recognized. A warning is still displayed in the terminal.
2012-11-25 23:47:57 +01:00
wm4 2b728da8c8 mplayer: fix track language display
This caused e.g. "--alang=" (without anything following) to be printed
in the terminal output when the file specified no language for the
track. Introduced by commit 9085b8.
2012-11-25 23:40:07 +01:00
wm4 5d5ddb2ad0 sub: add --sub-gray option to display image subs in grayscale
MPlayer/mplayer2 still show DVD subtitles in gray. Depending on who you
ask, this can be considered a bug or a feature. Include rendering in
gray as explicit feature, so the user can decide what is better.

This affects all indexed sub bitmaps entering the OSD rendering path.
Currently, this means all image subs are affected by this option, but
nothing else.
2012-11-25 23:40:07 +01:00
wm4 24bfa82a91 sub: reimplement -spugauss as --sub-gauss
Apparently the -spugauss option was popular. The code originally
implementing this is gone (scaler stuff in spudec.c). Reimplement it
using libswscale to scale and blur image subtitles if the --sub-gauss
option is set.

The code does some rather lazy padding to allow the blur to spread
pixels past the original image bounding box. (This problem exists with
normal bilinear scaling too, but is barely noticable.)

Technically, this doesn't just blur subtitles, but anything RGBA (or
indexed) that enters the OSD rendering path. But only image subtitles
produce these OSD formats currently, so no explicit check is done to
prevent blurring in other cases.
2012-11-25 23:40:07 +01:00
wm4 2bd7f980ac memcpy_pic: kill useless/dangerous optimization
The memcpy_pic() function had a rather dangerous optimization: when the
limit2width flag was not set, it was allowed to overwrite the data
between the last pixel of a line and the first pixel of the next line
(i.e. write over the stride padding). That was also the reason why there
are so many whacky names for this function (memcpy_pic, my_memcpy_pic,
memcpy_pic2).

Kill this optimization, and never overwrite the stride padding. The code
doing this can still be used if there's no stride padding at all,
though.

Also use the name memcpy_pic for the proper function. Now it should be
rather clear that my_memcpy_pic and memcpy_pic2 are compatibility
aliases. They should go away over the time.
2012-11-25 23:40:07 +01:00
wm4 99e178f1e8 ao_pulse: do not allow setting volume over 100%
PulseAudio allows applications to set volume over 100%. To make this
possible, the PulseAudio daemon raises the global system volume, and
tries to lower other applications volumes. Unfortunately, this doesn't
work out and doesn't manage to keep the effective volume level of these
other applications.

To make it short: this functionality invoked PulseAudio bugs. Disable
it.

This essentially reverts commit 85a64b.
2012-11-24 21:40:48 +01:00
wm4 4c21ad1f55 sws_utils: remove unused helper
sws_getContextFromCmdLine_hq() was used by the screenshot code, which
now uses mp_image_swscale().

Also move the mp_sws_set_colorspace() declaration from sws_utils.h to
vf_scale.c.
2012-11-24 21:27:34 +01:00
wm4 e6ed0b1d3c manpage: remove --zoom remains
The --zoom option has been removed, and is always active.
2012-11-24 21:18:50 +01:00
wm4 6a025b97af configure: use pkg-config for detecting OpenAL
Pick 1.13 as minimal required version. (Arbitrary, but reasonable.)
2012-11-23 15:37:37 +01:00
wm4 74f416fd2d vo_xv: allocate Xv images with aligned stride
This is required, as the Xv image is directly used for rendering OSD and
taking screenshots. These involve libswscale, which wants aligned
strides.

There doesn't seem to be an easy way to request aligned strides from Xv.
Simply request an image with an aligned width, which usually results in
an aligned stride. The padding border remains invisible.

One caveat is that if padding is added, there might be scaling artifacts
on the right pixel border of the screen. This is at least the case with
nvidia binary drivers. Since we consider vo_xv a sensible choice only on
crappy/slow hardware, performance is more important than quality.
2012-11-22 19:54:06 +01:00
wm4 1d3179a5f1 mp_image: make alloc_mpi() always allocate with aligned stride
By "design", mplayer normally allocates aligned images only inside the
filter chain, via the vf_get_image() function. This function pads the
width of the requested image if a stride is allowed, sets that new width
before calling mp_image_alloc_planes().

However, newer code wants aligned images as well (basically to satisfy
libswscale). This affects all uses of alloc_mpi(). To get aligned
strides, simply change alloc_mpi() to request an aligned width.

Remove the old hack in mp_image_alloc_planes(), which special cases some
image formats to be allocated with aligned strides.

This is a temporary hack until mp_image_alloc_planes() is revised.
2012-11-22 19:22:38 +01:00
wm4 11783b5ede osd: fix z-order of subtitle OSD elements
Subs should always be below OSD (meaning they have to be drawn first).
2012-11-22 15:27:02 +01:00
wm4 86ad77d0db draw_bmp: add RGB rendering to fix image quality issues
As pointed out in commit ed01df, the quality loss due to frequent
conversion between RGB and YUV is too much when drawing OSD and
subtitles.

Fix this by staying in the same colorspace when drawing subtitles.
Render directly to RGB, without converting to YUV first.

The bad thing about packed RGB is that there are many pixel formats,
which would all require special code for blending. It's also completely
incompatible to planar YUV. Use planar RGB instead, which allows us to
reuse all code originally written for planar YUV. The only thing that
needs to be changed is the color conversion in the libass case. (In
exchange for simpler code, the image has to be copied, but this is
still much better than converting to YUV.)

Unfortunately, libswscale doesn't support planar RGB output. Add a hack
to sws_utils.c to handle conversion to planar RGB. In the common case,
when converting 32 bit per pixel RGB, calling swscale can be avoided
entirely.

The change in mp_image.c is needed to allocate GBRP images correctly.

(The issue with vo_x11 could be easily solved by always backing up the
same bounding box as the bitmap drawing RGB<->YUV conversion does, but
this commit is probably the better fix.)
2012-11-22 15:26:38 +01:00
Stefano Pigozzi 6c1e21e223 stream_ftp: fix compilation with libav
Fixup commit for a04b35013a. That commit was
cherry-picked from mplayer(1) and thus assumes ffmpeg.
2012-11-22 00:05:53 +01:00
al a04b35013a stream_ftp: support longer filenames
This change was split into 8 patches. Squash them together, as they
affect stream_ftp.c only.

stream ftp: readline: Fix off-by-one error

Even if max bytes are available read at most max - 1 bytes.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35427 b3059339-0415-0410-9bf9-f77b7e298cf2

Conflicts:
	stream/stream_ftp.c

stream ftp: readline: Always initialize output parameter buf

Only exception if passed parameter max is less than or equal
to zero. That cannot happen with the current code.

Additionally change readresp function to always copy the first
response line if the parameter rsp is non-NULL. This fixes some
error reporting that used uninitialized stack arrays.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35428 b3059339-0415-0410-9bf9-f77b7e298cf2

stream ftp: readline: Always try to read complete lines

If there is not enough space in the provided line buffer just
skip the remaining bytes until reaching EOL.

Usually we are only interested in the first 5 characters and
for everything else the (on-stack) response buffer should still
be big enough.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35429 b3059339-0415-0410-9bf9-f77b7e298cf2

stream ftp: Revise file descriptor usage

* Set unbound descriptor variables to -1
* Always test >= 0 to see if a variable refers to a valid descriptor

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35430 b3059339-0415-0410-9bf9-f77b7e298cf2

stream ftp: Only send QUIT command if connected

Do not attempt to send commands without control connections.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35431 b3059339-0415-0410-9bf9-f77b7e298cf2

stream ftp: Create buffers before opening control connection

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35432 b3059339-0415-0410-9bf9-f77b7e298cf2

stream ftp: Allocate command buffer on-heap

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35433 b3059339-0415-0410-9bf9-f77b7e298cf2

stream ftp: Increase command buffer size

Allow for more longish file names (be it because of length or more
lengthy characters).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35434 b3059339-0415-0410-9bf9-f77b7e298cf2
2012-11-21 20:03:58 +01:00
cigaes 73618d11d4 subreader: do not skip the first char of ASS fields.
Without this change, fields that can be sometimes empty and
sometimes not, such as the Effect field, are counted in an
inconsistent way. Since the number of fields is used to find
where the text starts, it leads to internal field arriving
on the video.

Bug reported anonymously on the users mailing list.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35426 b3059339-0415-0410-9bf9-f77b7e298cf2
2012-11-21 20:00:52 +01:00
wm4 10a1ae7b72 screenshot: add subs even with vf_screenshot
Until now, screenshots with the video filter didn't add subs (unclear
whether that was an oversight or feature). Fix this and make behavior
when taking screenshots with vf_screenshot more consistent with VO
screenshots.

The change in vf_screenshot is needed, because add_subs() checks this
flag to decide whether it's allowed to mutate the image.

This commit has another user visible side effect. When taking a
screenshot each frame (using the "each-frame" mode of the screenshot
command), a normal screenshot command will stop the each-frame mode.
2012-11-21 19:58:51 +01:00
wm4 4b91861b67 video: fix bogus uses of mp_image.w/width
mp_image has this confusing distinction between the w/h and width/height
fields. w/h are the actual width and height, while width/height have a
very special meaning inside the video filter code: it's the actually
allocated width, which is also used for stride padding.

Screenshot related code abused the w/h fields to store the aspect
corrected size. Some code confused the role of w/h and width/height.

Fix these issues. For aspect corrected size, display_w/h are used, while
width/height should never be used outside vf.c internals and related
code.

This also fixes an actual bug when taking screenshots of anamorphic
video with vf_screenshot, as well as using vo_image with such videos.
2012-11-21 19:58:51 +01:00
wm4 ed01dfeff3 vo_x11: don't require framestepping to update OSD
The OSD couldn't be updated at all without frame stepping. This made the
VO unusable (In fact, vo_x11 should never be used, but it's provided as
fail-safe fallback). Implement VOCTRL_REDRAW_FRAME to deal with this.

Unfortunately, this exposes issues with draw_bmp's subtitle rendering:
areas that are not covered by subtitles at all are changed as well. The
"backup" mechanism provided by draw_bmp doesn't copy these areas, which
turns up as quite visible artifacts. (These are included when taking
screenshots too.)
2012-11-21 19:58:16 +01:00
wm4 4757f9d0ce vo_x11: add screenshot support
Although vo_x11 shouldn't be used, it's a good thing to have screenshot
support in absolutely all interactive VOs. (Except vo_caca, but that is
literally a joke.)
2012-11-21 19:56:59 +01:00
wm4 ea4332daf4 vo_xv: don't require frame stepping to remove OSD or subs
In order to improve performance, vo_xv didn't create a backup of the
video frame before drawing OSD and subtitles during normal playback. It
required the frontend to do frame stepping if it wanted to redraw the
OSD, but no backup of the video frame was available. (Consider the
following use case: enable the OSD permanently with --osd-level=3, then
pause during playback and do something that shows an OSD message. The
player will advance the video by one frame at the time the new OSD
message is first drawn.)

This also meant that taking a screenshot during playback with vo_xv
would include OSD and subtitles in the resulting image.

Fix this by always creating a backup before drawing OSD or subtitles.
In order to avoid having to create a full copy of the whole image frame,
introduce a complex scheme that tries to backup only the changed
regions.

It's unclear whether the additional complexity in draw_bmp.c for
backing up only the changed areas of the frame is worth it. Possibly
a simpler implementation would suffice, such as tracking only Y ranges
of changed image data, or even just copying the full frame.

vo_xv's get_screenshot() now always creates a copy in order not to
modify the currently displayed frame.
2012-11-21 19:56:59 +01:00
Stefano Pigozzi 264b5124e7 cfg-config: avoid warning with -Wincompatible-pointer-types
This was throwing off a warning with clang. Add a cast to (void *) like many
other options do.
2012-11-21 14:10:33 +01:00
Stefano Pigozzi 9125ba0a4f cocoa_common: create window in the correct screen 2012-11-21 13:42:55 +01:00
wm4 670a4a85a9 gl_common: improve Mesa compatibility for GL3 context creation
Don't request CONTEXT_FORWARD_COMPATIBLE when creating a GL3 context on
X11. This improves compatibility with some Mesa drivers.

Setting this bit was originally intended to make the code compatible
to newer (future, possibly not yet existing) OpenGL implementations.
These implementations wouldn't have to support deprecated legacy GL
features, which we know that we don't use, and could return a context
with a higher OpenGL version than requested.

In practice, this didn't work out. CONTEXT_FORWARD_COMPATIBLE requires
the driver to explicitly disable deprecated functionality. If it doesn't
do that, it has to reject context creation with that flag set. And it
turns out there are Mesa drivers which suffer from this caveat. See [1].

This probably also means that a GL application with a fixed set of
required GL features (such as a subset of GL 3.2 core, like vo_opengl.c)
may need to probe several GL versions if drivers really start dropping
legacy GL.

On Windows, CONTEXT_FORWARD_COMPATIBLE is still set. It is not known
if this is ideal, but fortunately there is no Mesa on Windows.

CONTEXT_CORE_PROFILE is still always set. For requested GL versions
lower than 3.2, this flag is ignored. Should we requires higher versions
later, we want it to be set, so don't remove it.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=57241
2012-11-20 18:00:16 +01:00
wm4 ef75d0ff26 core: minor cleanups
Enable printf format warnings for set_osd_[t]msg.
Remove the pointless assertion in mplayer.c (the assertion proved that
the following NULL check is probably pointless, but leave that check
anyway for robustness - it's not really clear whether it's needed).
2012-11-20 18:00:16 +01:00
wm4 2cdbaaf31c osd: fix OSD status symbol display in some cases
The playback status symbol in the OSD status display on video (such as
displayed when seeking or with the show_progress input command)
sometimes kept displaying the last seek, without resetting the symbol.
(For example: disable the OSD, seek, enable the OSD, run show_progress;
but also other cases.)

The main reason for that was the code clearing the OSD bar is also
responsible for clearing the osd_function (which stores the playback
symbol). If no OSD bar was set, the osd_function was never reset.

Fix by always setting the timer for clearing the OSD bar and the
osd_function whenever the osd_function is set. Clearing the OSD bar
when it wasn't set is OK. If the OSD bar is set some time after
osd_function is set, the timer is overwritten - that's a good thing,
as it makes both disappear from the screen at exactly the same time.

Always reset osd_function to 0 and determine the playback status
explicitly from mpctx->paused when displaying the status on screen.
2012-11-20 18:00:16 +01:00
wm4 0e63702ef8 command: use yes/no instead of enabled/disabled for consistency
The idea is that the OSD uses the same names as the options, if
possible.
2012-11-20 18:00:16 +01:00
wm4 62e78fab79 configure: make --enable-debug default
This may result in larger binaries by default, and should be harmless
otherwise. Users are advised to use "make install-strip" if they want
binaries without debug symbols.
2012-11-20 18:00:16 +01:00
wm4 fe97ab6059 configure: add --disable-optimization, change --enable-debug semantics
--disable-optimization removes -O2 from CFLAGS.

Now --enable-debug only adds -g to CFLAGS, and doesn't disable
optimization anymore.

As an obscure feature, --enable-optimization=<n> adds -O<n> to CFLAGS.

Also remove stray $def_debug from configure.
2012-11-20 18:00:16 +01:00
wm4 77a77d8869 mplayer: disable auto-loading of external codecs.conf
Do not load codecs.conf files located in $PREFIX/etc/mpv/ or ~/.mpv/.
There really is no use for this, other than possibly breaking things.
It's still possible to use --codecs-file explicitly to load an external
config file, and this option can be used in ~/.mpv/config.

While we're at it, remove the global codecs_file variable, and another
unused variable.
2012-11-20 18:00:15 +01:00
wm4 3d41fb8e48 manpage: minor fixes
The typo in options.rst was introduced in a54088.

--hardframedrop mentioned in mpv.rst has been merged with --framedrop.
2012-11-20 18:00:15 +01:00
wm4 967e1e8290 m_option: print valid integer range for choices on parsing errors
Only some choices have an additional integer range. For those which
do, printing the choices only would be confusing.

E.g. --cursor-autohide accepts the choices "always", "no", or an
integer value. The help text printed on option parse errors should
print the accepted integer range additional to "always" and "no".
2012-11-20 18:00:15 +01:00
wm4 80270218cb osd: make the OSD and sub font more customizable
Make more aspects of the OSD font customizable. This also affects the
font used for unstyled subtitles (such as SRT), or when using the
--no-ass option. This adds back some customizability that was lost with
commit 74e7a1 (osd: use libass for OSD rendering).

Removed options:
--ass-border-color
--ass-color
--font
--subfont
--subfont-text-scale

Added options:
--osd-color
--osd-border
--osd-back-color
--osd-shadow-color
--osd-font
--osd-font-size
--osd-border-size
--osd-margin-x
--osd-margin-y
--osd-shadow-offset
--osd-spacing
--sub-scale

The font size is now specified in pixels as it would be rendered on a
window with a height of 720 pixels. OSD and subtitles are always scaled
with the window height, so specifying or expecting an absolute font
size doesn't make sense.

Such scaled pixel units are used to specify font border etc. as well.

(Note: the font size is directly passed to libass. How the fonts are
actually rasterized is outside of our control, but in theory ASS font
sizes map to "script" pixels and then are scaled to screen size.)

The default settings should be about the same, with slight difference
due to rounding to the new scales.

The OSD and subtitle fonts are not separately configurable. It has
limited use and would double the number of newly added options, which
would be more confusing than helpful. It could be easily added later,
should the need arise.

Other small details that change:
- ASS_Style.Encoding is not set to -1 for subs anymore
  (assuming subs use VSFilter direction in -no-ass mode too)
- use a different WrapStyle for OSD
- ASS forced styles are not applied to OSD
2012-11-20 18:00:15 +01:00
wm4 d23b620a89 m_option: add color option type
This accepts HTML-style hex colors in the form #RRGGBB. It's also
possible to provide an alpha component with #AARRGGBB. Each 2-digit
group is a hex number, which gives the color value from 0-255 (e.g.

There is existing code in subassconvert.c, which parses HTML-style
color values in SRT subs. This is not used: it's probably better if
option parsing is completely separate from code specific to certain
subtitle formats, even if a little code is duplicated.
2012-11-20 18:00:15 +01:00
wm4 dcd2435e79 vf_softpulldown: fix possible regression
The lines added with this commit were accidentally removed in commit
a0d759, which was a pure cleanup commit merged from mplayer-svn. The
difference between mplayer-svn and the mplayer2 base is that this
filter has been made PTS aware in mplayer2.

Also remove the redundant initialization of vf->priv->state.
2012-11-20 18:00:15 +01:00