fix: MJPEG video streaming and xcode-select detection on modern macOS#898
fix: MJPEG video streaming and xcode-select detection on modern macOS#898amilich wants to merge 1 commit intofacebook:mainfrom
Conversation
Two key fixes for idb_companion on macOS 12.1+: 1. FBSimulatorVideoStream.m: Don't require hardware-accelerated encoding for JPEG - The original code unconditionally required hardware acceleration on macOS 12.1+ - JPEG encoding may not have hardware encoder support on all systems - This caused VTCompressionSessionCreate to fail with -12902 (kVTParameterErr) - Now only H.264 requires hardware acceleration; JPEG prefers but doesn't require it 2. FBXcodeConfiguration.m: Fall back to xcode-select -p for developer directory - The symlink at /var/db/xcode_select_link no longer exists on modern macOS - Now tries the symlink first, then falls back to running xcode-select -p 3. FBSimulatorControl.xcodeproj: Mark required headers as Public - FBSimulatorApplicationCommands.h and FBSimulatorFileCommands.h need to be public - Required for idb_companion to build against the framework 4. Applied fixes from upstream PRs facebook#889 and facebook#895 for compilation issues These fixes enable MJPEG video streaming at ~30 FPS without requiring the simulator window to be visible on screen.
|
Hi @amilich! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Two key fixes for idb_companion on macOS 12.1+:
FBSimulatorVideoStream.m: Don't require hardware-accelerated encoding for JPEG
FBXcodeConfiguration.m: Fall back to xcode-select -p for developer directory
FBSimulatorControl.xcodeproj: Mark required headers as Public
Applied fixes from upstream PRs Fix up compiler errors #889 and Fix createGzipForPath compile failure #895 for compilation issues
These fixes enable MJPEG video streaming at ~30 FPS without requiring the simulator window to be visible on screen.
Motivation
(Write your motivation here.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/idb, and link to your PR here.)