<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaExtension",
  "identifier" : "/documentation/MediaExtension/MERAWProcessor",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MediaExtension"
    ],
    "preciseIdentifier" : "c:objc(pl)MERAWProcessor"
  },
  "title" : "MERAWProcessor"
}
-->

# MERAWProcessor

A protocol that defines the requirements for a RAW processor.

```
protocol MERAWProcessor : NSObjectProtocol
```

## Overview

This protocol provides an interface for <doc://com.apple.documentation/documentation/VideoToolbox> to create and interact with MediaExtension RAW processors. [`MERAWProcessor`](/documentation/MediaExtension/MERAWProcessor) objects are instantiated by Video Toolbox and are closely linked to a corresponding [`MEVideoDecoder`](/documentation/MediaExtension/MEVideoDecoder) object that produces RAW video output.

> Note:
> Developers who wish to build MediaExtension RAW processors using this API need to include a <doc://com.apple.mediaextension/documentation/MediaExtension/raw-processor-entitlement>, provisioning profile, and specialized dictionary in their Info.plist file when building their extensions.
> 
> For more information, see [Entitlements](https://developer.apple.com/documentation/bundleresources/entitlements), [Create a development provisioning profile](https://developer.apple.com/help/account/manage-provisioning-profiles/create-a-development-provisioning-profile), and <doc://com.apple.mediaextension/documentation/MediaExtension/raw-processor-property-list-dictionary>.

Once a user installs and runs the host app, embedded RAW processor extensions become available to any app on the user’s system that opts in to using them by calling <doc://com.apple.documentation/documentation/VideoToolbox/VTRegisterProfessionalVideoWorkflowVideoDecoders()>.

> Important:
> `MERAWProcessor` objects run in a sandboxed process without access to the filesystem, network, and other kernel resources.

MediaExtension RAW processor’s operation and life cycle closely tie to <doc://com.apple.documentation/documentation/VideoToolbox/VTRAWProcessingSession>.

### Creating a raw processor

An instance of the [`MERAWProcessorExtension`](/documentation/MediaExtension/MERAWProcessorExtension) factory object is created the first time the given processor is opened by Video Toolbox in a process. The [`makeProcessor(formatDescription:pixelBufferManager:)`](/documentation/MediaExtension/MERAWProcessorExtension/makeProcessor(formatDescription:pixelBufferManager:)) method on the [`MERAWProcessorExtension`](/documentation/MediaExtension/MERAWProcessorExtension) object will be called once for each processor instance needed. The processor can evaluate the provided <doc://com.apple.documentation/documentation/CoreMedia/CMVideoFormatDescription> at this point and confirm whether it is able to process the specified format. If the processor cannot process the format, the factory routine should return [`MEError.Code.unsupportedFeature`](/documentation/MediaExtension/MEError-swift.struct/Code/unsupportedFeature). This sequence of calls will happen inside of <doc://com.apple.documentation/documentation/VideoToolbox/VTRAWProcessingSession>.

### Configuring pixel buffer requirements

At any point after instantiation, the processor can call back into the provided [`MERAWProcessorPixelBufferManager`](/documentation/MediaExtension/MERAWProcessorPixelBufferManager) object to notify Video Toolbox of its output pixel buffer requirements. The processor extension may make multiple calls if output requirements change in response to properties being set or due to observed bitstream characteristics.

### Processing frames

Calls to [`processFrame(fromImageBuffer:completionHandler:)`](/documentation/MediaExtension/MERAWProcessor/processFrame(fromImageBuffer:completionHandler:)) are serialized. A new frame is not sent to the processor until the last [`processFrame(fromImageBuffer:completionHandler:)`](/documentation/MediaExtension/MERAWProcessor/processFrame(fromImageBuffer:completionHandler:)) has returned, but may be submitted before the [`processFrame(fromImageBuffer:completionHandler:)`](/documentation/MediaExtension/MERAWProcessor/processFrame(fromImageBuffer:completionHandler:)) completion handler is called if the processing is happening asynchronously. These calls correspond to <doc://com.apple.documentation/documentation/VideoToolbox/VTRAWProcessingSessionProcessFrame> calls on the parent `VTRAWProcessingSession`.

RAW processors must write their output frames into `CVPixelBuffers` allocated through the [`makePixelBuffer()`](/documentation/MediaExtension/MERAWProcessorPixelBufferManager/makePixelBuffer()) interface. Returning <doc://com.apple.documentation/documentation/CoreVideo/cvpixelbuffer-q2e> from any other source may result in degraded performance or other issues.

If the processor’s internal processing queue is full, and it cannot process more frames, it should return <doc://com.apple.documentation/documentation/ObjectiveC/NO> when the [`isReadyForMoreMediaData`](/documentation/MediaExtension/MERAWProcessor/isReadyForMoreMediaData) property is queried. This property should return <doc://com.apple.documentation/documentation/ObjectiveC/YES> again when the processor is able to accept new frames – generally after an earlier asynchronous frame processing operation is completed.

## Topics

### Inspecting a RAW processor

[`metalDeviceRegistryID`](/documentation/MediaExtension/MERAWProcessor/metalDeviceRegistryID)

Requests the processor use the provided Metal device for processing.

[`outputColorAttachments`](/documentation/MediaExtension/MERAWProcessor/outputColorAttachments)

Returns the color-related Core Video image buffer keys and values that become attachments to the output pixel buffers.

[`processingParameters`](/documentation/MediaExtension/MERAWProcessor/processingParameters)

Provides a list of processing parameters that can be changed by the client of Video Toolbox session to influence processing behavior.

[`readyForMoreMediaData`](/documentation/MediaExtension/MERAWProcessor/isReadyForMoreMediaData)

Indicates the readiness of the processor to accept more sample buffers.

### Processing RAW frame

[`-  processFrameFromImageBuffer:completionHandler:`](/documentation/MediaExtension/MERAWProcessor/processFrame(fromImageBuffer:completionHandler:))

Requests the processor to process a video frame.

### Extension requirements

[RAW processor property list dictionary](/documentation/MediaExtension/raw-processor-property-list-dictionary)

Include a property list dictionary to describe a RAW processor.

[RAW processor entitlement](/documentation/MediaExtension/raw-processor-entitlement)

Include an entitlement to indicate your extension is a MediaExtension RAW processor.

### Notifications

[`MERAWProcessorReadyForMoreMediaDataDidChangeNotification`](/documentation/MediaExtension/MERAWProcessorReadyForMoreMediaDataDidChangeNotification)

A notification that indicates a change to the object’s readiness to process additional media data.

[`MERAWProcessorValuesDidChangeNotification`](/documentation/MediaExtension/MERAWProcessorValuesDidChangeNotification)

A notification that indicates a change to the object’s set of available processing parameters.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)