1:
CVPixelBufferGetWidth(_:The pixel buffer whose width you want to obtain)
获取解码后图像宽度
CVPixelBufferGetWidthOfPlane(pixel_:,0/1_:)
Returns the width of the plane at a given index in the pixel buffer.
(1)pixelBuffer
-
The pixel buffer whose plane width you want to obtain.
(2)planeIndex
-
The plane index that contains the plane’s width value.
在iOS硬解码获取图像宽高的时候上边两个函数一般是一致的
但是 :CVPixelBufferGetBytesPerRowOfPlane(pixel,index)
这个函数获取到的行数有可能就跟上边的宽度不一样。出现在某些刘海屏iPhone手机