fix: stub out AVVideoDecoder on Windows ARM64 instead of excluding it - #642
Merged
Conversation
…e whole file CMakeLists.txt excluded AVVideoDecoder.cpp/.hpp entirely for MSVC ARM64 (no prebuilt libav libraries there), but wxMediaCtrl3.cpp unconditionally includes the header and uses the class - the header compiled fine (it's just a declaration), but there was no implementation to link against, causing 6 unresolved externals and a link failure. Move the exclusion inside AVVideoDecoder.cpp/.hpp instead: guard the real libav-based implementation with the existing BAMBUSTUDIO_NO_AVVIDEODECODER define (already set for MSVC ARM64) and provide a stub that always reports failure when it's defined. wxMediaCtrl3.cpp needs no changes - camera/ live-view just won't decode any frames on ARM64 instead of the binary failing to link. Closes #641
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #640 fixed the NEON/SIMD compile errors, the ARM64 nightly build got all the way through compilation and failed at link time instead:
CMakeLists.txt excludes
AVVideoDecoder.cpp/.hppfrom the ARM64 source list entirely (no prebuilt libav there), butwxMediaCtrl3.cppunconditionally includes the header and declares anAVVideoDecoderinstance. The header itself compiles fine (it's just a class declaration), but there's no.cppproviding the implementation, hence the link failure.Rather than touching the ~130-line streaming thread in
wxMediaCtrl3.cppwith a spread of#ifdefs, this moves the exclusion insideAVVideoDecoder.cpp/.hpp: the real libav-based implementation is guarded by the already-existingBAMBUSTUDIO_NO_AVVIDEODECODERdefine (already set for MSVC ARM64 at CMakeLists.txt:760), with a stub implementation for when it's defined that always reports failure. The file is now always part ofSLIC3R_GUI_SOURCESinstead of being conditionally excluded.wxMediaCtrl3.cppneeds zero changes - camera/live-view will just report "no frame" on ARM64 instead of the whole binary failing to link.Closes #641