Registry / communication / pyobjc-framework-mediatoolbox

pyobjc-framework-mediatoolbox

JSON →
library12.2pypypiunverified

PyObjC provides Python bindings for Objective-C frameworks on macOS, enabling Python developers to interact with Apple's system APIs. `pyobjc-framework-mediatoolbox` offers wrappers for the MediaToolbox framework, which supports media format readers and audio processing. The library is currently at version 12.1 and maintains an active release cadence, typically aligning with macOS and Python version updates.

pip install pyobjc-framework-mediatoolbox
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-M
P
pyobjc-framework-mediatoolbox
communicationpythonv12.2
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
build_error
glibc
py 3.10–3.920 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MediaToolbox
✓ import MediaToolbox

This quickstart demonstrates successful installation and basic import of the `MediaToolbox` framework, confirming the PyObjC bridge is active. Real-world usage would involve interacting with specific classes and functions provided by Apple's MediaToolbox framework.

import MediaToolbox import Foundation # Simply importing the framework demonstrates it's loadable. # Accessing a generic Objective-C class (e.g., NSObject from Foundation) # via any PyObjC framework binding confirms the bridge is working. # In a real application, you would access MediaToolbox-specific classes or functions # e.g., MediaToolbox.MTAudioProcessingTapCreate # or constants like kCMFormatDescriptionBridgeError_InvalidParameter if exposed via MediaToolbox or an imported dependency. print(f"MediaToolbox module loaded from: {MediaToolbox.__file__}") # Verify that basic PyObjC functionality is available by accessing NSObject # which is part of Foundation, implicitly loaded or linked by most PyObjC frameworks. if hasattr(Foundation, 'NSObject'): print(f"Foundation.NSObject available, indicating PyObjC bridge is active.") else: print("Foundation.NSObject not found, PyObjC bridge might not be fully active.")
Debug
Known issues
breakingPyObjC frequently drops support for older Python versions. PyObjC 12.0 dropped Python 3.9, and PyObjC 11.0 dropped Python 3.8.
fix
Always check the `requires_python` metadata or release notes to ensure compatibility with your Python environment. For PyObjC 12.1, Python >=3.10 is required.
affects: 11.0, 12.0+
breakingPyObjC 11.1 aligned its core bridge with `clang`'s Automatic Reference Counting (ARC) documentation for initializer methods. Methods in the 'init' family now correctly steal a reference to `self` and return a new reference. This can alter memory management behavior for Python subclasses overriding Objective-C initializers.
fix
Review custom `init` implementations in Python subclasses of Objective-C objects. Ensure they correctly handle reference counting semantics, which typically means calling the superclass initializer and returning `self`.
affects: 11.1+
gotchaPyObjC 10.3 initially broke `__init__` usage for Python subclasses of Objective-C classes, particularly when a user implemented `__new__` or when relying on PyObjC's `__new__` behavior. This was partially reverted in 10.3.1 to reintroduce `__init__` support when a user implements `__new__`.
fix
If overriding `__new__` in a Python subclass of an Objective-C object, ensure `__init__` is correctly handled, particularly when upgrading from PyObjC 10.3. Refer to PyObjC documentation on object instantiation and consider using Objective-C style `init` methods (e.g., `initWithFoo_:`) for robustness.
affects: 10.3
breakingIn PyObjC 10.0, the `IMServicePlugIn` bindings were removed as the entire framework was deprecated in macOS 10.13 and removed in macOS 14.
fix
If your application relied on `IMServicePlugIn` bindings, you must refactor your code as the underlying framework is no longer available in modern macOS versions.
affects: 10.0+
gotchaPyObjC 11.0 introduced experimental support for free-threading (PEP 703) with Python 3.13+. While PyObjC protects its own implementation, Apple's frameworks are not necessarily thread-safe (e.g., `NSMutableArray` for concurrent updates, non-atomic properties, GUI classes on non-main threads).
fix
When using free-threading, carefully review thread safety considerations for all interactions with Apple's Objective-C frameworks. Synchronize access to shared mutable Objective-C objects as needed.
affects: 11.0+ (with Python 3.13+)
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredCore bridge for Python to Objective-C, implicitly required by all PyObjC framework bindings.
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
pyobjc-framework-mediatoolbox — pip install pyobjc-framework-mediatoolbox · libregistry