Commit Graph

36314 Commits

Author SHA1 Message Date
wm4 228b652ad5 ao_oss: SNDCTL_DSP_CHANNELS takes int, not uint8_t
This caused weird issue, probably caused by setting up the wrong number
of channels, or similar. See github issue #383.

Patch by bugmen0t on github.
2013-12-01 19:40:14 +01:00
wm4 20e08ac84e vf_pullup: properly reset on seek
Sometimes, vf_pullup hanged on seek. This was because it never was
properly reset. Old timestamps messed up the timestamp calculations,
which made the player show frames for a ridiculously long time, which is
perceived as pausing or hanging.
2013-12-01 19:39:42 +01:00
wm4 93518bc652 player: simple hack to make backstep code somewhat more robust
The hr-seek code assumes that when seeking the demuxer, the first image
decoded after the seek will have a PTS exactly equal to the demuxer seek
target time, or before that target time. Incorrect timestamps,
implicitly dropped initial frames, or broken files/demuxers can all
break this assumption, and lead to hr-seek missing the seek target.

Generally, this is not much a problem (the user won't notice being off
by one frame), but it really shows when using the backstep feature. In
this case, backstepping would simply hang.

Add a simple hack that basically forces a minimal value for the --hr-
seek-demuxer-offset option (which is 0 by default) when doing a
backstep-seek. The chosen minimum value is arbitrary. There's no perfect
value, though in general it should perhaps be slightly longer than the
frametime, which the chosen value is more than enough for typical
framerates.

Conflicts:
	mpvcore/player/playloop.c
2013-12-01 19:39:21 +01:00
Stefano Pigozzi 38885269b3 ao_coreaudio: simplify ch label to speaker id conversion
Previous code was using the values of the AudioChannelLabel enum directly to
create the channel bitmap. While this was quite smart it was pretty unreadable
and fragile (what if Apple changes the values of those enums?).

Change it to use a 'dumb' conversion table.
2013-12-01 19:37:37 +01:00
Stefano Pigozzi 485c658f3f old-build: fix iconv check on openbsd 2013-12-01 19:37:29 +01:00
wm4 b9585e518b af_lavi: actually free the filter graph on uninit
This was a memory leak.

Also remove the AF_CONTROL_COMMAND_LINE code, which was inactive. (It's
never called if the new option parser is used.)
2013-12-01 19:37:19 +01:00
Stefano Pigozzi a9858ab117 ao_coreaudio: map channel labels needed for 8ch layouts
The code stopped at kAudioChannelLabel_TopBackRight and missed mapping for
5 more channel labels. These are in a completely different order that the mpv
ones so they must be mapped manually.
2013-12-01 19:37:09 +01:00
Stefano Pigozzi eeb37de8ca cocoa: unlock on uninit
NSLock should be unlocked before dealloc is called on it.
2013-12-01 19:36:02 +01:00
wm4 bbff558e6e player: only pause for waiting on cache if it makes sense
If the value for --cache-on-pause is larger than --cache-min, and the
cache runs below --cache-on-pause, but above --cache-min, the logic
would demand to pause the player and then unpause immediately again.
This doesn't make much sense, and alternating the pause state in each
playloop iteration has negative consequences. Add an explicit check to
avoid this situation.

Conflicts:
	mpvcore/player/playloop.c
2013-12-01 19:35:21 +01:00
Stefano Pigozzi 022735fa72 input: discard precise scrolling commands with no value
Apparently Cocoa precise scrolling generates a lot of spurious events with
a delta that is equal to 0.0. Make sure that they are discarded and not added
to the input queue.

Even though this only known to happen with Cocoa, I implemented this at core
level since it makes sense in general.

Fixes: #310
2013-12-01 19:33:52 +01:00
wm4 600193749d vd_lavc: when falling back to software, revert filter error status
When mpv is started with some video filters set (--vf is used), and
hardware decoding is requested, and hardware decoding would be possible,
but is prevented due to video filters that accept software formats only,
the fallback didn't work properly sometimes.

This fallback works rather violently: it tries to initialize the filter
chain, and if it fails it throws away the frame decoded using the
hardware, and retries with software. The case that didn't work was when
decoding the current packet didn't immediately lead to a new frame. Then
the filter chain wouldn't be reinitialized, and the playloop would stop
playback as soon as it encounters the error flag.

Fix this by resetting the filter error flag (back to "uninitialized"),
which is a rather violent, but somewhat working solution.

The fallback in general should perhaps be cleaned up later.

Conflicts:
	video/decode/vd_lavc.c
2013-12-01 19:32:44 +01:00
wm4 fc465f1f26 audio: respect --end/--length with spdif passthrough
In theory, we can't really do this, because we don't know when a spdif
frame ends. Spdif transports compressed audio through audio setups that
were originally designed for PCM only (which includes the audio filter
chain, the AO API, most audio output APIs, etc.), and to reach this
goal, spdif pretends to be PCM. Compressed data frames are padded with
zeros, until a certain data rate is reached, which corresponds to a
pseudo-PCM format with 2 bytes per sample and 2 channels at 48000 Hz.
Of course an actual spdif frame is significantly larger than a frame
of the PCM format it pretends to be, so cutting audio data on frame
boundaries (as according to the pseudo-PCM format) merely yields an
incomplete and broken frame, not audio that plays for the desired
duration.

However, sending an incomplete frame might still be much better than the
current behavior, which simply ignores --end/--length (but still lets
the video end at the exact end time).

Should this result in trouble with real spdif receivers, this commit
probably has to be reverted.

Conflicts:
	mpvcore/player/audio.c
2013-12-01 19:31:29 +01:00
wm4 bf39906cd5 ao_rsound: fix option types
These are option values, and the option code expects char*.

Not actually tested.
2013-12-01 19:30:13 +01:00
enkore dac0726e98 manpage: document , mapping (frame_back_step)
See #356
2013-12-01 19:29:22 +01:00
wm4 0268f2431a input.conf: fix typo 2013-12-01 19:29:18 +01:00
Josh Driver 441af64005 Fixing list of vo's that vavpp works with, in man page. 2013-12-01 19:29:15 +01:00
wm4 f450e5c397 stream_lavf: fix a small memory leak
Also add an explanation why this special code path for rtsp is needed.
2013-12-01 19:28:46 +01:00
wm4 e70580df30 ta: fix typo in comment 2013-12-01 19:28:05 +01:00
wm4 9eaba0c176 osdep/io.c: include config.h
This possibly enables code that has never been tested before
(accidentally), so let's hope this works out ok.
2013-12-01 19:27:54 +01:00
wm4 196c7abcdb manpage: fix typo in --video-align-y description 2013-12-01 19:27:36 +01:00
wm4 253623d9e8 player: deselect video track if initialization fails
This didn't have any consequences, other than suddenly reinitializing
video when it works again (such as with EDL timeline mixing video and
audio-only files).

Conflicts:
	mpvcore/player/video.c
2013-12-01 19:27:29 +01:00
wm4 b9f40d650a stream_dvb: remove bogus free calls
The priv struct is now allocated by talloc in stream.c. It doesn't need
to be manually freed, and using free() instead of talloc_free() probably
crashes.
2013-12-01 19:26:34 +01:00
wm4 dc1aaf695f vo_vdpau: don't calculate destination alpha when drawing OSD
Same as MPlayer svn commit r36515 "Chose cheaper alpha blend equation."

No idea if this is actually faster, but can't hurt.
2013-12-01 19:26:30 +01:00
wm4 b24fd52268 player: don't remove playback status when reinitializing DVB
Also break that line a bit.

Conflicts:
	mpvcore/player/loadfile.c
2013-12-01 19:26:17 +01:00
wm4 dd25c08713 encode_lavc: add missing newline in error message 2013-12-01 19:24:12 +01:00
wm4 327edcec3f manpage: mark DTS-HD passthough as broken 2013-12-01 19:23:58 +01:00
Stefano Pigozzi 5281a9865d osx bundle: remove embedded fonts.conf
This could cause the bundle to recache stuff because of differences with
configuration of other software using fonconfig. The defaults OS X directories
should be added to fontconfig at build time (through configure).
2013-12-01 19:23:53 +01:00
wm4 6fcdb4ced3 gl_common: print SW renderer warning only if it was the only reason we rejected it 2013-12-01 19:22:34 +01:00
bugmen0t e773bda893 configure: enable v4l2 input on freebsd 2013-12-01 19:22:17 +01:00
bugmen0t d74e82cb50 tvi_v4l2: let libv4l2 convert to a known pixel format
Signed-off-by: wm4 <wm4@nowhere>

Significant modifications over the original patch by not overriding
syscalls with macros ("#define open v4l2open") for fallback, but the
other way around ("#define v4l2open open"). As consequence, the calls
have to be replaced throughout the file.

Untested, although the original patch probably was tested.
2013-12-01 19:21:44 +01:00
wm4 37fe0444e3 stream: don't include linux/types.h in some files
Apparently this is not portable to FreeBSD. It turns out that we
(probably) don't use any symbols defined by this header directly, so
the includes are not needed.

Conflicts:
	stream/stream_radio.c
2013-12-01 19:21:28 +01:00
wm4 64a66364ad m_option: handle audio/filter filters with old option parsing
These use the _oldargs_ hack, which failed in combination with playback
resume. Make it work.

It would be better to port all filters to new option parsing, but that's
obviously too much work, and most filters will probably be deleted and
replaced by libavfilter in the long run.
2013-12-01 19:20:35 +01:00
Alexander Preisinger 2995bf176d wayland: create xkbcommon keymap from string
Fixes a problem where the passed size doesn't match the actuall string.
2013-12-01 19:20:04 +01:00
William Light 0d3e7f5c3e ao_jack: refactoring, also fix "no-connect" option 2013-12-01 19:19:49 +01:00
wm4 8fe6f2542a demux_mkv: add support for HEVC
Note that you still need --vd-lavc-o='strict=-2' to enable the decoder.

Also, there's no guarantee that all required features for HEVC demuxing
are actually implemented, nor that the current muxing schema is the
final one.
2013-12-01 19:18:50 +01:00
Rudolf Polzer b553a43667 vo_lavc: fix -ovoffset.
Previously, using it led to no single frame being output, ever.
2013-12-01 19:17:38 +01:00
wm4 6de5bf12a5 vo_opengl: fix alpha values written to the framebuffer
When blending OSD and subtitles onto the video, we write bogus alpha
values. This doesn't normally matter, because these values are normally
unused and discarded. But at least on Wayland, the alpha values are used
by the compositor and leads to transparent windows even with opaque
video on places where the OSD happens to use transparency.

(Also see github issue #338.)

Until now, the alpha basically contained garbage. The source factor
GL_SRC_ALPHA meant that alpha was multiplied with itself. Use GL_ONE
instead (which is why we have to use glBlendFuncSeparate()). This should
give correct results, even with video that has alpha. (Or at least it's
something close to correct, I haven't thought too hard how the
compositor will blend it, and in fact I couldn't manage to test it.)

If glBlendFuncSeparate() is not available, fall back to glBlendFunc(),
which does the same as the code did before this commit. Technically, we
support GL 1.1, but glBlendFuncSeparate is 1.4, and I guess we should
try not to crash if vo_opengl_old runs on a system with GL 1.1 drivers
only.
2013-12-01 19:17:25 +01:00
wm4 78adec6c9c Release 0.2.3 2013-11-08 00:01:29 +01:00
wm4 0fed032ca0 audio: fix bogus audio format comparison 2013-11-07 23:59:38 +01:00
wm4 96532916fe osdep: handle SIGTERM
There's no reason why we should e.g. handle SIGQUIT, but not SIGTERM.

Note that sending SIGTERM twice still kills the player.
2013-11-07 23:58:56 +01:00
wm4 c265855d44 input.conf: clarify the magic how default key bindings are added
This is a confusing mechanism, so the explanation should bit more clear.
2013-11-07 23:58:47 +01:00
wm4 7816fa9745 manpage: fix incorrect default for --osc 2013-11-07 23:58:12 +01:00
wm4 e76076da3d stream_lavf: support more libavformat protocols 2013-11-07 23:57:56 +01:00
wm4 90015a8b8b vo_opengl: reserve 4 texture units for video instead of 3
Video has up to 4 textures, if you include obscure formats with alpha.
This means alpha formats could always overwrite the first scaler
texture, leading to corrupted video display. This problem was recently
brought to light, when commit 571e697 started to explicitly unbind all 4
video textures, which broke rendering for non-alpha formats as well.

Fix this by reserving the correct number of texture units.
2013-11-07 23:57:43 +01:00
ChrisK2 d1a8dfb8c4 tools: add --no-cache --no-config to mpv_identify.sh 2013-11-07 23:57:16 +01:00
wm4 e68fcbfa39 player: fix quvi 0.9 playlist loading
The code made no sense at all.

Conflicts:
	mpvcore/player/loadfile.c
2013-11-07 23:57:05 +01:00
wm4 391c087d75 stream: reconnecting doesn't make sense if stream is not seekable
This stops mpv from being stuck in reconnecting at the end of the file
with some unseekable streams.

Test URL: http://playerservices.streamtheworld.com/pls/CBC_R1_VCR_H.pls
2013-11-07 23:55:45 +01:00
wm4 b4f6e57d2c Release 0.2.2 2013-11-02 20:11:57 +01:00
wm4 854cdb796e ta: re-add MinGW cargo culting
Not really cargo cult, but an unexplainable, needless difference that
just exists to annoy us.

Fixes that gcc on MinGW treats format specifiers in MSVC mode. Just why?
Why?
2013-11-02 19:06:59 +01:00
wm4 504c452568 sd_lavc: display DVD subs with unknown duration
DVD subs (rarely) have subtitle events without end timestamp. The
duration is unknown, and they should be displayed until they're
replaced by the next event.

FFmpeg fails hard to make us aware whether duration is unknown or
actually 0, so we can't distinguish between these two cases. It fails
at this twice: AVPacket.duration is set to 0 if duration is unknown,
and AVSubtitle.end_display_time has the same issue.

Add a hack that considers all bitmap subtitles with duration==0 as
events with uknown length. I'd rather accidentally display a hidden
subtitle (if they exist at all), instead of not displaying random
subtitles at all.

See github issue #325.
2013-11-02 19:06:16 +01:00