PyObjC CoreMediaIO Framework

12.1 · active · verified Tue Apr 14

PyObjC-framework-CoreMediaIO provides Python wrappers for the CoreMediaIO framework on macOS, allowing Python applications to interact with system audio and video I/O devices. This library is part of the larger PyObjC project, which frequently updates its framework bindings in conjunction with new macOS SDK releases to ensure compatibility and expose new APIs.

Warnings

Install

Imports

Quickstart

Demonstrates how to import the CoreMediaIO framework and access a fundamental constant. Due to CoreMediaIO being a C-based API framework, complex interactions often require understanding PyObjC's handling of C functions, pointers, and structs.

import CoreMediaIO
import os

# CoreMediaIO is a low-level C API framework, primarily dealing with constants, 
# functions, and structs. This quickstart demonstrates importing the framework 
# and accessing a fundamental system object constant to confirm setup.

# Check if the kCMIOObjectSystemObject constant is available
if hasattr(CoreMediaIO, 'kCMIOObjectSystemObject'):
    system_object_id = CoreMediaIO.kCMIOObjectSystemObject
    print(f"CoreMediaIO.kCMIOObjectSystemObject found: {system_object_id}")
else:
    print("CoreMediaIO.kCMIOObjectSystemObject not found, framework might not be fully loaded or API changed.")

# Note: More complex interactions with CoreMediaIO (e.g., enumerating devices,
# getting property data) typically involve Objective-C C-style function calls
# requiring knowledge of `objc` bridge types (like pointers and structs).
# Refer to Apple's CoreMediaIO documentation and PyObjC examples for advanced usage.

view raw JSON →