chore: release v2.0.0 - #103
Closed
1313 wants to merge 103 commits into
Closed
Conversation
Add fluent builder API to SCStreamConfiguration: - Add ::new() constructor as alias for ::default() - Add with_* builder methods for all setters (e.g., with_width, with_height) - Update set_* methods to return &mut Self for chaining Update all examples, tests, and documentation to use new pattern: - Examples now use SCStreamConfiguration::new().with_width(1920).with_height(1080) - Update README.md code examples - Update doc examples in lib.rs, async_api.rs, screenshot_manager.rs - Update stream module documentation BREAKING CHANGE: set_* methods now return &mut Self instead of () This enables method chaining but may affect code that relied on unit return type
- Update doc examples to use SCStreamConfiguration::new() with with_* methods - Improve lib.rs crate-level documentation with feature flags table - Add html_root_url for docs.rs - Update audio configuration examples - Update screenshot_manager examples - Update error module examples
- Add UserDeclined error for user permission denial - Add MicrophoneCaptureFailed error with detail message - Add SystemStoppedStream error for system-initiated stops - Add comprehensive tests for all error variants
- Add capturesShadowsOnly (macOS 14.0+) - Add ignoresShadowsDisplay (macOS 14.0+) - Add ignoreGlobalClipDisplay/SingleWindow (macOS 14.0+) - Add showsMouseClicks (macOS 15.0+) - Add SCStreamConfigurationPreset for HDR configurations (macOS 15.0+) - Add from_preset() constructor for preset-based configs - Add comprehensive tests for all new configuration options
- Add SCShareableContentStyle enum (None, Window, Display, Application) - Add get_style() for filter type inspection (macOS 14.0+) - Add get_point_pixel_scale() for Retina scaling (macOS 14.0+) - Add get/set_include_menu_bar() (macOS 14.2+) - Add get_included_displays/windows/applications() (macOS 15.2+) - Add From<i32> impl for SCShareableContentStyle - Add tests for all new content filter features
- Add SCShareableContentInfo struct with style, scale, rect, pixel_size - Add for_filter() constructor to get info from SCContentFilter - Add pixel_size() helper for calculating actual pixel dimensions - Add content_rect getter from SCContentFilter - Add point_pixel_scale getter from SCContentFilter - Add Clone, Debug, Send, Sync impls - Add comprehensive tests for SCShareableContentInfo
- Add capture_image_in_rect() for capturing specific screen regions - Uses CGRect to specify capture area - Returns CGImage like existing capture methods - Add tests for region capture functionality - Add cg_init helper for headless test environments
- Add SCRecordingOutputFileType enum (MP4, MOV) - Add get/set_video_codec() for codec selection - Add get/set_output_file_type() for format selection - Add available_video_codecs_count() for codec enumeration - Add available_output_file_types_count() for format enumeration - Add recorded_duration() to get CMTime of recording - Add recorded_file_size() to get bytes written - Add Debug impl for SCRecordingOutputConfiguration - Add tests for all recording output features
- Add SCPickerResult for accessing picked displays/windows/applications - Add displays() to get picked SCDisplay objects - Add windows() to get picked SCWindow objects - Add applications() to get picked SCRunningApplication objects - Add pixel_size() helper for calculating pixel dimensions - Add comprehensive FFI bindings for picker result access - Fix doc examples to use window() instead of windows() builder
- Add backticks around type names (IOSurface, CMSampleBuffer, etc.) - Fix CMTime usage in configuration example - Fix temporary value lifetime in window capture example - Fix exclude_windows type annotation in filter example - Update module descriptions with proper formatting
- 01_basic_capture: Add filter scale info, shadow/clip options, mouse clicks - 05_screenshot: Add SCShareableContentInfo display, region capture (15.2+) - 07_list_content: Add pixel size/scale display, filter style info - 10_recording_output: Add codec/file type selection, duration/size stats - 11_content_picker: Minor formatting improvements
- Add Metal-based screen capture overlay application - Implement bitmap font rendering for overlay text - Add audio waveform visualization with VU meter - Add interactive keyboard navigation menu - Document data structure alignment for Rust/Metal interop
- Add macos_15_2 feature flag for new screenshot API - Document new macOS version feature flags - Update feature documentation in README
- Add stream_did_become_active() callback for window reopen events - Add stream_did_become_inactive() callback for all windows closed - Improve documentation for video effect callbacks (macOS 14.0+)
- Add HDR10 recording preset that preserves SDR range during playback - Add tests for all presets including the new HDR recording preset
- Add available_video_codecs() returning Vec<SCRecordingOutputCodec> - Add available_output_file_types() returning Vec<SCRecordingOutputFileType> - Add get_available_video_codec_at() FFI function - Add get_available_output_file_type_at() FFI function - Add comprehensive tests for array retrieval methods
The pick_async() and pick_filter_async() methods used tokio which is only a dev-dependency. Remove these methods since they cannot work without tokio as a regular dependency. Users can wrap the sync methods in their own async runtime if needed.
Add async wrapper for the content sharing picker that doesn't block the executor: - AsyncSCContentSharingPicker with pick() and pick_filter() methods - AsyncPickerFuture returning SCPickerOutcome - AsyncPickerFilterFuture returning SCPickerFilterOutcome - Uses AsyncCompletion with waker-based signaling (truly non-blocking) Requires: macos_14_0 + async features
- Add Example 5 to 08_async.rs demonstrating AsyncSCContentSharingPicker - Shows non-blocking picker with result handling - Add tests for async picker types and Future implementation
Add SCScreenshotConfiguration and SCScreenshotOutput for advanced screenshots: - SCScreenshotConfiguration with builder pattern for HDR/SDR control - SCScreenshotDisplayIntent enum (Canonical, Local) - SCScreenshotDynamicRange enum (SDR, HDR, BothSDRAndHDR) - SCScreenshotOutput with sdr_image(), hdr_image(), file_url() - SCScreenshotManager::capture_screenshot() and capture_screenshot_in_rect() - Swift bridge functions for all new APIs Requires: macos_26_0 feature flag
- Update 05_screenshot.rs with macOS 26.0 HDR capture demo - Demonstrate SCScreenshotConfiguration builder pattern - Show SDR and HDR image extraction from SCScreenshotOutput - Add 11 new tests for screenshot configuration and capture
- Add macos_26_0 feature flag documentation - Document SCScreenshotConfiguration and SCScreenshotDynamicRange types - Update examples table with async picker and HDR screenshot features - Add run commands for new feature combinations
Test appropriate feature flags for each macOS version: - macOS 13: async,macos_13_0 - macOS 14: async,macos_14_4 - macOS 15: async,macos_15_2 Ensures APIs are tested on matching OS versions.
- Remove redundant dispatch_queue_*_bridge suffix aliases - Organize iosurface_* compatibility aliases with deprecation comments - Standardize error handling to use SCBridgeError consistently - Add userData parameter to sc_shareable_content_get callbacks - Add userData parameter to sc_shareable_content_get_current_process_displays - Update Rust FFI declarations to match new callback signatures - Clean up redundant return statements in stub functions BREAKING CHANGE: sc_shareable_content_get and sc_shareable_content_get_current_process_displays callbacks now include userData parameter for consistency with other async APIs
- Deprecate duplicate CVPixelBuffer getters (get_width, get_height, etc.) in favor of cleaner names (width, height, io_surface) - Convert SCRecordingOutputConfiguration from setter to builder pattern (set_* -> with_*) for consistency with other configuration types - Add Clone implementation for DispatchQueue - Add Debug derive for CVPixelBuffer - Add null checks in Drop implementations for SCDisplay, SCStream, SCContentFilter for safety - Add doc comment for SCShareableContent::applications() - Add dispatch_queue_retain FFI declaration - Update tests to use non-deprecated method names The deprecated methods are kept for backward compatibility but marked with #[deprecated] attributes pointing to the preferred alternatives.
- Remove duplicate CVPixelBuffer getters (get_width, get_height, etc.) - Remove duplicate IOSurface getters (get_width, get_height, etc.) - Remove SCContentFilter::build() alias for builder() - Remove SCContentSharingPicker::show() alias for pick() - Remove SCContentSharingPickerResult and SCPickResult type aliases - Update all documentation examples to use new method names
- CMSampleBuffer: remove get_ prefix from getters (image_buffer, frame_status, presentation_timestamp, duration, num_samples, audio_buffer_list, data_buffer, decode_timestamp, output_presentation_timestamp, sample_size, total_sample_size, format_description, sample_timing_info, sample_timing_info_array) - CMFormatDescription: rename get_media_type/get_media_subtype to media_type_raw/media_subtype_raw, remove get_extensions -> extensions - AudioBuffer: get_data_byte_size -> data_byte_size - AudioBufferList: remove get_number_buffers (use num_buffers), get_buffer -> buffer - IOSurface (cm module): already had width/height/bytes_per_row - Update all examples, tests, and documentation
Previously empty stub implementations now properly call ScreenCaptureKit: - set/getIncludesChildWindows (macOS 14.2+) - set/getPresenterOverlayPrivacyAlertSetting (macOS 14.0+) - set/getIgnoresShadowsSingleWindow (macOS 14.0+) These properties now correctly delegate to the underlying SCStreamConfiguration with proper version checks.
Use SCContentFilter.includedWindows/Displays/Applications on macOS 15.2+ instead of relying on KVC which is fragile and may break with SDK updates. Falls back to KVC on older macOS versions for compatibility.
- Implement colorMatrix getter/setter (was stub) - Implement ignoreShadowsDisplay (was stub, maps to correct API) - Add color_matrix() getter to Rust SCStreamConfiguration These properties now properly delegate to ScreenCaptureKit APIs.
Remove with_average_bitrate() from SCRecordingOutputConfiguration as the underlying Apple API does not have an averageBitrate property. This was dead code - the Swift stub did nothing.
- Add FFI data structures (FFIRect, FFIDisplayData, FFIWindowData, FFIApplicationData) - Add batch retrieval functions for displays, windows, applications - Add owned string functions (sc_window_get_title_owned, etc.) - Add ffi_string_owned helper for efficient string transfer - Swift allocates strings with strdup, Rust frees with sc_free_string - Reduces FFI calls for shareable content retrieval
- Add backticks to doc comments for FFI function names - Use #[doc(hidden)] for padding fields instead of underscore prefix - Replace redundant closure with method reference in colors.rs
SCRecordingOutputConfiguration doesn't support bitrate settings directly. Bitrate is controlled by video compression settings in AVFoundation.
- Add module-level clippy allows for complex UI/rendering code - Fix doc-markdown issues (backticks around code terms) - Fix implicit clone issues (use .clone() instead of .to_vec()) - Fix cast precision/truncation issues where appropriate - Fix map_unwrap_or -> is_some_and pattern - Fix manual_let_else pattern - Fix unreadable_literal with separators - Fix unused variables with underscore prefix - Fix collection_is_never_read with assertion - Apply swiftformat to Swift bridge code - Run cargo fmt on all Rust code
- Move leak_test.rs to examples/memory_leak_check.rs - No longer requires --test-threads=1 since it runs as standalone process - Better output formatting with emojis and progress - Update memory_tests.rs header to reference the new example - Memory tests can now run in parallel without issues
- Test all filter types: display exclude/include windows, display exclude/include applications, single window capture - Add audio and microphone (macOS 15+) capture testing - Exercise all SCShareableContent property access - Test multiple configuration variations - Use SharedHandler wrapper to share handler across output types - Track and report sample counts per output type
- Add examples 12-15 to README.md examples list - Add examples 10-15 to lib.rs documentation - Update CHANGELOG with recent changes - Document memory leak example, batch FFI, and Swift boundary improvements
- Add #available checks for macOS 15.0+ APIs (SCRecordingOutput, microphone) - Add #available checks for macOS 14.0+ APIs (screenshot, content picker) - Add #available checks for macOS 14.2+ APIs (menu bar, presenter overlay) - Add #available checks for macOS 13.0+ APIs (audio capture) - Update Package.swift to target macOS 12.3 as minimum - Fixes CI build failures on macOS 13 (Ventura)
- SCScreenshotConfiguration and related types only exist in macOS 26+ SDK - Split SDK detection to support both macOS 15 and macOS 26 SDK checks - Ensures CI builds on older macOS versions without compilation errors
…ibility The .microphone case was only added in macOS 15.0, causing compile errors on older SDKs. Using rawValue == 2 allows compilation on any SDK while still correctly handling the microphone output type at runtime.
…, and Microphone - content_rect() requires macos_14_2 feature - point_pixel_scale() requires macos_14_0 feature - Add wildcard match arm for non-macos_15_0 builds to handle Microphone variant
- Fix method names: presentation_timestamp(), image_buffer(), io_surface() - Fix IOSurface methods: width(), height() (not get_*) - Add macOS 26.0 (Tahoe) to platform requirements
1313
force-pushed
the
release-plz-2025-11-30T15-34-27Z
branch
from
November 30, 2025 15:39
7f98471 to
e87ed1e
Compare
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.
🤖 New release
screencapturekit: 1.2.0 -> 2.0.0Changelog
This PR was generated with release-plz.