<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMetricEventStream",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMetricEventStream"
  },
  "title" : "AVMetricEventStream"
}
-->

# AVMetricEventStream

An object that allows clients to add publishers and then subscribe to specific metric event classes from those publishers.

```
@interface AVMetricEventStream : NSObject
```

## Overview

Publishers are [`AVFoundation`](/documentation/AVFoundation) types that adopt [`AVMetricEventStreamPublisher`](/documentation/AVFoundation/AVMetricEventStreamPublisher). The protocol allows clients to receive metric events with a subscriber delegate which adopts the [`AVMetricEventStreamSubscriber`](/documentation/AVFoundation/AVMetricEventStreamSubscriber) protocol.

## Topics

### Getting the event stream

[`+  eventStream`](/documentation/AVFoundation/AVMetricEventStream/eventStream)

### Adding a publisher

[`-  addPublisher:`](/documentation/AVFoundation/AVMetricEventStream/addPublisher:)

### Subscribing to events

[`-  subscribeToAllMetricEvents`](/documentation/AVFoundation/AVMetricEventStream/subscribeToAllMetricEvents)

[`-  subscribeToMetricEvent:`](/documentation/AVFoundation/AVMetricEventStream/subscribeToMetricEvent:)

[`-  subscribeToMetricEvents:`](/documentation/AVFoundation/AVMetricEventStream/subscribeToMetricEvents:)

### Setting a subscriber

[`-  setSubscriber:queue:`](/documentation/AVFoundation/AVMetricEventStream/setSubscriber:queue:)

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)