<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGDisplayStreamCreate",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGDisplayStreamCreate"
  },
  "title" : "CGDisplayStreamCreate"
}
-->

# CGDisplayStreamCreate

```
extern CGDisplayStreamRefCGDisplayStreamCreate(CGDirectDisplayID display, size_t outputWidth, size_t outputHeight, int32_t pixelFormat, CFDictionaryRef properties, CGDisplayStreamFrameAvailableHandler handler);
```

## Parameters

`display`

The CGDirectDisplayID to use as the source for generated frames

`outputWidth`

The output width (in pixels, not points) of the frames to be generated.  Must not be zero.

`outputHeight`

The output height (in pixels, not points) of the frames to be generated.  Must not be zero.

`pixelFormat`

The desired CoreVideo/CoreMedia-style pixel format of the output IOSurfaces.  The currently
supported values are:

`properties`

Any optional properties of the CGDisplayStream

`handler`

A block that will be called for frame deliver.

## Return Value

The new CGDisplayStream object.

## Discussion

\abstract Creates a new CGDisplayStream intended to be used with a CFRunLoop
\discussion This function creates a new CGDisplayStream that is to be used to get a stream of frame updates
from a particular display.

‘BGRA’ Packed Little Endian ARGB8888
‘l10r’ Packed Little Endian ARGB2101010
‘420v’ 2-plane “video” range YCbCr 4:2:0
‘420f’ 2-plane “full” range YCbCr 4:2:0

---

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)