Commit Graph

34364 Commits

Author SHA1 Message Date
wm4 93d1bff4d3 configure: cleanup: remove unused --datadir switch
Unused. mplayer-svn used it as fallback directory to locate the OSD
font, and for the GUI.
2013-01-13 13:38:32 +01:00
wm4 418f68d6ca configure: cleanup: remove unused xshape switches
They didn't do anything since the internal GUI was removed years ago.
2013-01-13 13:35:33 +01:00
Uoti Urpala 82d72ef39f mixer: keep fractional part of volume setting
mixer_setvolume() accepts float values for volume, but used the
integer function av_clip() to limit range, losing the fractional part
as a side effect. Change the code to use av_clipf() instead. For most
uses this shouldn't make any real difference; actual AO volume
settings may not have that much precision anyway.
2013-01-13 13:26:21 +01:00
Uoti Urpala 3f7526d641 af_volnorm: fix output range with float input
af_volnorm can process either int16_t or float audio data. The float
version used 0 to INT_MAX as full value range, when it should be 0 to
1. This effectively disabled the filter (due to all input being
considered to fall in the silence range). Fix.

Reported by Tobias Jacobi <liquid.acid@gmx.net>.
2013-01-13 13:26:07 +01:00
Uoti Urpala e0d9ec60ad demux_mkv: work around bad OutputSamplingFrequency values
Something produces corrupt Matroska files with audio tracks that have
SamplingFrequency set to 44100 and OutputSamplingFrequency to 96000,
when the correct playback rate is 44100. Add a special case for this
44100/96000 combination and override it to 44100/44100; it's unlikely
that anyone would ever want to use this 44100/96000 combination for
real in valid files.
2013-01-13 13:25:57 +01:00
Uoti Urpala c1232c9a01 core: timeline: prevent inaccurate seeks outside timeline
Ensure that even if a seek is inaccurate it will not show video from
outside the defined timeline. Previously, seeking to the beginning of
a segment could show frames from before the start of the segment if
the seek was done in inaccurate mode and the demuxer seeked to an
earlier position. Now hr-seek machinery is used to skip at least the
frames that should not be part of playback timeline at all.
2013-01-13 13:25:50 +01:00
Rudolf Polzer 3996e8882d vo_sdl: fix for rename of a function in SDL2's interface 2013-01-12 21:15:53 +01:00
wm4 46f8429794 sub: do not apply timeline offset to external subtitles
Now external subtitles essentially use the playback time, instead of
the segment time.

This is more useful when using external subtitles with mkv ordered
chapters. The previous behavior is not necessarily incorrect, and e.g.
makes it easier to use subtitles directly extracted from ordered
chapters segments. But we consider the new behavior more useful.

Also see commit 06e3dc8.
2013-01-12 00:52:27 +01:00
Rudolf Polzer 944be9d24b Fix lots of bugs in mp_http URL handling
Many instances of "http" were not changed to "mp_http", which made many
aspects of the mp_http protocol handler broken.
2013-01-10 14:11:26 +01:00
Rudolf Polzer 7c40d8a36e demux_lavf: avio_flush in DEMUXER_CTRL_RESYNC
This rules out possible avio buffering issues.
2013-01-10 12:36:13 +01:00
Rudolf Polzer 6c79888f7d vo_sdl: add a "sw" flag like in opengl
Also, rework the renderer creation for the flag being generally
effective even if the "SW renderer" is detected only after creating a
context.
2013-01-10 12:34:40 +01:00
Rudolf Polzer 015548401c encoding-example-profiles: restructure iPhone profiles
The names are left as is, but they are hierarchic internally now.
2013-01-10 11:56:04 +01:00
wm4 f96dd88b41 mplayer: make --loop loop the playlist instead of each playlist entry
This is simpler and more useful. We could add a new switch for the old
functionality, but that would probably be more confusing than helpful.
When passing only a single file to the command line, this commit
shouldn't change behavior.

(Classic mplayer provided both features by duplicating the loop
functionality in the "playtree".)
2013-01-09 01:48:40 +01:00
wm4 c45132cb92 mplayer: keep pause state when frame stepping in last frame
When the last frame is displayed, and a frame step command is issued,
playback ands and advances to the next file. But before this commit,
the next file was played unpause. Fix this, and make sure pause is
kept.
2013-01-09 01:16:15 +01:00
wm4 53a4486fb6 DOCS: add some basic MinGW cross compilation instructions 2013-01-08 17:21:04 +01:00
kax4 13bc19d880 osxbundle: fix unicode support in fonts.conf
Looks like unicode support was broken with this simple `fonts.conf`. Copy more
(all) of fontconfig's default `fonts.conf`.

Fixes #13

Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
2013-01-07 21:09:11 +01:00
Stefano Pigozzi 3d4763498a README: add a new one using ReST
Hopefully this is a little more useful for people opening the GitHub project
page and can serve the role of a poor man's project website.
2013-01-07 21:09:11 +01:00
Rudolf Polzer 5a412bfa09 demux_lavf: implement DEMUXER_CTRL_RESYNC
This makes -chapter work with stream_dvd by telling ffmpeg to flush its
internal buffers after a stream_dvd seek.
2013-01-07 17:39:55 +01:00
wm4 413b2e3b0f vo_xv: fix compilation when shared memory header files are not available
This is an extremely obscure situation, but can actually happen
on OpenBSD.
2013-01-06 21:44:15 +01:00
wm4 9b3bf76d27 ao_alsa: do not call snd_pcm_delay() when paused
This causes trouble when a hw device is used:

    pcm_hw.c:514:(snd_pcm_hw_delay) SNDRV_PCM_IOCTL_DELAY failed (-77): File descriptor in bad state

when running mpv test.mkv --ao=alsa:device=iec958,alsa and pausing
during playback.

Historically, mplayer usually did not call snd_pcm_delay() (which is
called by get_delay()) while paused, so this problem never showed up.
But at least mpv has changes that cause get_delay() to be called when
updating the status line (see commit 3f949cf).

It's possible that calling snd_pcm_delay() is not always legal when the
audio is paused, and at least fails with the error message mentioned
above is the device is a hardware device. Change get_delay() to return
the last delay before the audio was paused. The intention is to get a
continuous playback status display, even when pausing or frame stepping,
otherwise we could just return the audio buffer fill status in
get_delay() or even just 0 when paused.
2013-01-06 19:28:08 +01:00
wm4 67ee79283b cleanup: ass_mp.h: remove dummy declarations 2013-01-06 16:22:50 +01:00
wm4 5b56864ff0 sub: use correct fallback font for subtitles
Accidentally still used the OSD font.
2013-01-06 16:06:34 +01:00
wm4 fe8d3e70b2 ao_sdl: fix compilation with Libav
On Libav, <libavutil/fifo.h> doesn't recursively include common.h, but
the code in ao_sdl.c uses some macros defined by this header.
2013-01-06 16:04:17 +01:00
wm4 55b2f0847f manpage: document the dangers of some subtitle options
Setting some subtitle options may lead to incorrect rendering of complex
ASS subtitle scripts, such as displaced signs or visual artifacts. The
user should be made aware that this can happen.

In theory, libass could make using some of these options relatively
safe, but it doesn't.

Note that there are potentially much more options that could in theory
break subtitle rendering, but add a warning only to the most fragile
ones.
2013-01-05 14:21:04 +01:00
wm4 ca9c81b0d3 sub: add --sub-text-* options to unstyled text subtitles font
Before this commit, the --osd-* options (like --osd-font-size etc.)
configured both the OSD and subtitle font. Make them separate, and add
--sub-text-* options (like --sub-text-size etc.). Now --osd-* affects
the OSD font only, and --sub-text-* unstyled text subtitles only.
2013-01-05 14:11:56 +01:00
wm4 e65778ca6c manpage: sort --osd-* options
They were more or less grouped by usefulness, but since everything
else in the manpage is sorted alphabetically, it's better to be
consistent and sort these options as well.
2013-01-04 16:04:08 +01:00
wm4 f394a25e7b Update copyright year 2013-01-04 15:23:23 +01:00
Stefano Pigozzi 59868da7a1 cocoa_common: add support for `--no-border`
Draw a window with style NSBorderlessWindow when the user uses `--no-border`.
2012-12-31 14:20:49 +01:00
Rudolf Polzer 56e18d99aa vo_sdl: support -geometry properly
Now the x and y origin options (-geometry WxH+X+Y) are supported too.
2012-12-31 08:44:53 +01:00
Rudolf Polzer a313af3d02 vo_sdl: some OSD optimizations
The premultiplied-alpha hack is changed:

- The first stage now uses a colormod of black with an unmodified
  texture. This saves on applying the AND mask of 0xFF000000 to keep
  alpha only.

- The second stage no longer uses an AND mask, but only an OR mask of
  0xFF000000 to cancel out alpha.

- The texture uploads are no longer done using SDL_LockTexture,
  SDL_ConvertPixels, SDL_UnlockTexture when the mpv pixel format matches
  the OSD's pixel format. Instead, SDL_UploadTexture is used, which
  saves a copy when using the "opengl" renderer.
2012-12-28 14:27:12 +01:00
wm4 0db55cd86a stream_lavf: warn if protocol not found
If ffmpeg returns AVERROR_PROTOCOL_NOT_FOUND, print a warning that
ffmpeg should be compiled with network support. Note that stream_lavf.c
itself includes a whitelist of directly supported ffmpeg protocols, so
it can't happen that a completely unknown/madeup protocol triggers
this message. (Unless the ffmpeg:// or lavf:// prefixes are used.)
2012-12-28 14:23:29 +01:00
wm4 973f34bb56 vf_scale: prefer 420P10 -> YV12 instead of 444P
Strictly speaking, 444P is higher quality than YV12, but doing this is
not very useful when playing 10 bit video with -vo opengl-old on a GPU
that doesn't support 16 bit textures.
2012-12-28 14:23:29 +01:00
wm4 d78bde15ab vo_opengl_old: reject 9-15 bit formats if textures have less than 16 bit
For 9-15 bit material, cutting off the lower bits leads to significant
quality reduction, because these formats leave the most significant bits
unused (e.g. 10 bit padded to 16 bit, transferred as 8 bit -> only
2 bits left). 16 bit formats still can be played like this, as cutting
the lower bits merely reduces quality in this case.

This problem was encountered with the following GPU/driver combination:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 915GM x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 9.0.1

It appears 16 bit support is rather common on GPUs, so testing the
actual texture depth wasn't needed until now. (There are some other Mesa
GPU/driver combinations which support 16 bit only when using RG textures
instead of LUMINANCE_ALPHA. This is due to OpenGL driver bugs.)
2012-12-28 14:23:29 +01:00
wm4 1e56e68701 gl_common: properly reject old OpenGL versions
The extension checking logic was broken, which reported OpenGL 3 if the
OpenGL .so exported OpenGL 3-only symbols, even if the reported OpenGL
version is below 3.0. Fix it and simplify the code a bit. Also never
fail hard if required functions are not found. The caller should check
the capability flags instead. Give up on the idea that we should print
a warning if essential functions are not found (makes loading of ancient
legacy-only extensions easier).

This was experienced with the following version strings:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 915GM x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 9.0.1

(Possibly reports a very old version because it has no GLSL support,
and thus isn't even GL 2.0 compliant.)
2012-12-28 14:23:29 +01:00
wm4 56382c91e4 core: fix crash if VO init fails 2012-12-28 14:21:25 +01:00
wm4 527b39cafa manpage: minor improvements 2012-12-28 13:44:01 +01:00
wm4 1cf5a4dbd7 DOCS: document EDL format
This is taken from the commit message of 968154ba77, with some fixes
to make it valid RST.
2012-12-28 13:43:59 +01:00
wm4 97ed31fd8e audio: make de-planarization faster
Uses the same trick as the planarization code to turn per-sample memcpy
calls into mov instructions. Makes decoding a ~25min 48000Hz 2ch floatle
audio file faster from 3.8s to 2.7s.
2012-12-28 13:43:55 +01:00
nand b32f2ef0d3 vo_opengl: use more precise gamma for BT.709 with color management
Change from gamma 2.2 to the slightly more precise 1/0.45 as per BT.709.

https://www.itu.int/rec/R-REC-BT.709-5-200204-I/en mentions a value of
γ=0.45 for the conceptual non-linear precorrection of video signals.

This is approximately the inverse of 2.22, and not 2.20 as the code had
been using until now.
2012-12-28 13:43:24 +01:00
Rudolf Polzer 6be50fa773 sdl, encode_lavc: fix copyright headers
Some of them had changes in 2012; extend their header.

Fix project name.
2012-12-28 11:41:30 +01:00
Rudolf Polzer fd64003c2a encoding-example-profiles: fix "oac" typo
Fixes issue #10.
2012-12-28 11:21:35 +01:00
Rudolf Polzer 73900ca1c3 vdpau: silence a clang warning
It's just some braces...
2012-12-28 10:46:02 +01:00
Rudolf Polzer 671ca2a570 demux_mpg, ass_mp: fix warnings
The warnings in demux_mpg were silenced by additional no-operation
casts.

A variable in ass_mp was used only for some versions of libass; now the
declaration is in that version #ifdef too to avoid a compiler warning.
2012-12-28 08:40:40 +01:00
Rudolf Polzer c3cc38e4c4 vo/ao: SDL 1.2+ audio driver, SDL 2.0+ accelerated video driver
This mainly serves as a fallback for platforms where nothing better is
available; also as a debugging help. Both the audio and video driver are
not first class - the audio driver lacks delay detection, and the video
driver only supports a single YUV color space.

Configure options: --disable-sdl2 to disable SDL 2.0+ detection,
--disable-sdl to disable SDL 1.2+ detection. Both options need to be
specified to turn off SDL support entirely.
2012-12-28 08:40:28 +01:00
Rudolf Polzer e830b00458 vf_scale: support more pixel formats
The RGBA, ARGB, BGRA, ABGR were previously not always supported,
depending on system endianness.
2012-12-28 08:31:58 +01:00
wm4 844bba6645 sub: add ASS to RGBA conversion
This makes implementing new VOs easier, because they don't have to
support the ASS format.
2012-12-28 08:30:15 +01:00
Rudolf Polzer f3374eecad stream_dvd: fix angle math
Stop changing the dvd_angle variable while opening a DVD. Fixes issues
with multiple dvd:// URLs on one command line.
2012-12-22 10:00:00 +01:00
Rudolf Polzer 3ea3f72967 configure: clean up use of extra_ldflags and libs_mplayer
Now, extra_ldflags ought to only consider LDFLAGS, and all libraries
shall go into libs_mplayer. In the end, the command line first contains
extra_ldflags, and then libs_mplayer.

So altogether this change has the effect that libraries get added to the
linker command line in the order the configure script checks them.
Previously there was some reordering due to some checks adding libraries
to libs_mplayer and some to extra_ldflags.
2012-12-19 13:01:56 +01:00
Rudolf Polzer 7d0a20954f core: make WAKEUP_PERIOD overridable by the vo
This is better than having just the operating system type decide the
wakeup period, as e.g. when compiling for Win32/cygwin, a wakeup period
of 0.5 would work perfectly fine.

Instead, the default wakeup period is now only decided by availability
of a working select() system call (which is the case on cygwin but not
mingw and MSVC) AND a vo that can provide an event file descriptor or a
similar hack (vo_corevideo). vos that cannot do either need polling for
event handling and now can set the wakeup period to 0.02 in the vo code.
2012-12-19 12:58:52 +01:00
Stefano Pigozzi 51c98619c8 osxbundle: print meaningful error when a dylib is missing
If one of the bundled libraries is pointing to a missing dylib stop the
bundling and exit with an error. This can happen if the user uninstalled a
dependency after he built the binary/libraries.
2012-12-16 10:56:25 +01:00