Is this situation required to release the entire source code of our app under the LGPL 2.1 (or LGPL 3.0) license?
No, that's not a requirement of the LGPL license.
But if the developers (wrongly) believe that it is a requirement of their license (even if it's not), they may take down your app (and maybe even your developer account) with a simple copyright notice. So it's not worth the headache.
Post
Replies
Boosts
Views
Activity
iOS supports only frameworks, and macOS supports both frameworks and dynamic libraries.
Generally, people who specifically need frameworks are using Xcode, so you can provide them with an Xcode project, and they do the <Thingie/header.h> thing in their own code. CMake lets you output Xcode projects.
Fusion, part of DaVinci Resolve, does motion graphics and is free.
Motion, part of Final Cut Pro, has a free trial.
Try setting the profile to high: kVTProfileLevel_H264_High_AutoLevel.
According to VTErrors.h, -12911 is kVTVideoDecoderMalfunctionErr. The name is not very helpful.
But in your code, you need to actually pass good values for decoderSpecification, imageBufferAttributes and outputCallback, not just nil.
My only guess is your SPS and PPS parameters are incorrect. They should not include the start code (0001), and don't forget to subtract the length of the start code (4). Like this:
OSStatus status = CMVideoFormatDescriptionCreateFromH264ParameterSets(
NULL,
2,
(const uint8_t *[]) {spsBuffer + 4, ppsBuffer + 4},
(const size_t[]) {spsSize - 4, ppsSize - 4},
4,
&videoFormat
);
Update: Nevermind. This only happens with kCVPixelFormatType_Lossless_420YpCbCr8BiPlanarVideoRange. I had not set kCVPixelBufferPixelFormatTypeKey in the image buffer attributes dictionary argument to VTDecompressionSessionCreate, thinking it would choose the most reasonable pixel format... If I request kCVPixelFormatType_420YpCbCr8Planar or kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, CVPixelBufferGetBytesPerRowOfPlane() returns a good value (1472, i.e. ceil(1440 / 64) × 64).
Update: CVPixelBufferGetBytesPerRow() returns a much more reasonable value of 1536 (a multiple of 128, i.e. ceil(1440 / 128) × 128 = 1536).
Setting rowBytes=CVPixelBufferGetBytesPerRow() for the luma vImage_Buffer, and rowBytes=(CVPixelBufferGetBytesPerRow() / 2) for the chroma vImage_Buffer, vImageConvert_420Yp8_CbCr8ToARGB8888 is successful.
I don't think you can write there.
The Kivy App class has a method named get_application_config() (check the documentation) that gives you a writable directory, with the "appdir" keyword on iOS:
app.get_application_config('%(appdir)s')
The important Clang compiler flags for cross-compiling are: --target; --sysroot; and -isysroot.
For CMake specifically, the relevant variables for cross-compiling are: CMAKE_C_COMPILER_TARGET; CMAKE_CXX_COMPILER_TARGET; CMAKE_SYSTEM_PROCESSOR; and CMAKE_SYSTEM_NAME.
For example, to build for x86_64 on an M1 Mac (arm64):
export TARGET="x86_64-apple-darwin"
export CFLAGS="$CFLAGS --target=$TARGET"
export CXXFLAGS="$CXXFLAGS --target=$TARGET"
export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
cd mycode
mkdir build
cd build
cmake -DCMAKE_C_COMPILER_TARGET="$TARGET" -DCMAKE_CXX_COMPILER_TARGET="$TARGET" -DCMAKE_SYSTEM_PROCESSOR="x86_64" -DCMAKE_SYSTEM_NAME="Darwin" -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" ..
Note if you set the SDKROOT environment variable, it is not necessary to add "--sysroot $SDKROOT" and "-isysroot $SDKROOT" to CFLAGS and CXXFLAGS.
Do that for each (x86_64 and arm64) then use lipo to make universal binaries.
Edit: Oh and, with CMake, never set the "--target" flag in LDFLAGS, only in CFLAGS/CXXFLAGS, it won't like that.
The AppKit module is part of pyobjc.
Create a virtual environment and install pyobjc:
/usr/bin/python3 -m venv ~/myproject
cd ~/myproject
source bin/activate
pip install pyobjc
If the directory already exists, mkdir will fail. Use os.makedirs instead of os.system('mkdir ...'):
if not os.path.exists(dir):
os.makedirs(dir)
What entitlements are you using? Pyinstaller requires com.apple.security.cs.allow-unsigned-executable-memory.
Save this to the file entitlements.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key><true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>
</dict>
</plist>
Pass this file to pyinstaller with the --osx-entitlements-file entitlements.plist option.
Pass the same file to the codesign utility with the --entitlements entitlements.plist option.