The build script allows building for iOS/tvOS without pulling the whole
VLCKit project, to build a standalone library for integrating libvlc in
applications.
The main goal is being able to maintain libVLC 3.0 without requiring the
whole VLCKit environment to run tests.
Cherry-picked from master branch at commit version
44d44176aa, and modified the build.conf to
have all enabled contribs building and have the target version match the
3.0.x system requirements.
Fix the following link errors when building for iOS with shared
libraries:
Undefined symbols for architecture arm64:
"_CFNetworkCopySystemProxySettings", referenced from:
_vlc_getProxyUrl in netconf.o
"_kCFNetworkProxiesHTTPPort", referenced from:
_vlc_getProxyUrl in netconf.o
"_kCFNetworkProxiesHTTPProxy", referenced from:
_vlc_getProxyUrl in netconf.o
ld: symbol(s) not found for architecture arm64
There were no LDFLAGS for iOS/tvOS and vt_utils were not compiled but
linking worked because videotoolbox was linked in the final static
library archive.
Manual backport from commit 1b9a3f4687
since interop_cvpx doesn't exist in 3.0.x and the code was pretty
different.
AudioUnit framework is not found on iOS and is not needed on MacOSX.
Cherry-picked from commit f68267079d.
Manual change where AudioUnit is still needed in this version of the
plugin for OSX.
Remove AudioUnit framework as it is not found on iOS and only
AudioToolbox is needed.
In addition CoreServices cannot be linked for the iOS/tvOS targets as it
is available starting with iOS/tvOS 12.0+.
Cherry-picked from commit e69c8fbacd.
The libci_filter_plugin_la_LDFLAGS must always contains the value of
$(AM_LDFLAGS) since it is at least defined once. Otherwise, automake
won't automatically define it to $(AM_LDFLAGS) $(LDFLAGS) and the plugin
won't be built correctly (ie, built as a convenience library because of
the lack of -rpath definition in LDFLAGS).
In addition, the frameworks were not correctly set for iOS, which was
not a problem in static build because there is no linkage, nor in
dynamic build before because the plugin was built as a convenience
library, thus not linked nor installed to the device with the bundle
script.
Since the frameworks are mostly common between MacOSX and iOS, just add
the corresponding OpenGL framework for each target, and define the other
frameworks out of any automake condition.
Cherry-picked from commit c82c995224 but
partially modified to remove OpenGL/ES frameworks that are not needed
without the commit cb6b1d5fb6.
It could select a different format than the one the decoder sends.
(cherry picked from commit 894142a0cb)
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
We need to check what is wrong but usually it's the same as Debian builds.
The snap building depending on Ubuntu server is not very stable. So we should
not care too much when it breaks.
(cherry picked from commit 48a6b25031)
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Use of SO_REUSEADDR leads to a busy loop within libupnp and very high
battery usage. This disables the option and actually fixes its
functionality by patching the library. Patch to be upstreamed.
Manual backport of 74b765d8
It was missing after the format was being set to FL32, causing
i_bytes_per_frame mismatch when the input format size was different than
4.
It is already done in MapOutputLayout() since this function change the
number of channels but it was not done for the MapInputLayout() case.
Regression from ea9c30171dFixes#28117
(cherry picked from commit c2b716c314)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Fixes#27646
Currently, VLC's SeekToTime algorithm for MPEG Transport Streams involves a number of arbitrary restrictions when searching for PCR timestamps. It rejects packets whose PIDs are not included in the current program and it also rejects packets that do not contain a payload as well as packets that do not contain the payload start indicator.
However, per the official documentation describing the MPEG-TS format (ITU-T H.222.0 version 7.0) there are no such restrictions placed on where the PCR can be set (nor are there official recommendations on it). It specifies that the PCR is part of the adaptation field, and it's perfectly valid to make a packet with "adaptation field only" and no payload.
References:
* Chapter 2.4.3.3:
- Table 2-3: "The transport packets with PID values 0x0000, 0x0001, and 0x0010-0x1FFE are allowed to carry a PCR."
- Table 2-5: "'10': Adaptation_field only, no payload"
- Table 2-6: PCR is an optional part of the adaptation field, see 2.4.3.5 for details
* Chapter 2.4.4.10: See PCR_PID
Our observation of the existing algorithm is that the restrictions on the contents of the packet and the type of stream are intended more for the subsequent "ParsePESHeader" call, as those restrictions make sense when using that mechanism as a fallback method to find the PCR. However, by including these restrictions prior to the line that gets the PCR if "p_pmt->i_pid_pcr == i_pid", it's rejecting packets that could have otherwise provided PCR information.
By moving the restrictions to later within the algorithm, we allow for any packets containing a matching PCR_PID to potentially supply that PCR information. This resolves seeking issues on any video that was created with PCRs set on packets without payloads.
(cherry picked from commit 80c4515fac)
Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
The priority is higher than dav1d so it can handle hardware decoding even if
dav1d is present.
This version of lavc should only allow decoding if the decoder has a profile
that can be decoded by the hardware, otherwise it should let other decoders try
to do the decoding (dav1d, lavc with current priority, etc).
(cherry picked from commit cd4d32f71b) (edited)
edited:
* 3.0 doesn't include libavutil headers for metadata
* in 3.0 p_dec->fmt_in is not a pointer
* 3.0 doesn't have the meson file modifications
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Only use 1 decoder thread when allowing only hardware decoders.
Restarting the decoder silently is not allowed. Either we can reuse the va or
we need to reload the decoder outside of lavc.
(cherry picked from commit 1effe16f9f) (edited)
edited:
* 3.0 doesn't have a defaultfmt but uses p_sys->pix_fmt as it's missing
906ffbaa63
* 3.0 calls vlc_va_Delete() with a hwaccel_context
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Now the (un)locking is optional.
(cherry picked from commit 4416251e1b) (edited)
edited:
* 3.0 uses a vlc_sem_t instead of a vlc_mutex_t
* 3.0 uses vlc_va_GetChroma() as there is no vlc_va_MightDecode()
* 3.0 doesn't use a decoder device or video context but uses a test picture
from the vout pool
* 3.0 uses more version checks for AV_PIX_FMT values
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
No functional changes.
Also move the profile initialization with the p_sys init.
(cherry picked from commit aad2bdfd9e) (rebased)
rebase:
* the code around the code move is slightly different
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
(cherry picked from commit 50aeffdf10) (edited)
edited:
* on 4.0 there's also the chroma subsampling information per format.
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
In may come in packetized form but the extra data are not given (from raw OBU
files).
(cherry picked from commit 8a60c1c4ad) (rebased)
rebased:
* the code around is slightly different
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>