copyPlanesToByteArray
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Return
the frame's bytes, or an empty array for a frame that genuinely carries no data (an unreferenced frame, for example)
Throws
if the copy fails
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Return
the frame's bytes, or an empty array for a frame that genuinely carries no data (an unreferenced frame, for example)
Throws
if the copy fails
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Return
the frame's bytes, or an empty array for a frame that genuinely carries no data (an unreferenced frame, for example)
Throws
if the copy fails
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Return
the frame's bytes, or an empty array for a frame that genuinely carries no data (an unreferenced frame, for example)
Throws
if the copy fails
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Return
the frame's bytes, or an empty array for a frame that genuinely carries no data (an unreferenced frame, for example)
Throws
if the copy fails