This page describes the exact format used by the MJPEG File object when passing data to another object. The MJPEG Play object expects data to be in this form in so much that each of the buffer chunks described below should exist in the scatterbuffer passed. The order of the buffer chunks is irrelevant.
The MJPEG File object sends each frame in a separate scatter buffer. A scatter buffer list corresponds to sending 1 or more frame. Each scatter buffer has the following buffer chunks:
This buffer chunk consists of:
The buffer chunk type which is:
The length of this chunk which is always 36.
The data in this buffer chunk consists of:
The width field indicates the width of the MPEG frame in pixels.
The height field indicates the height of the MPEG frame in pixels.
The device field indicates the original device that recorded the frame. Legal values include:
The subformat field indicates which MJPEG frame format is used. Possible values are:
The qfactor field indicates the Parallax qfactor associated with this frame. If the frame was not generated by a Parallax board, a heuristic guess for this qfactor should be included here.
The logStart_s field specifies the second's component of the logical start time.
The logStart_ns field specifies the nano-second's component of the logical start time. The logical start time can be constructed as logStart_s + (logStart_ns / ONE_BILLION).
The logEnd_s field specifies the second's component of the logical end time.
The logEnd_ns field specifies the nano-second's component of the logical end time. The logical end time can be constructed as logEnd_s + (logEnd_ns / ONE_BILLION).
The buffer chunk type which is:
The length of this chunk which is variable.
The data for this MJPEG frame. The specific format of the data is indicated by the subformat field in the MJPEG Header.