CODECINIFILEINFO
This structure contains information about a CODEC entry in the MMPMMMIO.INI file. Each entry describes a CODEC that can be used system. Some CODECs might have several entries in the MMPMMMIO.INI file. This structure is used on the mmioIniFileCODEC function.
typedef struct _CODECINIFILEINFO {
ULONG ulStructLen; /* Length of this structure. */
FOURCC fcc; /* File format ID. */
CHAR szDLLName[DLLNAME_SIZE]; /* DLL name string. */
CHAR szProcName[PROCNAME_SIZE]; /* Procedure name string. */
ULONG ulCompressType; /* Compression type. */
ULONG ulCompressSubType; /* Compression subtype. */
ULONG ulMediaType; /* Media type. */
ULONG ulCapsFlags; /* Capabilities flags. */
ULONG ulFlags; /* Reserved. */
CHAR szHWID[CODEC_HW_NAME_SIZE]; /* Hardware adapter name. */
ULONG ulMaxSrcBufLen; /* Maximum source buffer length. */
ULONG ulSyncMethod; /* Synchronization method. */
ULONG ulReserved1; /* Reserved. */
ULONG ulXalignment; /* Byte alignment of starting address. */
ULONG ulYalignment; /* Top left Y pixel alignment. */
ULONG ulSpecInfo[CODEC_INFO_SIZE]; /* Contains CODEC-specific info. */
} CODECINIFILEINFO;
typedef CODECINIFILEINFO * PCODECINIFILEINFO ;
- ulStructLen (ULONG)
- This field indicates the length of the CODECINIFILEINFO structure.
- fcc (FOURCC)
- The character code that identifies the file format (for example, AVI).
- szDLLName[DLLNAME_SIZE] (CHAR)
- The DLL file name of the CODEC Proc.
- szProcName[PROCNAME_SIZE] (CHAR)
- The entry procedure name of the CODEC Proc.
- ulCompressType (ULONG)
- Specifies the compression type. For example, the TIFF file format has defined 2 for CCITT G3 modified Huffman run-length encoding, 5 for LZW compression.
- ulCompressSubType (ULONG)
- Specifies the compression subtype. For example, the TIFF file format has defined 6 as the compression type for JPEG, 1 as the compression subtype for Baseline Sequential Process, and 14 as the compression subtype for Lossless Process with Huffman Coding.
- ulMediaType (ULONG)
- Indicates the media type of the CODEC Proc (for example, image, audio, video or plain data). Following are the currently defined types:
- MMIO_MEDIATYPE_DIGITALVIDEO
- Video media type.
- ulCapsFlags (ULONG)
- Indicates the capabilities supported by the CODEC Proc. Following are capabilities are defined for video.
CODEC_COMPRESS
Can compress.
CODEC_DECOMPRESS
Can decompress.
CODEC_WINDOW_CLIPPING
Supports clipping.
CODEC_PALETTE_TRANS
Supports palette translation.
CODEC_SELFHEAL
Supports self healing data stream.
CODEC_SCALE_PEL_HALVED
Supports pel halving of the source image.
CODEC_SCALE_CONTINUOUS
Supports continuous scaling or stretching.
CODEC_MULAPERTURE
Indicates the CODEC Proc supports multi-aperture algorithm. If this bit is off, fixed aperture is assumed.
CODEC_4_BIT_COLOR
Indicates the CODEC Proc supports 16 colors.
CODEC_8_BIT_COLOR
Indicates the CODEC Proc supports 256 colors.
CODEC_16_BIT_COLOR
Indicates the CODEC Proc supports 65536 colors.
CODEC_24_BIT_COLOR
Indicates the CODEC Proc supports 16777216 colors.
CODEC_HARDWARE
Indicates the CODEC Proc is hardware assisted and the name of the hardware is contained in the szHWID field. CODEC_SYMMETRIC
Indicates the CODEC Proc supports symmetric record.
CODEC_ASYMMETRIC
Indicates the CODEC Proc supports asymmetric record.
CODEC_DIRECT_DISPLAY
Indicates the CODEC Proc can directly compress into the video RAM.
CODEC_DEFAULT
Indicates this CODEC entry will be loaded as a default when multiple CODEC entries for the same algorithm are installed in the initialization file. This allows the application to select the best CODEC for performance.
CODEC_ORIGIN_LOWERLEFT
Indicates the CODEC Proc will decompress data to the destination buffer using the lower left as window origin. The compressed data lines will be stored in reverse order in the destination buffer. Must be set when CODEC_WINDOW_CLIPPING or CODEC_DIRECT_DISPLAY are not set to allow Presentation Manager to display data correctly.
CODEC_ORIGIN_UPPERLEFT
Indicates the CODEC Proc will decompress data to the destination buffer using the upper left as window origin. This means that decompressed data lines will be stored in the same order as the incoming compressed data lines.
CODEC_SET_QUALITY
Indicates the CODEC Proc supports the quality level setting. See the MMVIDEOOPEN structure for details.
CODEC_DATA_CONSTRAINT
Indicates the CODEC Proc supports the data constraint and interval setting. See the MMVIDEOOPEN structure for details.
- ulFlags (ULONG)
- Reserved for future use and must be set to zero.
- szHWID[CODEC_HW_NAME_SIZE] (CHAR)
- A null-terminated hardware adapter name string associated with CODEC.
- ulMaxSrcBufLen (ULONG)
- Indicates the maximum source buffer length in bytes the CODEC Proc can handle. Zero indicates unlimited size.
- ulSyncMethod (ULONG)
- Indicates the synchronization methods supported by the CODEC Proc. The following methods are currently defined for video.
- CODEC_SYNC_METHOD_NO_DROP_FRAMES
The CODEC will not be requested to drop frames. That is, the MMIO_DROP_DELTA_FRAME flag will not be set, even if video is behind. CODECs with this synchronization method will not maintain audio synchronization if there are insufficient processing resources to decompress and display data in real time. Factors contributing to this situation include computational complexity of the CODEC during decompression, hardware capabilities such as processor speed, bus speed, video I/O (memory wait state) speed, and other processes running in the system contending for processor resources at potentially higher priority levels. Continuity of the audio soundtrack playback is not assured using CODECs with synchronization method zero. CODEC_SYNC_METHOD_DROP_FRAMES_IMMEDIATELY
The MMIO_DROP_DELTA_FRAME flag will be set whenever video is behind by more than a threshold. It is up to the CODEC implementation to determine the appropriate action to take when the MMIO_DROP_DELTA_FRAME flag is set. CODECs that are unable to drop individual delta frames within a delta frame sequence may choose to decompress the data but forgo display of the decompressed data to reduce processing complexity in an attempt to "catch up." Such an approach should be used, only to a certain extent, to ensure continuity of the audio soundtrack playback. That is, if the reduction in processing complexity is not sufficient to get caught up, and if drop frame requests continue to occur on consecutive frames, then the CODEC should further reduce its processing complexity by dropping frames completely until the next key frame. CODEC_SYNC_METHOD_DROP_FRAMES_PRECEDING_KEY
The MMIO__DROP_DELTA_FRAME flag will be set whenever video is behind by more than a threshold, at points in the stream where the time remaining to the next key frame is less than or equal to the time interval by which the video is behind. In most cases, the effect of this method is that only delta frames preceding key frames are dropped. If the video falls behind and no key frames are encountered within two seconds in the data stream, delta frames will be dropped without regard to key frame proximity. If the video falls behind and the data stream contains consecutive key frames, key frames will be dropped.
- ulReserved1 (ULONG)
- Reserved for future use and must be set to zero.
- ulXalignment (ULONG)
- Indicates the top byte alignment of the starting address of the video window. This field is valid only when CODEC_MULAPERATURE and CODEC_DIRECT_DISPLAY are set. It is required for the system to place the top left corner of the video window on the specified boundary so the decompressor can improve performance. For example, 2 means the starting video memory address is on the word boundary. If 0 is specified, then 1-byte is assumed.
- ulYalignment (ULONG)
- Indicates the top byte alignment of the starting address of the video window. This field is valid only when CODEC_MULAPERATURE and CODEC_DIRECT_DISPLAY are set. This information is provided by the block-oriented decompressor to allow the system to position the top left video window corner on a specific scan boundary to avoid dividing it between two 64KB apertures. The remainder of the 64 is divided by the ulAlignment and scale factor (for example, 2 for pel doubling) must be 0. This field is ignored when CODEC_SCALE_CONTINUOUS is specified.
- ulSpecInfo[CODEC_INFO_SIZE] (ULONG)
- Contains the CODEC-specific information.