---
title: "CVPixelBufferGetBaseAddress(_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvpixelbuffergetbaseaddress(_:)"
---

# CVPixelBufferGetBaseAddress(_:)

Returns the base address of the pixel buffer.

## Declaration

```swift
func CVPixelBufferGetBaseAddress(_ pixelBuffer: CVPixelBuffer) -> UnsafeMutableRawPointer?
```

## Parameters

- `pixelBuffer`: The pixel buffer whose base address you want to obtain.

## Return Value

Return Value The base address of the pixel buffer.

## Discussion

Discussion The pointer returned by this function depends on the type of buffer and the conditions under which it was created. For chunky buffers, returns a pointer to the pixel at (0,0) in the buffer. For planar buffers, returns a pointer to a CVPlanarComponentInfo structure, or NULL if no such structure is present. Because this function returns NULL for some planar buffers, you should call CVPixelBufferGetBaseAddressOfPlane(_:_:) and CVPixelBufferGetBytesPerRowOfPlane(_:_:) to get information about a planar buffer. Retrieving the base address for a pixel buffer requires that the buffer base address be locked using the CVPixelBufferLockBaseAddress(_:_:) function.

## See Also

### Inspecting Pixel Buffers

- [CVPixelBufferGetBaseAddressOfPlane(_:_:)](corevideo/cvpixelbuffergetbaseaddressofplane(_:_:).md)
- [CVPixelBufferGetBytesPerRow(_:)](corevideo/cvpixelbuffergetbytesperrow(_:).md)
- [CVPixelBufferGetBytesPerRowOfPlane(_:_:)](corevideo/cvpixelbuffergetbytesperrowofplane(_:_:).md)
- [CVPixelBufferGetHeight(_:)](corevideo/cvpixelbuffergetheight(_:).md)
- [CVPixelBufferGetHeightOfPlane(_:_:)](corevideo/cvpixelbuffergetheightofplane(_:_:).md)
- [CVPixelBufferGetWidth(_:)](corevideo/cvpixelbuffergetwidth(_:).md)
- [CVPixelBufferGetWidthOfPlane(_:_:)](corevideo/cvpixelbuffergetwidthofplane(_:_:).md)
- [CVPixelBufferIsPlanar(_:)](corevideo/cvpixelbufferisplanar(_:).md)
- [CVPixelBufferGetPlaneCount(_:)](corevideo/cvpixelbuffergetplanecount(_:).md)
- [CVPixelBufferGetDataSize(_:)](corevideo/cvpixelbuffergetdatasize(_:).md)
- [CVPixelBufferGetPixelFormatType(_:)](corevideo/cvpixelbuffergetpixelformattype(_:).md)
- [CVPixelBufferGetExtendedPixels(_:_:_:_:_:)](corevideo/cvpixelbuffergetextendedpixels(_:_:_:_:_:).md)
- [CVPixelBufferGetIOSurface(_:)](corevideo/cvpixelbuffergetiosurface(_:).md)
- [CVPixelBufferCreateResolvedAttributesDictionary(_:_:_:)](corevideo/cvpixelbuffercreateresolvedattributesdictionary(_:_:_:).md)
- [CVPixelBufferIsCompatibleWithAttributes(_:_:)](corevideo/cvpixelbufferiscompatiblewithattributes(_:_:).md)
