|Microsoft DirectX 9.0|
This topic applies to Windows XP Service Pack 1 only.
The ParseXDSBytePair method parses a single byte pair from an XDS stream. If the byte pair is the last pair in a completed ratings packet, the method returns the rating information.
HRESULT ParseXDSBytePair( BYTE byte1, BYTE byte2, EnTvRat_System* pEnSystem, EnTvRat_GenericLevel* pEnLevel, LONG* plBfEnAttributes );
[in] The first byte of the byte pair.
[in] The second byte of the byte pair.
[out] Pointer to a variable that receives the rating system, as a member of the EnTvRat_System enumeration type.
[out] Pointer to a variable that receives the rating level, as a member of the EnTvRat_GenericLevel enumeration type. The meaning of this value depends on the rating system.
[out] Pointer to a variable that receives a bitwise combination of zero or more flags from the BfEnTvRat_GenericAttributes enumeration. These flags specify additional content attributes, such as violence or adult language. They do not apply to every rating system.
The method returns an HRESULT. Possible values include those in the following table.
|S_OK||The method succeeded.|
|S_FALSE||The rating has not changed, or no rating has been detected in the stream yet.|
The XDS Codec filter calls this method to pass XDS data to the XDSToRat object, one pair of bytes at a time. The XDSToRat object must store enough information between calls to be able to parse a complete ratings packet.
This method returns S_FALSE until the XDSToRat object decodes a complete ratings packet. At that point, the method returns S_OK and returns the rating information in the pEnSystem, pEnLevel, and plBfEnAttributes parameters. Subsequent calls return S_FALSE again until the next packet is decoded.
Ratings values may be delivered by either the XDS Content Advisory packet, or the Composite Packet-1 packet. For details, see sections 184.108.40.206 and 220.127.116.11, respectively, of the EIA/CEA-608B specification.
This method should also detect the Current Class Program Identificaton Number and Program Name packets indicating the end of show and return an S_OK value along with the values in the following table.
Return the following values for non-ratings packets.
For details, see section 18.104.22.168.4 (General Content Advisory Requirements) of the EIA/CEA-608-B specification.