This page describes the exact format used by the MPEG File object when passing data to another object. The MPEG 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 MPEG 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:
In addition, the following buffer chunks are sent if needed:
This buffer chunk consists of:
The buffer chunk type which is:
The length of this chunk which is always 52.
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 type field indicates the type of the MPEG frame (1=I, 2=P, 3=B).
The ref1 field indicates the index number of the past reference if needed.
The ref2 field indicates the index number of the future reference if needed.
The intra_matrix_flag indicates whether or not a non-standard intraframe quantization matrix is used. If non-zero, the intra quant matrix buffer chunk should be present.
The non_intra_matrix_flag indicates whether or not a non-standard non-intraframe quantization matrix is used. If non-zero, the non-intra quant matrix buffer chunk should be present.
The index field specifies the index number of this frame. If this frame is a reference frames, other frames will identify it with this index number.
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 displayFlag indicates whether the frame should be displayed or whether the frame was sent only as a reference for some other frame and should not be displayed, but only decoded. A value of 1 indicates that the frame should be displayed.
The buffer chunk type which is:
The length of this chunk which is variable.
The data for this MPEG frame.
The following two chunks are only sent if the appropriate flags are set in the MPEG Buffer Header.
The buffer chunk type which is:
The length of this chunk which is always 256.
The data in this chunk is 64, 4 byte MSB integers. These 64 integers constitute the intraframe matrix quantization table to be used for this frame. The matrix is sent in zigzag order.
The buffer chunk type which is:
The length of this chunk which is always 256.
The data in this chunk is 64, 4 byte MSB integers. These 64 integers constitute the non-intraframe matrix quantization table to be used for this frame. The matrix is sent in zigzag order.