Commit Graph

42837 Commits

Author SHA1 Message Date
Oliver Freyermuth 9a2a0b0bba stream_dvb: add verbose output in non-DVBv5 querying.
May help in future debugging in case of old kernels
with modern / obscure devices.
2016-01-21 00:34:02 +01:00
Oliver Freyermuth b2a5c16a9d stream_dvb: use DVBv5 API also for DVB-C tuning.
Using the new API is a necessity for multiple-delivery-system
devices, since the old API does not offer a way to switch
the delivery system of the card.
This should in principle also be done for DVB-T / ATSC,
especially since most DVB-T devices also support DVB-C,
but I can not test such an implementation due to lack of hardware
(currently) so it seems better to leave the existing, tested code-path
in place for now.
2016-01-21 00:34:02 +01:00
Oliver Freyermuth 346cf7abf0 stream_dvb: improve messages on delivery-type detection.
No need use use all capital letters, and don't warn
if DVB-S2 is supported in addition since we handle that
in DVB-S case already.
Also, print the delivery system number for still unhandled
delivery systems to simplify debugging.
2016-01-21 00:34:02 +01:00
Oliver Freyermuth ab59c5f522 stream_dvb: don't requery tuner type, rely on initial query.
Saves one unnecessary additional ioctl per tuning
by just reusing existing information.
Should also fix the case of multiple supported delivery types
since we now rely on the initial query from the chosen
configuration after channel list parsing
instead of requerying the device.
2016-01-21 00:34:02 +01:00
Oliver Freyermuth e904129b79 stream_dvb: support frontends with multiple delivery systems.
Most common case would be DVB-C / DVB-T combination cards.
Cards with multiple delivery systems are only supported
starting from DVBv5 API (Kernel 2.6.38).
In this case, we loop over all delivery systems and
just treat them as different cards would be treated:
They all get their own TUNER-type, channel-list parsing etc.
2016-01-21 00:34:02 +01:00
Nils Schneider c406f83d37 x11: get *current* XRandR screen configuration
Only request the current screen configuration instead of polling for new
screens, too. We're not interested in detecting any new screens as we're
merely enumerating what is currently connected and configured.

On some hardware (like mine) calling XRRGetScreenResources will stall
X11 for about 10 to 20 seconds. This has annoyed me for a few months
now and almost made me switch to VLC ;)

Signed-off-by: wm4 <wm4@nowhere>
2016-01-20 20:28:16 +01:00
wm4 68366b05f2 vo_opengl: add KMS/DRM VAAPI hardware decoding interop
Just requires glueing it together with Bloat Super Glue (tm).
2016-01-20 19:41:29 +01:00
wm4 ca00e347fc ad_spdif: if DTS-HD is requested, and profile unknown, use DTS-HD
This means there will be no loss if profile detection failed for some
reason.
2016-01-20 17:18:28 +01:00
wm4 ac966ded11 audio: change downmix behavior, add --audio-normalize-downmix
This is probably the 3rd time the user-visible behavior changes. This
time, switch back because not normalizing seems to be the more expected
behavior from users.
2016-01-20 17:14:04 +01:00
wm4 930b0d1cf6 audio: change --audio-channels default back to stereo
Too many problems. Well, actually it's just Linux audio systems which
cause problems, and exclusive audio access on other platforms.

In any case, it seems you have to do some manual configuration if you
want multichannel audio output.
2016-01-20 17:12:08 +01:00
wm4 ff43215960 player: never show "DS: (unavailable)"
Kind of annoying.
2016-01-20 16:52:32 +01:00
wm4 f352669157 Change 3 more files to LGPL 2016-01-20 15:43:56 +01:00
wm4 a8abb53a5d vaapi: fix compilation on older FFmpeg/Libav
They don't define FF_PROFILE_VP9_0.

Fixes #2737.
2016-01-20 15:35:15 +01:00
wm4 aaafbfcc06 audio: remove initial decoding retry limitation
Seems useless.

This only helped in one case: one audio stream in the sample
av_find_best_stream_fails.ts had a AC3 packets which couldn't be
decoded, and for which avcodec_decode_audio4() returned 0 forever. In
this specific case, playback will now not start, and you have to
deselect audio manually.

(If someone complains, the old behavior might be restored, but
differently.)

Also remove the stale "bitrate" field.
2016-01-19 22:49:05 +01:00
wm4 30031edce3 audio: move direct packet reading from decoders to common code
Another bit of preparation.
2016-01-19 22:24:38 +01:00
wm4 c365b44e19 audio: move dec_audio.pool to ad_spdif
That's where its only use is.
2016-01-19 21:33:05 +01:00
wm4 7737499a74 ao_coreaudio_chmap: change license to LGPL
While the situation is not really clear for the other rewritten
coreaudio code, it's very clear for the channel mapping code. It was all
written by us. (MPlayer doesn't even have any channel map handling.)
2016-01-19 21:21:49 +01:00
wm4 0d3a67ab2c filter_kernels.h: adjust the license
Make it consistent with filter_kernels.c.

See #2688.
2016-01-19 18:41:11 +01:00
wm4 e4ec0f42e4 Change GPL/LGPL dual-licensed files to LGPL
Do this to make the license situation less confusing.

This change should be of no consequence, since LGPL is compatible with
GPL anyway, and making it LGPL-only does not restrict the use with GPL
code.

Additionally, the wording implies that this is allowed, and that we can
just remove the GPL part.
2016-01-19 18:36:34 +01:00
wm4 8a9b64329c Relicense some non-MPlayer source files to LGPL 2.1 or later
This covers source files which were added in mplayer2 and mpv times
only, and where all code is covered by LGPL relicensing agreements.

There are probably more files to which this applies, but I'm being
conservative here.

A file named ao_sdl.c exists in MPlayer too, but the mpv one is a
complete rewrite, and was added some time after the original ao_sdl.c
was removed. The same applies to vo_sdl.c, for which the SDL2 API is
radically different in addition (MPlayer supports SDL 1.2 only).

common.c contains only code written by me. But common.h is a strange
case: although it originally was named mp_common.h and exists in MPlayer
too, by now it contains only definitions written by uau and me. The
exceptions are the CONTROL_ defines - thus not changing the license of
common.h yet.

codec_tags.c contained once large tables generated from MPlayer's
codecs.conf, but all of these tables were removed.

From demux_playlist.c I'm removing a code fragment from someone who was
not asked; this probably could be done later (see commit 15dccc37).

misc.c is a bit complicated to reason about (it was split off mplayer.c
and thus contains random functions out of this file), but actually all
functions have been added post-MPlayer. Except get_relative_time(),
which was written by uau, but looks similar to 3 different versions of
something similar in each of the Unix/win32/OSX timer source files. I'm
not sure what that means in regards to copyright, so I've just moved it
into another still-GPL source file for now.

screenshot.c once had some minor parts of MPlayer's vf_screenshot.c, but
they're all gone.
2016-01-19 18:36:06 +01:00
wm4 6fafdd5142 demux: remove a minor difference between threaded/unthreaded modes
This difference was unnecessary.
2016-01-19 14:21:02 +01:00
wm4 ae4b0f3f7c demux: fix leaking closed captions packets with unselected sub stream
Calling demux_add_packet() unconditonally frees the packet if the stream
is not selected.
2016-01-19 14:19:50 +01:00
Kevin Mitchell a99b63db08 ao_wasapi: use share_mode value instead of raw option opt_exclusive
Previously used opt_exclusive option to decide which volume control code to run.
The might not always reflect the actual state, for example if passthrough
is used. Admittedly, none of the volume controls will work anyway with
passthrough, but this is the right thing to do.
2016-01-18 20:50:54 -08:00
Kevin Mitchell cd5eb1bb19 ao_openal: wipe out global context on init error
Previously this would break all further attempts to init the driver after one
had failed.
2016-01-18 20:46:22 -08:00
rr- 48c9101a5b vo_drm: fix CRTC usage 2016-01-18 23:13:35 +01:00
Aman Gupta f9cefbfec4 vd_lavc: feed A53_CC side data packets into the demuxer for eia_608 decoding 2016-01-18 12:14:52 -08:00
Aman Gupta ed3e5330ec lavc_conv: pass real_time=1 option to ffmpeg for eia_608 decoder 2016-01-18 12:13:42 -08:00
Aman Gupta 1781bf26f1 ass_mp: add mp_ass_flush_old_events() 2016-01-18 12:12:34 -08:00
wm4 5053f4cc3f command: fix NULL pointer deref in "video-codec" property
Fixes #2729.
2016-01-18 20:10:55 +01:00
wm4 46bcdb7039 demux: disable stream cache if no tracks are selected
Slightly helps with timeline stuff, like EDL. There is no need to keep
network (or even just disk I/O) busy for all segments at the same time,
because 1. the data won't be needed any time soon, and 2. will probably
be discarded anyway if the stream is seeked when segment is resumed.

Partially fixes #2692.
2016-01-18 18:43:55 +01:00
wm4 5986861c9c demux: remove unused function 2016-01-18 18:43:55 +01:00
wm4 f15a79d144 demux: fix interleaved subtitle reading in unthreaded mode
Meh. Why are there even two code paths.

This adds an additional check; the big function is only moved.
2016-01-18 18:43:18 +01:00
wm4 488f569d99 demux: unify codepaths for threaded/unthreaded track switching
Well, not that the unthreaded case is important, or even works properly.
2016-01-18 18:40:35 +01:00
wm4 6f35d4df5a cache: add mechanism for disabling readahead
Will be used in a following commit.
2016-01-18 18:40:12 +01:00
wm4 2bbed80135 demux: remove unused flag 2016-01-18 18:40:05 +01:00
wm4 dfe630c5d1 manpage: adjust --display-fps description
Make it more conservative. In most cases, mpv should be able to
determine it correctly on all supported platforms.
2016-01-18 16:36:06 +01:00
wm4 418c98dec7 af_lavrresample: fudge some channel layout conversion
Prevents channels from being dropped, e.g. when going 7.1 -> 7.1(wide)
and similar cases. The reasoning here is that channel layouts over HDMI
don't work anyway, and not dropping a channel and playing it on a
slightly "wrong" (but expected) speaker is preferable to playing silence
on these speakers.

Do this to remove issues with ao_coreaudio. Frankly I'm not sure whether
our mapping (between CA and mpv/FFmpeg speakers) is correct, but on the
other hand due to the reasons stated above it's not all that meaningful.
2016-01-18 16:31:50 +01:00
wm4 0ed170ec0b sub: fix memory leaks
demux_lavf.c leaked the complete subtitle data if it was put through
iconv.

lavc_conv.c leaked AVCodecContext.subtitle_header (set by libavcodec),
which is fixed by using avcodec_free_context(). It also leaked the
subtitle that was decoded last.
2016-01-18 11:46:28 +01:00
wm4 7b4ccb3e9f image_writer: fix writing flipped images as jpg
next_scanline is usually an unsigned int.

Fixes #2635 (again).
2016-01-17 22:26:38 +01:00
wm4 4195a345a5 player: refactor: eliminate MPContext.d_video
Eventually we want the VO be driven by a A->V filter, so a decoder
doesn't even have to exist. Some features definitely require a decoder
though (like reporting the decoder in use, hardware decoding, etc.), so
for each thing which accessed d_video, it has to be redecided if and how
it can access decoder state.

At least the "framedrop" property slightly changes semantics: you can
now always set this property, even if no video is active.

Some untested changes in this commit, but our bio-based distributed
test suite has to take care of this.
2016-01-17 18:38:07 +01:00
wm4 004bc95263 player: refactor: eliminate MPContext.d_sub
The same is going to happen to d_video and d_audio later.
2016-01-17 16:57:22 +01:00
wm4 24fc176dfb command: modify OSD message when forcing original video aspect ratio
Not bothering with anything advanced, so we just show "(original)" if
the video-aspect property/option is reset.

Fixes #2722.
2016-01-16 23:23:44 +01:00
wm4 056901b2be video: refactor: disentangle decoding/filtering some more
This moves some code related to decoding from video.c to dec_video.c,
and also removes some accesses to dec_video.c from the filtering code.

dec_video.ch is starting to make sense, and simply returns video frames
from a demuxer stream. The API exposed is also somewhat intended to be
easily changeable to move decoding to a separate thread, if we ever want
this (due to libavcodec already being threaded, I don't see much of a
reason, but it might still be helpful).
2016-01-16 22:08:39 +01:00
wm4 20991a95b8 osd: make osd-width/height properties watchable 2016-01-15 22:54:08 +01:00
wm4 31adc87bde global: add client API pointer to library handle
Makes the next commit simpler. It's probably a bad idea to add more
fields to the global state, but on the other hand the client API state
is pretty much per-instance anyway. It also will help with things like
the proposed libmpv custom stream API.
2016-01-15 22:54:08 +01:00
wm4 2d4e8b623d video: refactor: slightly disentangle video filtering 2016-01-15 22:54:08 +01:00
Stefano Pigozzi bc1dce5d5b cocoa: get fps only from dislaylink
In my tests, CGDisplayModeGetRefreshRate returns 24.0 even though the nominal
one is set to 24000/1001. This is obviously not good for video.
2016-01-14 11:11:43 +01:00
Stefano Pigozzi 0fad73862c cocoa: add an observer for screenmode change 2016-01-14 11:11:43 +01:00
wm4 49690dd54b manpage: update win32 config path
Well, this probably depends on the exact Windows version.

Fixes #2611.
2016-01-14 10:34:48 +01:00
wm4 c9204fe3a5 video: fix interactively changing aspect ratio
The aspect ratio calculations are cached (mainly so that aspect ratio
related messages are not logged on every frame). The cache is not clared
anymore when video filters are reconfigured, but changing the
video-aspect-ratio property relied on it. Make it explicit.

Fixes #2714.
2016-01-14 09:46:11 +01:00