This should actually cover all of them, if you take into account that
some unchanged GPL source files include header files with such checks.
Also this was done already for the libaf derived code.
This is only for "safety" and to avoid misunderstandings.
ATSC is a mix of terrestrial and cable,
and depending on modulation is actually using
DVBC_ANNEX_B. Thus, we need to override the delivery
system depending on the modulation, channel by channel.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
These values are kept with a different unit in VDR style config
for all delivery systems, not only for DVB-S / DVB-S2.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Dump the complete raw tuning commands to allow for debugging
on low level.
Also, remove code duplication and some variable shadowing.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Also, in case tuning fails with timeout even though the ioctl
was accepted by the device, fall back to DVBv3 tuning.
This may go wrong for multi-delivery-system cards,
so issue an error message in that case.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
iive agreed to relicense things that are still in mpv to LGPLv2.1. So
change the licenses of the affected files, and rename the configure
switch for LGPL mode to --enable-preliminary-lgpl2.
(The "preliminary" part will probably be removed from the configure
switch soon as well.)
Also player/main.c hasn't had GPL parts since a few commits ago.
This affects small seeks backwards while within the buffer. Demuxers
usually avoid this, so it's probably not triggered very often. (Although
demux_mkv.c potentially triggers it often, and it uses stream_peek() to
explicitly guarantee that it can use this code to seek back.) The
condition is complex enough to warrant an assertion.
Parsing the texture data as raw strings makes the textures the most
portable and self-contained. In order to facilitate different types of
shaders, the parse_user_shader interaction has been changed to instead
have it loop through blocks and call the passed functions for each valid
block parsed. This is more modular and also cleaner, with better code
separation.
Closes#4586.
While this is perfectly OK on Unix, it causes annoying valgrind
warnings, and might be otherwise confusing to others.
On Windows, the runtime can actually abort the process if this is
called.
push.c part taken from a patch by Pedro Pombeiro.
While I'm not particularly attached to this, the history is pretty
simple, and all relevant authors have agreed.
2f004875: removed in 2c693a47, patch author was not asked.
1ef239a4: removed, author was not asked.
cehoyos, who did not agree to the relicensing, added bcb5c78ce3. If
there was copyright, we consider it gone, because the table changed. It
does not map file extension to a FourCC anymore, and codecs.conf is
gone. The new mapping is a libavcodec codec name (happens to be the same
as the file extension).
The same applies to commits 60ecafec, b749836b, 5b3e3be1. None of these
authors were contacted. These were before the code was replaced with a
table (in d0326807). The parts outside of demux_mf.c were removed a long
time ago. Like in the previous comment, we don't think any copyright
applies at least to the new code (at least after the FourCC removal).
iive authored 0aa37a0d, which is probably still left in some form, and
makes demux_mf.c "LGPL 3 or later".
stream_avdevice.c (unrelated) has been marked as LGPL before.
If they are copyrightable, iive's changes (commits listed in cache.c)
would make them LGPL 3+. To avoid that options.c becoming LGPL 3, move
the option declarations to cache.c. struct mp_cache_opts is still in
options.h, but we consider that irrelevant, and options.h will become
LGPL 2.1+ later.
The user bugmen0t was apparently a shared github account with publicly
available login. Thus, we can't get LGPL relicensing permission from the
people who used this account. To relicense successfully, we have to
remove all their changes.
This commit should remove 20d1fc13, f26fb009, defbe48d. It also should
remove whatever test fragments were copied from the ancient configure,
as well as some configure logic (potentially that device path stuff).
I think this change still preserves the most important use-cases of OSS:
BSDs, and the Linux OSS emulation (the latter for testing only).
According to an OSS user, the 4front checks were probably broken anyway.
The SunAudio stuff was probably for (Open)Solaris, which is dead.
ao_oss.c itself will remain GPL, and still contains bugmen0t changes.
All relevant authors have agreed.
There are two exceptions, patches by authors who could not be reached.
This commit tries to remove their copyright.
a0f08fbe: messes with the seeking code corner cases. The EOF flag logic
was changed at some point, and always had a flaky history (see e.g.
347cf97250274ca370411f275999efb90d5e6084ff08d0c32e2f77e3de5566f09554a844, all which happened after that patch, MPlayer ones without that
patch). I claim that all of the copyright the patch might have added is
gone. Except the message in stream_seek(), which this commit removes.
The other code removed/changed in stream_seek() is probably not from
that patch, but it doesn't hurt to be sure, and also makes it more
readable. (It might change the behavior so that sometimes the eof flag
is set after a seek, but it doesn't matter here.)
2aa6acd9: it looks like the seek_forward() modified by this patch was
later moved to stream.c and renamed to stream_skip_read() in a790f2133.
(Looking closer at it, it was actually modified again a bunch of times,
fixing the logic.) I rewrote it in this commit. The code ended up rather
similar, which probably could lead to doubts whether this was done
properly, but I guess the reader of this will just have to believe me. I
knew what stream_skip_read() was supposed to do (which was reinforced
when I tried to replace it on the caller side), without reading the
pre-existing code in detail. I had to "relearn" the logic how buf_pos
and bug_len work - it was actually easy to see from stream_read_char()
how to skip the data, essentially by generalizing its logic from 1 byte
to N bytes. From the old code I only "used" the fact that it's obviously
a while(len>0) look, that has to call stream_fill_buffer repeatedly to
make progress. At first I actually didn't use stream_fill_buffer_by(),
but the variant without _by, but readded it when I checked why the old
code used it (see cd7ec016e7). This has to be good enough. In the end,
it's hard to argue that this could be implemented in a way not using
such a loop.
Other than this, I could add the usual remarks about how this code was
not modularized in the past, and how stream.c contained DVD code, and
how this was later modularized, moving the copyright to other files, and
so on. Also, if someone wrote a stream module, and was not asked about
LGPL relicensing, we don't consider the entry in stream_list[]
copyrightable.
This file is an leftover from when img_format.h was changed from using
the ancient FourCCs (based on Microsoft multimedia conventions) for
pixel formats to a simple enum. The remaining cases still inherently
used FourCCs for whatever reasons.
Instead of worrying about residual copyrights in this file, just move it
into code we don't want to relicense (the ancient Linux TV code). We
have to fix some other code depending on it. For the most part, we just
replace the MP_FOURCC macro with libavutil's MKTAG (although the macro
definition is exactly the same). In demux_raw, we drop some pre-defined
FourCCs, but it's not like it matters. (Instead of
--demuxer-rawvideo-format use --demuxer-rawvideo-mp-format.)
All authors agreed.
The author of 1ee8ce75 did not respond, but it was a mpv pull request,
and at this time DOCS/contribute.md and the "Copyright" file stated that
all contributions must include LGPL relicensing permission. But you
could claim that this was too "hidden". Sort of a corner case, I guess,
but not my problem.
The original functions come from 24c6f11c8b, which says that these
functions were copied from another project. This other project is GPL
and was written by an unknown author, so there is no hope to relicense
them to LGPL.
Replace the existing functions with code written by Avi Halachmi. He did
not see the old code, but wrote it based on the function signature and
an extended description of what they should do (http://sprunge.us/edia).
Some additional help was provided by me (in particular the function of
the "ok" parameter and how to implement it - not in the original
ASFRecorder code).
Some of the code is hilariously similar, but these are coincidences. The
name of the variable "c" probably "leaked" from me, but "o" is a true
coincidence.
The code was integrated by me - my only change is changing the function
names to the old ones, moving the order of the top-level declarations,
and changing "default_ok" to "url_default_ok", and changing the strings
from char* to char[].
The author of the new code is Avi Halachmi.
Commit 374600cec0 ("cache: propagate seek failures") changed
stream-level seeks to be done in the calling thread so possible errors
could be reported. This commit included some rationale why doing the
stream-level seeks synchronously was not a big issue. However, the
following fixup commit f4d62dc4a0 changed the seek code to always
synchronize with the cache thread and do seek handling there. This is
a problem because it affects even seeks within already cached data
(which require no stream-level seek). With a network server that sends
data in bursts, the cache thread can be blocked in a read call for a
long time; the added synchronization means that seeking within already
downloaded data can have unnecessary long delays.
Change cache_seek() to check whether the seek is expected to result in
a stream-level seek, and skip synchronization if it is not. This means
that seeks within the cached portion of the file now again happen
immediately without possibly waiting for network.
Signed-off-by: wm4 <wm4@nowhere>
It seems libsmbclient has been GPLv3 for years. Also, it's certainly not
LGPL (unlike some of its support libs like talloc). Thus, mpv built with
Samba support is GPLv3.
Disable it by default, so we don't have to go through the trouble to
indicate the correct license in our output, and we don't trick people
into distributing stuff under the wrong license.
This has a messy history all back to the initial commit with multiple
refactors, but it seems almost all authors agreed.
Exceptions:
2aa6acd974: patch by someone who could not be reached. Whether or not
this code is still in mpv is unknown, but the affected code was moved to
stream.c at one point anyway.
3859bbd9fe: not sure if this is a patch by the mentioned person (I
assume not) or the committer (who agreed to LGPL), but it seems the
change is too trivial to affect copyright. It seems even the FD check
can be dropped, which I'm doing in this commit.
58846451f0: author doesn't reply. But reverting this and letting
someone who has never seen this commit before redo it would lead to
exactly the same code. So I'm claiming that the change is not
copyrightable.
All authors have agreed.
One minor exception is 21a9221e7b (patch by someone who wasn't asked),
but we just remove the added line again. It seems unneeded.
All authors have agreed to the relicensing.
iive has insisted on "LGPL v3 or later", which makes the file LGPL v3.
His commits are the following: 84ec5775089b0d8c680f. All other
contributions are LGPL v2.1. I hope we can remove these changes
completely one day to make this file LGPL v2.1.
iive also authored commit 3934b160a8, but this code is completely gone
today. (fork() and shared memory use was removed completely in favor of
threads.)
Reallows enabling dvdnav without enabling dvdread which was broken
in 77cbb3543 when they were both disabled by default.
Since dvdnav requires dvdread, we can enable dvdread:// even if
--enable-dvdread isn't passed.
Fixes#4290
On some DVDs, title number is not necessarily the same as the (first)
PGC number. (Most often they are equal, since there's usually exactly
one PGC per title, which is likely why this issue wasn't noticed
before.) When searching for audio/subtitle metadata, we want to look
at the actual PGC we're about to play. See discussion in issue #4235.
Signed-off-by: wm4 <wm4@nowhere>
Probably does much more:
+ add support DVB-T2
* DVB params set to AUTO by default
* MAX_CARDS: 4 -> 16
* DMX_SET_BUFFER_SIZE: 64kb -> 256kb
+ add DTV_CLEAR call before tune
+ add logic from https://github.com/olifre/mpv/commits/dvb-mixed-api-scan
* rename type to delsys
* single playlist per adapter
* card -> adapter
* fix channels order in playlist
* update internal api
* auto fallback to old DVB API on tune
* fix DELSYS_SUPP_MASK value
* remove tone - unused
* add channel mem zeroize in config parser
+ add code from libdvbv5 for detect delivery systems
* SYS_DVBC_ANNEX_AC replaced to SYS_DVBC_ANNEX_A + SYS_DVBC_ANNEX_C
Signed-off-by: wm4 <wm4@nowhere>
This reverts commit df91e492fd.
Multiple issues such as weird code with undefined behavior (like
(like conf_file*). The PR wasn't properly reviewed anyway (my error),
so this commit should be reviewed and then merged again.
Probably does much more:
+ add support DVB-T2
* DVB params set to AUTO by default
* MAX_CARDS: 4 -> 16
* DMX_SET_BUFFER_SIZE: 64kb -> 256kb
+ add DTV_CLEAR call before tune
+ add logic from https://github.com/olifre/mpv/commits/dvb-mixed-api-scan
* rename type to delsys
* single playlist per adapter
* card -> adapter
* fix channels order in playlist
* update internal api
* auto fallback to old DVB API on tune
* fix DELSYS_SUPP_MASK value
* remove tone - unused
* add channel mem zeroize in config parser
+ add code from libdvbv5 for detect delivery systems
* SYS_DVBC_ANNEX_AC replaced to SYS_DVBC_ANNEX_A + SYS_DVBC_ANNEX_C
Signed-off-by: wm4 <wm4@nowhere>
This fixes a crash when changing channels; previously stream->priv would not
be initialized when dvb_get_state reused the existing state.
Signed-off-by: Thomas VanSelus <tvanselus@diospyros.us>
Because it's kind of dumb. (But not sure if it was worth the trouble.)
For stream_file.c, we add new explicit fields. The rest are rather
special uses and can be killed by comparing the stream impl. name.
The changes to DVD/BD/CD/TV are entirely untested.
"uncached_stream" is a pretty bad name. It could be mistaken for a
boolean, and then its meaning would be inverted. Rename it.
Also add a "caching" field, which signals that the stream is a cache or
reads from a cache. This is easier to understand and more flexible.
This is almost cosmetic, but removes the duplicated EOF-setting.
Somewhat oddly, this will enter the reconnect path and exit it
immediately again - should be fine.
Commit 7be495b3 added the cancellation test, but forgot to set the eof
flag. This could lead to demux_mkv.c not terminating if the stream was
cancelled in some code paths.
This function is what is supposed to set the EOF flag in the first
place, so just add the missing code.
Benefits demux_mkv.c, or demux_lavf.c during probing. In particular
demux_lavf.c can sometimes get "stuck" when reading from a slow/blocking
source, and if probing needs more than a few iterations.
Since this is a read of an atomic variable with relaxed semantics, this
should have no impact on reading speed at all, not even theoretically.
This was excessively useless, and I want my time back that was needed to
explain users why they don't want to use it.
It captured the byte stream only, and even for types of streams it was
designed for (like transport streams), it was rather questionable.
As part of the removal, un-inline demux_run_on_thread() (which has only
1 call-site now), and sort of reimplement --stream-dump to write the
data directly instead of using the removed capture code.
(--stream-dump is also very useless, and I struggled coming up with an
explanation for it in the manpage.)
Even though the title list code was copied from FFmpeg/libbluray,
I didn't check that mpv used 0-based title indexing.
$ mpv bd://1 --bluray-device=. --msg-level=bd=v
[bd] Opening bd://
[bd] List of available titles:
[bd] idx: 1 duration: 00:00:36 (playlist: 00000.mpls)
[bd] idx: 2 duration: 01:31:30 (playlist: 00001.mpls)
[bd] idx: 3 duration: 00:00:50 (playlist: 00003.mpls)
bd://1 actually opens idx 2 from the list, not 1.
bd://mpls/1 opens playlist 00001.mpls as expected.
With this commit:
$ mpv bd://1 --bluray-device=. --msg-level=bd=v
[bd] Opening bd://
[bd] List of available titles:
[bd] idx: 0 duration: 00:00:36 (playlist: 00000.mpls)
[bd] idx: 1 duration: 01:31:30 (playlist: 00001.mpls)
[bd] idx: 2 duration: 00:00:50 (playlist: 00003.mpls)
should play the expected idx 1.
This code used to check/free multiple things, so the argument to free()
was not always NULL. After the code was simplified, the free() became
redundant.