Post

Replies

Boosts

Views

Activity

Reply to Dynamic Libraries Link and Licenses
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.
Aug ’22
Reply to VTDecompressionSessionCreate fails with code -12911 on M1 iPad
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 );
Aug ’22
Reply to CVPixelBufferGetBytesPerRowOfPlane strange result
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).
Aug ’22
Reply to CMake, vcpkg, and universal builds
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.
May ’22
Reply to Notarized app created with pyinstaller will not open on different computer
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.
Dec ’21