Platforms to show: All Mac Windows Linux Cross-Platform
Back to CVPixelBufferMBS class.
CVPixelBufferMBS.BaseAddressOfPlane(planeIndex as Integer) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
planeIndex: The index of the plane.
Returns the base address of the plane, or NULL for nonplanar pixel buffers.
Retrieving the base address for a pixel buffer requires that the buffer base address be locked by a successful call to LockBaseAddress.
CVPixelBufferMBS.BytesPerRowOfPlane(planeIndex as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
planeIndex: The index of the plane whose bytes-per-row value you want to obtain.
Returns the number of row bytes of the plane, or nil for nonplanar pixel buffers.
CVPixelBufferMBS.CIImage as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CVPixelBufferMBS.Constructor(pic as picture)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Only for Cocoa target.
This function takes the existing picture and creates a pixelbuffer referencing it. Also we setup the CGContext object and stores it in Context property. Also picture property is set to the current picture.
Implemented for iOS in version 22.3 of MBS Plugin.
See also:
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, pixelBufferAttributes as Dictionary)
CVPixelBufferMBS.Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
width: The width of the pixel buffer, in pixels.
height: The height of the pixel buffer, in pixels.
pixelFormatType: The pixel format identified by its respective four character code
baseAddress: The memoryblock referenced by the PixelBuffer with the data.
bytesPerRow: The row bytes of the pixel storage memory.
pixelBufferAttributes: A Core Foundation dictionary with additional attributes for a pixel buffer. This parameter is optional.
Returns a Core Video result code. See Core Video Constants for possible values.
Some of the parameters specified in this call override equivalent pixel buffer attributes. For example, if you define the kCVPixelBufferWidth and kCVPixelBufferHeight keys in the pixel buffer attributes parameter (pixelBufferAttributes), these values are overridden by the width and height parameters.
See also:
- Constructor(pic as picture)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, pixelBufferAttributes as Dictionary)
CVPixelBufferMBS.Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, pixelBufferAttributes as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
width: Width of the pixel buffer, in pixels.
height: Height of the pixel buffer, in pixels.
pixelFormatType: The pixel format identified by its respective four-character code.
pixelBufferAttributes: A dictionary with additional attributes for a pixel buffer. This parameter is optional.
Raises exception on failure with error code included.
This function allocates the necessary memory based on the pixel dimensions, format, and extended pixels described in the pixel buffer’s attributes.
Some of the parameters specified in this call override equivalent pixel buffer attributes. For example, if you define the kCVPixelBufferWidth and kCVPixelBufferHeight keys in the pixel buffer attributes parameter (pixelBufferAttributes), these values are overridden by the width and height parameters.
See also:
- Constructor(pic as picture)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, pixelBufferAttributes as Dictionary)
CVPixelBufferMBS.Constructor(Width as Integer, Height as Integer, PixelFormat as String, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
width: The width of the pixel buffer, in pixels.
height: The height of the pixel buffer, in pixels.
pixelFormatType: The pixel format identified by its respective four character code
baseAddress: The memoryblock referenced by the PixelBuffer with the data.
bytesPerRow: The row bytes of the pixel storage memory.
pixelBufferAttributes: A Core Foundation dictionary with additional attributes for a pixel buffer. This parameter is optional.
Returns a Core Video result code. See Core Video Constants for possible values.
Some of the parameters specified in this call override equivalent pixel buffer attributes. For example, if you define the kCVPixelBufferWidth and kCVPixelBufferHeight keys in the pixel buffer attributes parameter (pixelBufferAttributes), these values are overridden by the width and height parameters.
See also:
- Constructor(pic as picture)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, pixelBufferAttributes as Dictionary)
CVPixelBufferMBS.Constructor(Width as Integer, Height as Integer, PixelFormat as String, pixelBufferAttributes as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
width: Width of the pixel buffer, in pixels.
height: Height of the pixel buffer, in pixels.
pixelFormatType: The pixel format identified by its respective four-character code.
pixelBufferAttributes: A dictionary with additional attributes for a pixel buffer. This parameter is optional.
Raises exception on failure with error code included.
This function allocates the necessary memory based on the pixel dimensions, format, and extended pixels described in the pixel buffer’s attributes.
Some of the parameters specified in this call override equivalent pixel buffer attributes. For example, if you define the kCVPixelBufferWidth and kCVPixelBufferHeight keys in the pixel buffer attributes parameter (pixelBufferAttributes), these values are overridden by the width and height parameters.
See also:
- Constructor(pic as picture)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as Integer, pixelBufferAttributes as Dictionary)
- Constructor(Width as Integer, Height as Integer, PixelFormat as String, data as MemoryBlock, bytesPerRow as Integer, pixelBufferAttributes as Dictionary)
CVPixelBufferMBS.FillExtendedPixels
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This function replicates edge pixels to fill the entire extended region of the image.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Anything not yet drawn is drawn now.
CVPixelBufferMBS.GetExtendedPixels(byref extraColumnsOnLeft as Integer, byref extraColumnsOnRight as Integer, byref extraRowsOnTop as Integer, byref extraRowsOnBottom as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
extraColumnsOnLeft: On output, the pixel row padding to the left.
extraColumnsOnRight: On output, the pixel row padding to the right.
extraRowsOnTop: On output, the pixel row padding to the top.
extraRowsOnBottom: On output, the pixel row padding to the bottom.
CVPixelBufferMBS.HeightOfPlane(planeIndex as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
planeIndex: The index of the plane.
Returns the height of the buffer, in pixels, or 0 for nonplanar pixel buffers.
CVPixelBufferMBS.LockBaseAddress(flags as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
lockFlags: You can pass zero or kLockReadonly.
CVPixelBufferMBS.PixelData as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns nil in case of error.
Works only on non planar pixel buffers.
CVPixelBufferMBS.SetPixelData(data as MemoryBlock) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns false in case of error and true for success.
Works only on non planar pixel buffers.
CVPixelBufferMBS.UnlockBaseAddress(flags as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CVPixelBufferMBS.WidthOfPlane(planeIndex as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
pixelBuffer: The pixel buffer whose plane width you want to obtain.
planeIndex: The plane index that contains the plane's width value.
Returns the width of the plane, in pixels, or 0 for nonplanar pixel buffers.
The items on this page are in the following plugins: MBS AVFoundation Plugin.