THPSimpleDecode

C Specification

#include "THPSimple.h"
s32 THPSimpleDecode(s32 audioTrack);

Arguments

audioTrack The audio track number to decode.

Return Values

Returns one of the following values.

definition value description
THP_DECODE_OK 0 Decoding was successful.
THP_VIDEO_DECODE_FAIL 1 Decoding failed.
THP_NO_READ_BUFFER 2 Data was not read in time.
THP_NO_AUDIO_BUFFER 3 There is no empty audio buffer.
THP_INVALID_AUDIO_TRACK 4 The THP movie data does not have the specified audio track.

Description

This function extracts THP video data by calling THPVideoDecode, a low-level API in the THP library. In addition, if audio data is interleaved in the THP movie data, this function extracts it by calling THPAudioDecode, another low-level API.

The extracted data is stored inside the simple player.

This function's argument specifies the audio track number (from 0 on) to decode. This indicates the audio track number to play automatically. If the THP movie data does not have audio data, the argument is ignored.

Note: Decoding of the THP audio data is performed by the CPU.

See Also

THPVideoDecode, THPAudioDecode

Revision History

03/01/2006 Initial version.