CRI Sofdec2  Last Updated: 2022-11-21 16:25 p

Data Structures

struct  CriManaEventPoint
 Event point information. More...
 
struct  CriManaCuePointInfo
 Cuepoint information. More...
 
struct  CriManaPlayerConfig
 Configuration structure for player creation. More...
 
struct  CriManaPlaybackVideoParams
 Video-related playback parameters. More...
 
struct  CriManaPlaybackAudioParams
 Audio-related playback parameters. More...
 
struct  CriManaPlaybackSubtitleParams
 Subtitle-related playback parameters. More...
 
struct  CriManaPlaybackAlphaParams
 Alpha channel parameters. More...
 
struct  CriManaPlaybackBasicWorkConfig
 Playback work parameter structure (basic) More...
 
struct  CriManaPlaybackExWorkConfig
 Playback work parameter structure (extended) More...
 
struct  CriManaAudioInfo
 Audio parameters. More...
 
struct  CriManaVideoInfo
 Video parameters. More...
 
struct  CriManaAlphaInfo
 Alpha parameters. More...
 
struct  CriManaMovieInfo
 Movie information structure. More...
 
struct  CriManaImageBufferInfo
 Image information. More...
 
struct  CriManaFrameInfo
 Video frame information. More...
 
struct  CriManaTextureBuffer
 Texture buffer structure. More...
 
struct  CriManaTextureBuffersYUV
 YUV texture buffer structure. More...
 

Macros

#define CRIMANA_MAX_VIDEO_NUM   (1)
 Maximum number of video streams in a movie file. More...
 
#define CRIMANA_MAX_AUDIO_NUM   (32)
 Maximum number of audio streams in a movie file. More...
 
#define CRIMANA_MAX_ALPHA_NUM   (1)
 Maximum number of alpha streams in a movie file. More...
 
#define CRIMANA_AUDIO_TRACK_OFF   (-1)
 Specified value for turning off audio playback. More...
 
#define CRIMANA_AUDIO_TRACK_AUTO   (100)
 Default value for audio tracks. More...
 
#define CRIMANA_MAX_SUBTITLE_NUM   (16)
 Maximum number of subtitle channels. More...
 
#define CRIMANA_MAX_FILE_NAME   (256)
 Maximum file name length that can be specified in the Mana player. More...
 
#define criManaPlayer_SetDefaultHandleConfig(p_config)
 Set default values for the player creation config structure. More...
 

Typedefs

typedef CriManaPlayerObj * CriManaPlayerHn
 Player handle. More...
 
typedef void(* CriManaPlayerDataRequestCbFunc) (void *obj, CriManaPlayerHn player)
 Data request callback function. More...
 
typedef void(* CriManaPlayerCuePointCbFunc) (void *obj, CriManaPlayerHn player, CriManaEventPoint *eventinfo)
 Cuepoint callback function. More...
 

Enumerations

enum  CriManaPlayerStatus {
  CRIMANAPLAYER_STATUS_STOP = 0 , CRIMANAPLAYER_STATUS_DECHDR = 1 , CRIMANAPLAYER_STATUS_WAIT_PREP = 2 , CRIMANAPLAYER_STATUS_PREP = 3 ,
  CRIMANAPLAYER_STATUS_READY = 4 , CRIMANAPLAYER_STATUS_PLAYING = 5 , CRIMANAPLAYER_STATUS_PLAYEND = 6 , CRIMANAPLAYER_STATUS_ERROR = 7 ,
  CRIMANAPLAYER_STATUS_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Player status. More...
 
enum  CriManaTimerType {
  CRIMANAPLAYER_TIMER_NONE =0 , CRIMANAPLAYER_TIMER_SYSTEM =1 , CRIMANAPLAYER_TIMER_AUDIO =2 , CRIMANAPLAYER_TIMER_USER =3 ,
  CRIMANAPLAYER_TIMER_MANUAL =4 , CRIMANAPLAYER_TIMER_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Timer type. More...
 
enum  CriManaVideoCodecType { CRIMANA_VIDEO_CODEC_UNKNOWN = 0 , CRIMANA_VIDEO_CODEC_SOFDEC_PRIME = 1 , CRIMANA_VIDEO_CODEC_H264 = 5 , CRIMANA_VIDEO_CODEC_VP9 = 9 , CRIMANA_VIDEO_CODEC_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Video codec types. More...
 
enum  CriManaAudioCodecType { CRIMANA_AUDIO_CODEC_UNKNOWN = 0 , CRIMANA_AUDIO_CODEC_ADX = 2 , CRIMANA_AUDIO_CODEC_HCA = 4 , CRIMANA_AUDIO_CODEC_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Audio codec types. More...
 
enum  CriManaAlphaType {
  CRIMANA_COMPO_OPAQ = 0 , CRIMANA_COMPO_ALPHFULL = 1 , CRIMANA_COMPO_ALPH3STEP = 2 , CRIMANA_COMPO_ALPH32BIT = 3 ,
  CRIMANA_COMPO_ALPH1BIT = 4 , CRIMANA_COMPO_ALPH2BIT = 5 , CRIMANA_COMPO_ALPH3BIT = 6 , CRIMANA_COMPO_ALPH4BIT = 7 ,
  CRIMANA_COMPO_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Alpha movie composition mode. More...
 
enum  CriManaMetaFlag { CRIMANA_META_FLAG_NONE = 0x0000 , CRIMANA_META_FLAG_CUE = 0x0001 , CRIMANA_META_FLAG_SEEK = 0x0002 , CRIMANA_META_FLAG_ALL = CRIMANA_META_FLAG_CUE | CRIMANA_META_FLAG_SEEK , CRIMANA_META_FLAG_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Flags used by meta data [currently not supported]. More...
 
enum  CriManaReferFrameResult { CRIMANA_REFER_RESULT_OK = 0 , CRIMANA_REFER_RESULT_SHORT_INPUT = 1 , CRIMANA_REFER_RESULT_SHORT_CPUTIME = 2 , CRIMANA_REFER_RESULT_NO_MORE_KEEP = 3 , CRIMANA_REFER_RESULT_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 ReferFrame frame reference results (debug information) More...
 
enum  CriManaColorSpaceConversionType
 Color conversion types. More...
 
enum  CriManaPlayerMovieEventSyncMode { CRIMANAPLAYER_EVENT_SYNC_FRAME_TIME = 0 , CRIMANAPLAYER_EVENT_SYNC_PLAYBACK_TIME = 1 , CRIMANAPLAYER_EVENT_SYNC_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Sync mode for movie events (cue points, subtitles) More...
 

Functions

CriSint32 criManaPlayer_CalculateHandleWorkSize (void)
 Calculate ManaPlayer work area size (no config specified) More...
 
CriSint32 criManaPlayer_CalculateHandleWorkSizeWithConfig (const CriManaPlayerConfig *config)
 Calculate ManaPlayer work area size (config specified) More...
 
CriManaPlayerHn criManaPlayer_Create (void *work, CriSint32 work_size)
 Create Mana player (no config specified) More...
 
CriManaPlayerHn criManaPlayer_CreateWithConfig (const CriManaPlayerConfig *config, void *work, CriSint32 work_size)
 Create Mana player (config specified) More...
 
void criManaPlayer_Destroy (CriManaPlayerHn player)
 Destroy the Mana player. More...
 
void criManaPlayer_SetMetaDataWorkAllocator (CriManaPlayerHn player, CriManaMetaMallocFunc allocfunc, CriManaMetaFreeFunc freefunc, void *obj, CriManaMetaFlag meta_flag)
 Register meta data allocator. More...
 
CriBool criManaPlayer_GetPlaybackWorkParam (CriManaPlayerHn player, CriManaPlaybackBasicWorkConfig *config_basic, CriManaPlaybackExWorkConfig *config_ex)
 Get playback work parameter structure. More...
 
CriSint32 criManaPlayer_CalculatePlaybackWorkSize (CriManaPlayerHn player, const CriManaPlaybackBasicWorkConfig *config_basic, const CriManaPlaybackExWorkConfig *config_ex)
 Calculate playback work area size. More...
 
void criManaPlayer_SetPlaybackWork (CriManaPlayerHn player, const CriManaPlaybackBasicWorkConfig *config_basic, const CriManaPlaybackExWorkConfig *config_ex, void *work, CriSint32 work_size)
 Set playback work area. More...
 
void criManaPlayer_FreePlaybackWork (CriManaPlayerHn player)
 Release playback work. More...
 
CriManaPlayerStatus criManaPlayer_GetStatus (CriManaPlayerHn player)
 Get the Mana player status. More...
 
void criManaPlayer_ExecuteMain (CriManaPlayerHn player)
 Execute Mana player server processing. More...
 
void criManaPlayer_SyncMasterTimer (CriManaPlayerHn player)
 Synchronize with the master timer. More...
 
void criManaPlayer_SetMasterTimerType (CriManaPlayerHn player, CriManaTimerType type)
 Set master timer type. More...
 
CriManaTimerType criManaPlayer_GetMasterTimerType (CriManaPlayerHn player)
 Get master timer type. More...
 
void criManaPlayer_SetUserTime (CriManaPlayerHn player, CriUint64 user_count, CriUint64 user_unit)
 Set the user timer time to the master timer time. More...
 
void criManaPlayer_SetManualTimerUnit (CriManaPlayerHn player, CriUint64 timer_manual_unit_n, CriUint64 timer_manual_unit_d)
 Set unit of manual timer time advancement (rational number format) More...
 
void criManaPlayer_AdvanceManualTimer (CriManaPlayerHn player)
 Advance manual timer time (count value) More...
 
CriBool criManaPlayer_ExecuteVideoProcess (CriManaPlayerHn player)
 Video decoding. More...
 
void criManaPlayer_SetFile (CriManaPlayerHn player, CriFsBinderHn bndrhn, const CriChar8 *path)
 Set movie file. More...
 
void criManaPlayer_SetData (CriManaPlayerHn player, const void *dataptr, CriSint64 datasize)
 Set data for memory playback. More...
 
void criManaPlayer_SetContentId (CriManaPlayerHn player, CriFsBinderHn bndrhn, CriSint32 id)
 Set movie file to play (specify CPK Content ID) More...
 
void criManaPlayer_SetFileRange (CriManaPlayerHn player, const CriChar8 *fname, CriUint64 offset, CriSint64 range)
 Specify the movie file in the pack file (specify file range) More...
 
void criManaPlayer_SetPreviousDataAgain (CriManaPlayerHn player)
 Reset the same movie data. More...
 
CriBool criManaPlayer_GetMovieInfo (CriManaPlayerHn player, CriManaMovieInfo *mvinf)
 Get movie header information. More...
 
void criManaPlayer_DecodeHeader (CriManaPlayerHn player)
 Request header decoding. More...
 
void criManaPlayer_Prepare (CriManaPlayerHn player)
 Request playback preparation. More...
 
void criManaPlayer_Start (CriManaPlayerHn player)
 Start playback. More...
 
void criManaPlayer_Stop (CriManaPlayerHn player)
 Requests play to stop. More...
 
void criManaPlayer_StopAndWaitCompletion (CriManaPlayerHn player)
 Stop playback (complete return API) More...
 
void criManaPlayer_Pause (CriManaPlayerHn player, CriBool sw)
 Switch play pause. More...
 
CriBool criManaPlayer_IsPaused (CriManaPlayerHn player)
 Get play pause status. More...
 
void criManaPlayer_Loop (CriManaPlayerHn player, CriBool sw)
 Switch play loop. More...
 
void criManaPlayer_GetTime (CriManaPlayerHn player, CriUint64 *count, CriUint64 *unit)
 Get playback time. More...
 
CriSint32 criManaPlayer_GetInputBufferSize (CriManaPlayerHn player)
 Get input buffer size. More...
 
CriSint32 criManaPlayer_GetInputBufferRemainSize (CriManaPlayerHn player)
 Get amount of remaining data in input buffer. More...
 
void criManaPlayer_SetNumberOfFramePools (CriManaPlayerHn player, CriUint32 npools)
 Specify the number of internal video buffers (frame pools) More...
 
void criManaPlayer_SetBufferingTime (CriManaPlayerHn player, CriFloat32 sec)
 Specify input data buffering time. More...
 
void criManaPlayer_SetMinBufferSize (CriManaPlayerHn player, CriUint32 min_buffer_size)
 Specify minimum buffer size. More...
 
void criManaPlayer_SetFileStreamingFlag (CriManaPlayerHn player, CriBool streaming_flag)
 Set streaming flag. More...
 
void criManaPlayer_SetMaxMovieSize (CriManaPlayerHn player, CriSint32 max_width, CriSint32 max_height)
 Specify maximum resolution. More...
 
void criManaPlayer_SetMaxPictureDataSize (CriManaPlayerHn player, CriUint32 max_data_size)
 Specify maximum resolution. More...
 
void criManaPlayer_ExecuteAutoSkip (CriManaPlayerHn player, CriManaFrameInfo *frame_info)
 Execute decision to automatically skip a decoded frame. More...
 
void criManaPlayer_SetAudioTrack (CriManaPlayerHn player, CriSint32 track)
 Set the main audio track number. More...
 
void criManaPlayer_SetSubAudioTrack (CriManaPlayerHn player, CriSint32 track)
 Set the subaudio track number. More...
 
void criManaPlayer_SetExtraAudioTrack (CriManaPlayerHn player, CriSint32 track)
 Set the extra audio track index. More...
 
void criManaPlayer_SetVolume (CriManaPlayerHn player, CriFloat32 volume)
 Set audio volume (main audio track) More...
 
CriFloat32 criManaPlayer_GetVolume (CriManaPlayerHn player)
 Get audio volume (main audio track) More...
 
CriAtomExPlayerHn criManaPlayer_GetAtomExPlayerByTrackId (CriManaPlayerHn player, CriUint32 track_id)
 Get AtomExPlayerHn. More...
 
void criManaPlayer_SetSubAudioVolume (CriManaPlayerHn player, CriFloat32 volume)
 Set audio volume (subaudio track) More...
 
CriFloat32 criManaPlayer_GetSubAudioVolume (CriManaPlayerHn player)
 Get audio volume (subaudio track) More...
 
void criManaPlayer_SetExtraAudioVolume (CriManaPlayerHn player, CriFloat32 volume)
 Set the audio volume of the extra audio track. More...
 
CriFloat32 criManaPlayer_GetExtraAudioVolume (CriManaPlayerHn player)
 Get the audio volume of the extra audio track. More...
 
void criManaPlayer_SetPan (CriManaPlayerHn player, CriSint32 ch, CriFloat32 pan)
 Get 2D pan (main audio track) More...
 
CriFloat32 criManaPlayer_GetPan (CriManaPlayerHn player, CriSint32 ch)
 Get 2D pan (main audio track) More...
 
void criManaPlayer_ResetSendLevel (CriManaPlayerHn player)
 Reset send level (main audio track) More...
 
void criManaPlayer_SetSendLevel (CriManaPlayerHn player, CriSint32 ch, CriAtomSpeakerId spk, CriFloat32 level)
 Set send level (main audio track) More...
 
void criManaPlayer_ResetSubAudioSendLevel (CriManaPlayerHn player)
 Reset send level (subaudio track) More...
 
void criManaPlayer_SetSubAudioSendLevel (CriManaPlayerHn player, CriSint32 ch, CriAtomSpeakerId spk, CriFloat32 level)
 Set send level (subaudio track) More...
 
void criManaPlayer_ResetExtraAudioSendLevel (CriManaPlayerHn player)
 Reset the send level of the extra audio track. More...
 
void criManaPlayer_SetExtraAudioSendLevel (CriManaPlayerHn player, CriSint32 ch, CriAtomSpeakerId spk, CriFloat32 level)
 Set the send level of the extra audio track. More...
 
void criManaPlayer_SetBusSendLevelByName (CriManaPlayerHn player, const CriChar8 *bus_name, CriFloat32 level)
 Set bus send level (main audio track) More...
 
void criManaPlayer_SetSubAudioBusSendLevelByName (CriManaPlayerHn player, const CriChar8 *bus_name, CriFloat32 level)
 Set bus send level (sub audio track) More...
 
void criManaPlayer_SetExtraAudioBusSendLevelByName (CriManaPlayerHn player, const CriChar8 *bus_name, CriFloat32 level)
 Set the bus send level of the extra audio track. More...
 
void criManaPlayer_ResetBusSendLevelAll (CriManaPlayerHn player)
 Bus send level reset (all tracks) More...
 
void criManaPlayer_SetSoundRendererType (CriManaPlayerHn player, CriAtomSoundRendererType sound_renderer_type)
 Set sound renderer type. More...
 
void criManaPlayer_SetAsrRackId (CriManaPlayerHn player, CriSint32 asr_rack_id)
 Set the ASR rack ID. More...
 
CriBool criManaPlayer_ReferFrame (CriManaPlayerHn player, CriManaFrameInfo *frame_info)
 Refer to decoded frame information. More...
 
CriBool criManaPlayer_IsFrameOnTime (CriManaPlayerHn player, const CriManaFrameInfo *frame_info)
 Determine frame time. More...
 
CriBool criManaPlayer_KeepFrame (CriManaPlayerHn player, CriManaFrameInfo *frame_info)
 Keep frame. More...
 
CriSint32 criManaPlayer_GetNumberOfKeepFrames (CriManaPlayerHn player)
 Get the number of kept frames. More...
 
void criManaPlayer_CopyFrameToBufferARGB32 (CriManaPlayerHn player, const CriManaFrameInfo *frame_info, CriManaTextureBuffer *frame_buf)
 Get decoding results (32bit ARGB format) More...
 
void criManaPlayer_CopyFrameToBuffersYUV (CriManaPlayerHn player, const CriManaFrameInfo *frame_info, CriManaTextureBuffersYUV *frame_buf)
 Get decoding results (YUV individual buffer format) More...
 
void criManaPlayer_DiscardFrame (CriManaPlayerHn player, const CriManaFrameInfo *frame_info)
 Release frame. More...
 
void criManaPlayer_DiscardOneKeepFrame (CriManaPlayerHn player)
 Release frame. More...
 
void criManaPlayer_SetDataRequestCallback (CriManaPlayerHn player, CriManaPlayerDataRequestCbFunc func, void *obj)
 Register data request callback. More...
 
void criManaPlayer_DeferCallback (CriManaPlayerHn player)
 Request to re-execute the data request callback. More...
 
void criManaPlayer_SetSeekPosition (CriManaPlayerHn player, CriSint32 seek_frame_no)
 Set seek position. More...
 
void criManaPlayer_SetMovieEventSyncMode (CriManaPlayerHn player, CriManaPlayerMovieEventSyncMode mode)
 Set the sync mode of movie events. More...
 
void criManaPlayer_SetSubtitleChannel (CriManaPlayerHn player, CriSint32 channel)
 Get subtitle channel. More...
 
CriUint32 criManaPlayer_GetSubtitleOnTime (CriManaPlayerHn player, CriUint8 *bufptr, CriUint32 bufsize)
 Get subtitles. More...
 
CriManaCuePointInfocriManaPlayer_GetCuePointInfo (CriManaPlayerHn player)
 Get a list of Cuepoint information. More...
 
void criManaPlayer_SetCuePointCallback (CriManaPlayerHn player, CriManaPlayerCuePointCbFunc func, void *obj)
 Set Cuepoint callback. More...
 
CriSint32 criManaPlayer_CalcFrameNoFromTime (CriManaPlayerHn player, CriUint64 count, CriUint64 unit)
 Calculate frame number from playback time. More...
 
CriUint64 criManaPlayer_CalcTimeFromFrameNo (CriManaPlayerHn player, CriSint32 frame_no, CriUint64 unit)
 Calculate playback time from the frame number. More...
 
CriSint32 criManaPlayer_SearchNextEventPointByTime (CriManaPlayerHn player, CriUint64 count, CriUint64 unit, CriSint32 type, CriManaEventPoint *eventinfo)
 Search event point directly after a specified time. More...
 
CriSint32 criManaPlayer_SearchPrevEventPointByTime (CriManaPlayerHn player, CriUint64 count, CriUint64 unit, CriSint32 type, CriManaEventPoint *eventinfo)
 Search event point directly before a specified time. More...
 
void criManaPlayer_SetSpeed (CriManaPlayerHn player, CriSint32 speed_numerator, CriSint32 speed_denominator)
 Set playback speed. More...
 
void criManaPlayer_SetDecodeMode (CriManaPlayerHn player, CriManaDecodeMode mode)
 Set decode operation mode. More...
 
CriSint32 criManaPlayer_CalculateExtDecoderWorkSize (CriManaPlayerHn player, const CriManaPlaybackBasicWorkConfig *config_basic, const CriManaPlaybackExWorkConfig *config_ex)
 Calculate extended decoder work area size. More...
 
void criManaPlayer_SetExtDecoderWork (CriManaPlayerHn player, const CriManaPlaybackBasicWorkConfig *config_basic, const CriManaPlaybackExWorkConfig *config_ex, void *work, CriSint32 work_size)
 Set extended decoder work area. More...
 
void criManaPlayer_SetNumberOfFramesForPrep (CriManaPlayerHn player, CriUint32 num_frames)
 Set number of frames stored during playback preparation. More...
 

Detailed Description

Macro Definition Documentation

◆ CRIMANA_MAX_VIDEO_NUM

#define CRIMANA_MAX_VIDEO_NUM   (1)

Maximum number of video streams in a movie file.

Description:
See also
CriManaMovieInfo, criManaPlayer_GetMovieInfo

◆ CRIMANA_MAX_AUDIO_NUM

#define CRIMANA_MAX_AUDIO_NUM   (32)

Maximum number of audio streams in a movie file.

Description:
See also
CriManaMovieInfo, criManaPlayer_GetMovieInfo

◆ CRIMANA_MAX_ALPHA_NUM

#define CRIMANA_MAX_ALPHA_NUM   (1)

Maximum number of alpha streams in a movie file.

Description:
See also
CriManaMovieInfo, criManaPlayer_GetMovieInfo

◆ CRIMANA_AUDIO_TRACK_OFF

#define CRIMANA_AUDIO_TRACK_OFF   (-1)

Specified value for turning off audio playback.

Description:
See also
criManaPlayer_SetAudioTrack

◆ CRIMANA_AUDIO_TRACK_AUTO

#define CRIMANA_AUDIO_TRACK_AUTO   (100)

Default value for audio tracks.

See also
criManaPlayer_SetAudioTrack

◆ CRIMANA_MAX_SUBTITLE_NUM

#define CRIMANA_MAX_SUBTITLE_NUM   (16)

Maximum number of subtitle channels.

See also
CRIMANA_MAX_VIDEO_NUM, CRIMANA_MAX_AUDIO_NUM

◆ CRIMANA_MAX_FILE_NAME

#define CRIMANA_MAX_FILE_NAME   (256)

Maximum file name length that can be specified in the Mana player.

See also
criManaPlayer_SetFile

◆ criManaPlayer_SetDefaultHandleConfig

#define criManaPlayer_SetDefaultHandleConfig (   p_config)
Value:
{\
(p_config)->readbuf_size_byte = 0;\
(p_config)->use_atomex_player = CRI_FALSE;\
(p_config)->max_path = CRIMANA_MAX_FILE_NAME;\
}
#define CRIMANA_MAX_FILE_NAME
Maximum file name length that can be specified in the Mana player.
Definition: cri_mana.h:112

Set default values for the player creation config structure.

Parameters
[out]p_configPointer to the player creation config structure
Description:
Sets the default values for the config structure ( CriManaPlayerConfig ) that will be set to the criManaPlayer_CreateWithConfig function.
See also
criManaPlayer_CreateWithConfig

Typedef Documentation

◆ CriManaPlayerHn

typedef CriManaPlayerObj* CriManaPlayerHn

Player handle.

Description:
CriManaPlayerHn is a handle to operate the player that was created for video playback.
When you create a player for video playback using the criManaPlayer_Create function the function will return this "Mana player handle" for player operation.
Operations for the player, such as setting data, start playback, and getting the status are all executed through the Mana player handle.
See also
criManaPlayer_Create

◆ CriManaPlayerDataRequestCbFunc

typedef void( * CriManaPlayerDataRequestCbFunc) (void *obj, CriManaPlayerHn player)

Data request callback function.

Parameters
[in]objUser specified object
[in]playerMana player handle
Description:
Callback function for specifying the next movie to play. Used to seamlessly concatenate multiple movie files to play.
Use criManaPlayer_SetDataRequestCallback to register the callback function.

◆ CriManaPlayerCuePointCbFunc

typedef void( * CriManaPlayerCuePointCbFunc) (void *obj, CriManaPlayerHn player, CriManaEventPoint *eventinfo)

Cuepoint callback function.

Parameters
[in]objUser specified object
[in]playerMana player handle
[in]eventinfoCuepoint event information
Description:
Callback function executed when a Cuepoint (timing information) embedded in a movie occurs.
Use the criManaPlayer_SetCuePointCallback function to register a callback function.

Enumeration Type Documentation

◆ CriManaPlayerStatus

Player status.

Description:
This value shows the status of the Mana player playback. You can get the handle status anytime with the criManaPlayer_GetStatus function.
The handle will be in CRIMANAPLAYER_STOP status directly after creation.

The handle status will transition in order from CRIMANAPLAYER_STATUS_STOP to CRIMANAPLAYER_STATUS_PLAYEND.
The application will not necessarily need to check the status of everything when playing a movie.
As long as it at least checks CRIMANAPLAYER_STATUS_STOP, CRIMANAPLAYER_STATUS_PLAYING, CRIMANAPLAYER_STATUS_PLAYEND, and CRIMANAPLAYER_STATUS_ERROR, then the movie can be played back.

If the movie resolution has already been determined after the Mana player has been created, then the application can directly call the criManaPlayer_Start function. In this situation, the handle status will automatically transition to CRIMANAPLAYER_STATUS_PLAYEND.

When the criManaPlayer_DecodeHeader function is first called, the handle status will become CRIMANAPLAYER_STATUS_WAIT_PREP after header analysis is complete. The application will then wait until the criManaPlayer_Prepare function or the criManaPlayer_Start function can be called from the application.

You can get movie information using the criManaPlayer_GetMovieInfo function once it is in the CRIMANAPLAYER_STATUS_WAIT_PREP status.
When calling the criManaPlayer_Prepare function, once header analysis and data buffering is complete the handle status will become CRIMANAPLAYER_STATUS_READY and it will wait until the criManaPlayer_Start function can be called from the application. You can use this to adjust the start playback timing.

The status will automatically become CRIMANAPLAYER_STATUS_PLAYEND once playback is finished.

When the criManaPlayer_Stop function is called, it will become the CRIMANAPLAYER_STATUS_STOP status once the decoder has stopped. It will not always stop directly after the criManaPlayer_Stop function is finished.

If a problem such as insufficient memory or a data error occurs, it will become the CRIMANAPLAYER_STATUS_ERROR status.
If it has become CRIMANAPLAYER_STATUS_ERROR status, call the criManaPlayer_Stop function and let the handle status transition to CRIMANAPLAYER_STATUS_STOP.

The criManaPlayer_Destroy function can be called only when in the CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
See also
criManaPlayer_GetStatus
Enumerator
CRIMANAPLAYER_STATUS_STOP 

Stopped

CRIMANAPLAYER_STATUS_DECHDR 

Header analysis

CRIMANAPLAYER_STATUS_WAIT_PREP 

Buffering start or stop

CRIMANAPLAYER_STATUS_PREP 

Preparing for playback

CRIMANAPLAYER_STATUS_READY 

Waiting for playback

CRIMANAPLAYER_STATUS_PLAYING 

Playing

CRIMANAPLAYER_STATUS_PLAYEND 

Playback is finished

CRIMANAPLAYER_STATUS_ERROR 

Error

◆ CriManaTimerType

Timer type.

Description:
The type of reference timer (master timer) that the Mana synchronizes as internal time.
See also
criManaPlayer_SetMasterTimerType, criManaPlayer_GetMasterTimerType
Enumerator
CRIMANAPLAYER_TIMER_NONE 

It does not synchronize video frame times.

CRIMANAPLAYER_TIMER_SYSTEM 

The video frame is synchronized to the system time used within the

CRIMANAPLAYER_TIMER_AUDIO 

The video frame is synchronized to the audio time played by the main audio track.

CRIMANAPLAYER_TIMER_USER 

Synchronizes to the user's own timer specified by the application.

CRIMANAPLAYER_TIMER_MANUAL 

Manual type: This mode sets the unit of time advancement from the application

◆ CriManaVideoCodecType

Video codec types.

Description:
Types of video codecs that can be included in movies that are played back. Only Sofdec.Prime (previously the Sofdec codec) is currently supported.
See also
CriManaVideoInfo, CriManaMovieInfo, criManaPlayer_GetMovieInfo
Enumerator
CRIMANA_VIDEO_CODEC_UNKNOWN 

Unknown

CRIMANA_VIDEO_CODEC_SOFDEC_PRIME 

Sofdec.Prime

CRIMANA_VIDEO_CODEC_H264 

H.264/AVC

CRIMANA_VIDEO_CODEC_VP9 

VP9

◆ CriManaAudioCodecType

Audio codec types.

Description:
Types of audio codecs that can be included in movies that are played back. Only the ADX codec is currently supported.
See also
CriManaAudioInfo, CriManaMovieInfo, criManaPlayer_GetMovieInfo
Enumerator
CRIMANA_AUDIO_CODEC_UNKNOWN 

Unknown

CRIMANA_AUDIO_CODEC_ADX 

Advanced ADX

CRIMANA_AUDIO_CODEC_HCA 

HCA

◆ CriManaAlphaType

Alpha movie composition mode.

Description:
See also
CriManaPlaybackAlphaParams, CriManaAlphaInfo, CriManaFrameInfo, criManaPlayer_IsFrameOnTime, criManaPlayer_ReferFrame, criManaPlayer_DiscardFrame criManaPlayer_CopyFrameToBufferARGB32, criManaPlayer_CopyFrameToBuffersYUV
Enumerator
CRIMANA_COMPO_OPAQ 

Opaque, no alpha information

CRIMANA_COMPO_ALPHFULL 

Full Alpha composition (alpha data is 8 bit)

CRIMANA_COMPO_ALPH3STEP 

3 alpha

CRIMANA_COMPO_ALPH32BIT 

Full Alpha, (color and alpha data is 32 bit)

CRIMANA_COMPO_ALPH1BIT 

Full Alpha, (color and alpha data is 32 bit, a value is 2)

CRIMANA_COMPO_ALPH2BIT 

Full Alpha, (color and alpha data is 32 bit, a value is 4)

CRIMANA_COMPO_ALPH3BIT 

Full Alpha, (color and alpha data is 32 bit, a value is 8)

CRIMANA_COMPO_ALPH4BIT 

Full Alpha, (color and alpha data is 32 bit, a value is 16)

◆ CriManaMetaFlag

Flags used by meta data [currently not supported].

Description:
These flags control what class of meta data you want to use. Currently control for each type of flag is not supported. When using seek play back or Cuepoints, specify the CRIMANA_META_FLAG_ALL.
See also
criManaPlayer_SetMetaDataWorkAllocator
Enumerator
CRIMANA_META_FLAG_NONE 

Do not use meta data

CRIMANA_META_FLAG_CUE 

Unsupported

CRIMANA_META_FLAG_SEEK 

Unsupported

CRIMANA_META_FLAG_ALL 

Use all meta data formats

◆ CriManaReferFrameResult

ReferFrame frame reference results (debug information)

Description:
Displays reference results for decoded video frames. Use these parameters as references when debugging.
See also
CriManaFrameInfo criManaPlayer_IsFrameOnTime, criManaPlayer_ReferFrame, criManaPlayer_DiscardFrame, criManaPlayer_CopyFrameToBufferARGB32, criManaPlayer_CopyFrameToBuffersYUV
Enumerator
CRIMANA_REFER_RESULT_OK 

Successful frame reference

CRIMANA_REFER_RESULT_SHORT_INPUT 

Insufficient data in input buffer

CRIMANA_REFER_RESULT_SHORT_CPUTIME 

Insufficient CPU time for decoding

CRIMANA_REFER_RESULT_NO_MORE_KEEP 

There are no frames that can be kept

◆ CriManaColorSpaceConversionType

Color conversion types.

Description:
See also
CriManaVideoInfo,CriManaAlphaInfo,CriManaFrameInfo

◆ CriManaPlayerMovieEventSyncMode

Sync mode for movie events (cue points, subtitles)

Description:
Sync mode for movie events.
See also
criManaPlayer_SetMovieEventSyncMode
Enumerator
CRIMANAPLAYER_EVENT_SYNC_FRAME_TIME 

Movie events are synchronized to the frame time (getting video frame).

CRIMANAPLAYER_EVENT_SYNC_PLAYBACK_TIME 

Movie events are synchronized to the playback time (playback time based on timer type).

Function Documentation

◆ criManaPlayer_CalculateHandleWorkSize()

CriSint32 criManaPlayer_CalculateHandleWorkSize ( void  )

Calculate ManaPlayer work area size (no config specified)

Returns
CriSint32 Handle work size
Call conditions:
This is thread safe.
Description:
Gets the work area size necessary for creating the Mana library.
The work memory size necessary for creating the Mana player differs by platform.
See also
criManaPlayer_Create

◆ criManaPlayer_CalculateHandleWorkSizeWithConfig()

CriSint32 criManaPlayer_CalculateHandleWorkSizeWithConfig ( const CriManaPlayerConfig config)

Calculate ManaPlayer work area size (config specified)

Parameters
[in]configPointer to the config structure for creating a Mana player handle
Returns
CriSint32 Handle work size
Call conditions:
This is thread safe.
Description:
Gets the work area size necessary for creating the Mana library.
Unlike the criManaPlayer_CalculateHandleWorkSize, calculates work size based on the handle creation parameters.
Allocate more memory than the work size calculated with this function and specify it in criManaPlayer_CreateWithConfig.
Notes:
The work memory size necessary for creating the Mana player will differ by platform, even if the parameters are the same.
See also
criManaPlayer_CreateWithConfig, criManaPlayer_SetDefaultHandleConfig

◆ criManaPlayer_Create()

CriManaPlayerHn criManaPlayer_Create ( void *  work,
CriSint32  work_size 
)

Create Mana player (no config specified)

Parameters
[in]workWork area address (align internally)
[in]work_sizeWork area size
Returns
CriManaPlayerHn Mana player handle
Call conditions:
Library initialization is complete.

This is not thread safe.
Description:
Creates a Mana player.

When creating the player, you will need to allocate the memory area (work area) so that the library can use it internally.
When expressly allocating memory on the application side, confirm the necessary work size using the criManaPlayer_CalculateHandleWorkSize function and pass the allocated work memory into the argument.
When specifying NULL in work and zero in work_size, it will use the memory allocation function registered by the criMana_SetUserAllocator function and allocate memory internally.
Notes:
Apart from the handle resources of the movie decoder, it consumes the loader handle (CriFsLoader) for loading data for streaming, and resources for file opening.
If you have a large number of streaming video and audio (default: more than 16), apart from the AtomEx/Mana library, you must first set and initialize the parameters of the File System initialization configuration (number of loader handles, maximum number of file opens).
See also
criManaPlayer_CalculateHandleWorkSize, criManaPlayer_Destroy

◆ criManaPlayer_CreateWithConfig()

CriManaPlayerHn criManaPlayer_CreateWithConfig ( const CriManaPlayerConfig config,
void *  work,
CriSint32  work_size 
)

Create Mana player (config specified)

Parameters
[in]configPointer to the config structure for creating a Mana player handle
[in]workWork area address (align internally)
[in]work_sizeWork area size
Returns
CriManaPlayerHn Mana player handle
Call conditions:
Library initialization is complete.

This is not thread safe.
Description:
Specifies the handle creation parameters and creates the Mana player.
The player that was created will allocate only as many internal resources as are necessary according to the parameters.

When creating the player, you will need to allocate the memory area (work area) so that the library can use it internally.
When expressly allocating memory on the application side, confirm the necessary work size using the criManaPlayer_CalculateHandleWorkSizeWithConfig function and pass the allocated work memory into the argument.
When specifying NULL in work and zero in work_size, it will use the memory allocation function registered by the criMana_SetUserAllocator function and allocate memory internally.

Attention
When adjusting the handle creation parameters and creating a Mana player handle, only movies that satisfy the conditions of the handle creation parameters can be played using this handle.
However, there are benefits to this, such as there being little delay in movies starting.
See also
criManaPlayer_CalculateHandleWorkSizeWithConfig, criManaPlayer_Destroy

◆ criManaPlayer_Destroy()

void criManaPlayer_Destroy ( CriManaPlayerHn  player)

Destroy the Mana player.

Parameters
[in]playerMana player handle
Call conditions:
When player status is CRIMANAPLAYER_STSTUS_STOP or CRIMANAPLAYER_STSTUS_PLAYEND.

This is not thread safe.
Description:
Destroys the Mana player.
When this function is executed, it will destroy all resources allocated when the AtomEx player was created.
It will also disable the Mana player handle that was specified in the argument.
Release the work memory that was set with the criManaPlayer_Create function after executing this function. Release the memory internally with this function if the work memory was not passed on the application side and memory was allocated on the library side.
See also
criManaPlayer_Create

◆ criManaPlayer_SetMetaDataWorkAllocator()

void criManaPlayer_SetMetaDataWorkAllocator ( CriManaPlayerHn  player,
CriManaMetaMallocFunc  allocfunc,
CriManaMetaFreeFunc  freefunc,
void *  obj,
CriManaMetaFlag  meta_flag 
)

Register meta data allocator.

Parameters
[in]playerMana player handle
[in]allocfuncMeta data work allocation callback function
[in]freefuncMeta data work release callback function
[in]objUser object (optional)
[in]meta_flagUsed meta flag (unsupported)
Call conditions:
Call this function before analyzing the header.

This is not thread safe.
Description:
Set a memory allocator (memory allocation/release function) to allocate the meta data necessary for seek and Cuepoint functions.
When registering a memory allocator with this function, the meta data work allocator registered in the library when the header was analyzed will be used to allocate meta data work.

Conversely, it will automatically destroy the meta data if this function is not executed. In this situation, be aware that seek and Cuepoint functions cannot be used.
Notes:
Currently, the setting by meta data type using meta_flag cannot be used. Use CRIMANA_META_FLAG_ALL.

Also, you do not need to re-register an allocator when reusing a handle to play a movie.
Caution:
The registered memory allocator may be called by multiple threads. Register a multi-thread safe allocator.
See also
CriManaMetaMallocFunc, CriManaMetaFreeFunc

◆ criManaPlayer_GetPlaybackWorkParam()

CriBool criManaPlayer_GetPlaybackWorkParam ( CriManaPlayerHn  player,
CriManaPlaybackBasicWorkConfig config_basic,
CriManaPlaybackExWorkConfig config_ex 
)

Get playback work parameter structure.

Parameters
[in]playerMana player handle
[out]config_basicPointer to the basic playback work parameters (required)
[out]config_exPointer to the extended playback work parameters (additional) - can be specified as NULL
Returns
CriBool indicating wether the work parameters have been retrieved.
Will return CRI_FALSE if the header has not been analyzed.
Call conditions:
Finish header analysis and call when the status is CRIMANAPLAYER_STATUS_WAIT_PREP.

This function is not thread safe.
Description:
Gets the default playback parameters for movie playback based on the movie file header data.

Calling this function when the header has not yet been analyzed will clear the content of config_basic and config_ex.

When not playing sub audio or alpha movies, you can set config_ex to NULL and omit this.
Caution:
When sub audio playback is performed, please set the audio track before calling this API.
If you set the audio track after calling this API, the playback work size of the audio can not be calculated correctly, and setting the playback work area may fail.

◆ criManaPlayer_CalculatePlaybackWorkSize()

CriSint32 criManaPlayer_CalculatePlaybackWorkSize ( CriManaPlayerHn  player,
const CriManaPlaybackBasicWorkConfig config_basic,
const CriManaPlaybackExWorkConfig config_ex 
)

Calculate playback work area size.

Parameters
[in]playerMana player handle
[in]config_basicPointer to the basic playback work parameters (required)
[in]config_exPointer to the extended playback work parameters (additional) can be specified as NULL
Returns
CriSint32 Playback work size
Call conditions:
This is thread safe.
Description:
Calculates the size of the work memory required to play the specified movie file.
When config_ex is passed as NULL, it will return a size that excludes the extended play work memory.

◆ criManaPlayer_SetPlaybackWork()

void criManaPlayer_SetPlaybackWork ( CriManaPlayerHn  player,
const CriManaPlaybackBasicWorkConfig config_basic,
const CriManaPlaybackExWorkConfig config_ex,
void *  work,
CriSint32  work_size 
)

Set playback work area.

Parameters
[in]playerMana player handle
[in]config_basicPointer to the basic playback work parameters (required)
[in]config_exPointer to the extended playback work parameters (additional) can be specified as NULL
[in]workWork area allocated by the app (automatically aligned internally)
[in]work_sizeWork size
Call conditions:
Call when the status is CRIMANAPLAYER_STATUS_WAIT_PREP or before.

This is not thread safe.
Description:
Sets the work memory required to play the specified movie file.

When memory has been expressly allocated on the application side, check the necessary work size with the criManaPlayer_CalculatePlaybackWorkSize function and pass the allocated work memory into the argument.
When specifying NULL in work and zero in work_size, it will use the memory allocation function registered by the criMana_SetUserAllocator function and allocate memory internally.
Starting a playback without executing this function will automatically use the default play parameters internally to play. In this case, a memory allocator needs to be registered with the criMana_SetUserAllocator function in advance.
Release the set work area after destroying the player handle. When releasing the work area after finishing playback or stopping playback, call the criManaPlayer_FreePlaybackWork function and then release the memory.
See also
criManaPlayer_CalculatePlaybackWorkSize

◆ criManaPlayer_FreePlaybackWork()

void criManaPlayer_FreePlaybackWork ( CriManaPlayerHn  player)

Release playback work.

Parameters
[in]playerMana player handle
Call conditions:
Execute this function when in the MANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
Calling this function during playback will result in error.
This is not thread safe.
Description:
Releases the playback work memory and internal resources when allocating or keeping player handles internally.

When registering a user allocator and allocating playback work, release the playback work memory internally with this function through the allocator.

Executing this function will prevent access to the playback work memory from the player handle. When passing the playback work memory from the applications, it is possible to release the memory after calling this function.

◆ criManaPlayer_GetStatus()

CriManaPlayerStatus criManaPlayer_GetStatus ( CriManaPlayerHn  player)

Get the Mana player status.

Parameters
[in]playerMana player handle
Returns
CriManaPlayerStatus Mana player handle status
Call conditions:
This is not thread safe.
Description:
Gets the Mana player status.
See also
CriManaPlayerStatus

◆ criManaPlayer_ExecuteMain()

void criManaPlayer_ExecuteMain ( CriManaPlayerHn  player)

Execute Mana player server processing.

Parameters
[in]playerMana player handle
Call conditions:
This is not thread safe.
Description:
Updates the internal status of the Mana player handle.

When calling the criMana_ExecuteMain function with the application, this function will automatically be called internally so there is no need to execute it.

◆ criManaPlayer_SyncMasterTimer()

void criManaPlayer_SyncMasterTimer ( CriManaPlayerHn  player)

Synchronize with the master timer.

Parameters
[in]playerMana player handle
Call conditions:
This is not thread safe.
Description:
Synchronizes the Mana player handle time with the master timer.
At a minimum, this function needs to be called in a shorter cycle than the video frame rate.
When calling the criMana_SyncMasterTimer function with the application, this function will automatically be called internally so there is no need to execute it.

◆ criManaPlayer_SetMasterTimerType()

void criManaPlayer_SetMasterTimerType ( CriManaPlayerHn  player,
CriManaTimerType  type 
)

Set master timer type.

Parameters
[in]playerMana player handle
[in]typeMaster timer type
Call conditions:
This is thread safe.
Description:
Sets the timer type used in managing video frame time.
The default is the system timer specified during handle creation.
Specify the audio timer if you want to synchronize the video frame display timing with the audio time.
Even if you specify the audio timer, if there is no audio included in the movie to play back then it will synchronize with the system timer. If you want the video frame display timing to be synchronized with any timer other than the movie's audio track, specify a user timer.
If you specify a user timer, it will be synchronized with respect to the user timer, regardless of whether the movie contains audio or not.
Remarks:
If you specify an audio timer or user timer, the master timer will calculate the time internally and update the time with respect to the audio timer or user timer.
I.e. criManaPlayer_GetTime returns the updated time each time it is called, except when the movie is paused, even if the audio timer or user timer is not advancing the time.
See also
criMana_SyncMasterTimer, criManaPlayer_SyncMasterTimer

◆ criManaPlayer_GetMasterTimerType()

CriManaTimerType criManaPlayer_GetMasterTimerType ( CriManaPlayerHn  player)

Get master timer type.

Parameters
[in]playerMana player handle
Returns
CriManaTimerType Current master timer type
Call conditions:
This is thread safe.
Description:
Gets the master timer type that is currently set.

◆ criManaPlayer_SetUserTime()

void criManaPlayer_SetUserTime ( CriManaPlayerHn  player,
CriUint64  user_count,
CriUint64  user_unit 
)

Set the user timer time to the master timer time.

Parameters
[in]playerMana player handle
[in]user_countUser Timer Count
[in]user_unitUser timer count per second. Use "user_count / user_unit" to set the time in seconds.
Call conditions:
This is NOT thread safe.
Description:
Set the user timer time to the master timer time.
To advance movie playback with the user timer, call this function periodically, and then call criMana_SyncMasterTimer or criMana_SyncMasterTimer.
When pausing the movie, pause the user timer at the same time or do not call this function.
Notes:
If you advance the user timer by fast forward or slow, the master timer accuracy will deteriorate and it will be difficult to obtain frames at the correct time.
See also
criMana_SyncMasterTimer, criManaPlayer_SyncMasterTimer, criManaPlayer_SetMasterTimerType

◆ criManaPlayer_SetManualTimerUnit()

void criManaPlayer_SetManualTimerUnit ( CriManaPlayerHn  player,
CriUint64  timer_manual_unit_n,
CriUint64  timer_manual_unit_d 
)

Set unit of manual timer time advancement (rational number format)

Parameters
[in]playerMana player handle
[in]timer_manual_unit_nNumerator of unit of time advancement.
[in]timer_manual_unit_dDenominator of unit of time advancement.
Call conditions:
This is not thread safe.
Description:
Sets the unit of time advancement in the manual timer in a rational number format. It will be "Numerator (timer_manual_unit_n) / Denominator (timer_manual_unit_d) = Unit of time advancement (second)." See the following setting example.
Setting example
Main loop (app refresh rate) Numerator (timer_manual_unit_n) Denominator (timer_manual_unit_d) Unit of time advancement
60 fps 1 60 1 / 60 (=~ 16.6 msec)
59.94 fps 1001 60000 1001 / 60000 (=~ 16.7 msec)
30 fps 1 30 1 / 30 (=~ 33.3 msec)
29.97 fps 1001 30000 1001 / 30000 (=~ 33.4 msec)

Internal Mana player time will be calculated using the values set with this function and the count value advanced by the criMana_AdvanceManualTimer function or the criManaPlayer_AdvanceManualTimer function.

See also
criMana_AdvanceManualTimer, criManaPlayer_AdvanceManualTimer

◆ criManaPlayer_AdvanceManualTimer()

void criManaPlayer_AdvanceManualTimer ( CriManaPlayerHn  player)

Advance manual timer time (count value)

Parameters
[in]playerMana player handle
Call conditions:
This is not thread safe.
Description:
Advances individual handle time (count time) in the manual timer. You will need to periodically call this function with the application to proceed with movie playback in the master timer.
  • Advances time when the player status is PLAYING.
  • Time will not advance if paused, even if this function is called.
  • Time (count value) will reset to zero when starting or stopping movie playback.
See also
criManaPlayer_SetManualTimerUnit

◆ criManaPlayer_ExecuteVideoProcess()

CriBool criManaPlayer_ExecuteVideoProcess ( CriManaPlayerHn  player)

Video decoding.

Parameters
[in]playerMana player handle
Returns
CriBool CRI_TRUE during movie playback and CRI_FALSE when playback finishes or stops
Call conditions:
This is thread safe.
Description:
Will decode one picture of the Mana player handle.
Picture decoding is a heavy load process, so processing slowdown may occur if it is called from the application's main thread.
In this situation, either set it to a multi-thread framework or call this function from a different low priority thread.

When calling the criMana_ExecuteVideoProcess function, this function is automatically called internally so you do not need to use it. Also, when it is operating on a multi-thread framework, no decoding will occur even if this function is called.
The return value for this function will show whether the movie is being played or not.
If you call this function with a different thread on the application side, always continue to call it until it becomes CRI_FALSE.
Finishing thread decoding while the return value is CRI_TRUE will not let the handle status transition to CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND, and the handle will not be able to be destroyed.

◆ criManaPlayer_SetFile()

void criManaPlayer_SetFile ( CriManaPlayerHn  player,
CriFsBinderHn  bndrhn,
const CriChar8 *  path 
)

Set movie file.

Parameters
[in]playerMana player handle
[in]bndrhnBinder handle for bound CPK files
[in]pathContent path in CPK file
Call conditions:
Execute this function when in the CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
Or, you can call it within the data request callback.
This is not thread safe.
Description:
Sets the file path for streaming.
You can play a movie from a CPK file by specifying the binder handle for the bound CPK file to the second argument bndhn. Specify NULL to the bndhn to stream directly from a file instead of from the CPK.

Repeatedly calling this function will overwrite the memory information.
Calling the criManaPlayer_SetData function will erase the memory information specified by this function from the handle.

You can omit calling this function if you are repeatedly playing the same movie data with the same handle.

◆ criManaPlayer_SetData()

void criManaPlayer_SetData ( CriManaPlayerHn  player,
const void *  dataptr,
CriSint64  datasize 
)

Set data for memory playback.

Parameters
[in]playerMana player handle
[in]dataptrBuffer address for all the movie data that has finished loading
[in]datasizeBuffer size
Call conditions:
Execute this function when in the CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
You can also call it from within the data request callback.

This function is not thread safe.
Description:
Sets the address of the data to use for memory playback.

Repeatedly calling this function will overwrite the memory information.
Calling the criManaPlayer_SetFile function , the criManaPlayer_SetFileRange function or the criManaPlayer_SetContentId function will erase the memory information specified with this function.

It is not necessary to call this function if you are repeatedly playing the same movie data with the same handle.

Actual access to the specified memory area will happen after either the criManaPlayer_DecodeHeader function, the criManaPlayer_Prepare function, or the criManaPlayer_Start function is called.
Notes:
If the specified buffer is larger than the movie data size, it will skip reading any non-movie data at the end of the buffer. However, you always have to specify the correct begining of the movie data for the buffer address.

◆ criManaPlayer_SetContentId()

void criManaPlayer_SetContentId ( CriManaPlayerHn  player,
CriFsBinderHn  bndrhn,
CriSint32  id 
)

Set movie file to play (specify CPK Content ID)

Parameters
[in]playerMana player handle
[in]bndrhnBinder handle for bound CPK
[in]idContent ID in CPK file
Call conditions:
Execute this function when in the CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
Or, you can call it within the data request callback.
This is not thread safe.
Description:
Sets the file path for streaming.
You can play a movie from a CPK file by specifying the binder handle for the bound CPK file to the second argument bndhn. Specify NULL to the bndhn to stream directly from a file instead of from the CPK.

Repeatedly calling this function will overwrite the memory information.
Calling the criManaPlayer_SetData function will erase the memory information specified by this function from the handle.

You can omit calling this function if you are repeatedly playing the same movie data with the same handle.

◆ criManaPlayer_SetFileRange()

void criManaPlayer_SetFileRange ( CriManaPlayerHn  player,
const CriChar8 *  fname,
CriUint64  offset,
CriSint64  range 
)

Specify the movie file in the pack file (specify file range)

Parameters
[in]playerMana player handle
[in]fnameBuffer file path that includes the movie file
[in]offsetOffset to the movie from the pack file beginning
[in]rangeMovie data range (unit: byte)
Call conditions:
Execute this function when in the CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
Or, you can call it within the data request callback.

This is not thread safe.
Description:
Specifies the packed file for the movie file that you want to stream. By specifying the offset position and data range in the argument, you can set any movie data in the buffer file as the read source. The maximum length of the string that you can specify as a file path is CRIMANA_MAX_FILE_NAME bytes.

Repeatedly calling this function will overwrite the memory information.
Calling the criManaPlayer_SetData function will erase the memory information specified by this function from the handle.

You can omit calling this function if you are repeatedly playing the same movie data with the same handle.
Notes:
A file open request is not made within this function. To open a file, call either the criManaPlayer_DecodeHeader function, the criManaPlayer_Prepare function, or the criManaPlayer_Start function and open it in the criManaPlayer_ExecuteMain function.

◆ criManaPlayer_SetPreviousDataAgain()

void criManaPlayer_SetPreviousDataAgain ( CriManaPlayerHn  player)

Reset the same movie data.

Parameters
[in]playerMana player handle
Description:
Instructs the Mana player to replay the previously played data.
Example:
The following process will also enable you to play the same audio data in an unlimited loop.
// Data request callback function
void on_data_request(void *obj, CriManaPlayerHn player)
{
// Reset previously played data
}
main()
{
:
// Register data request callback function
criManaPlayer_SetDataRequestCallback(player, on_data_request, NULL);
// First, set the initial movie data
criManaPlayer_SetData(player, buffer, buffer_size);
// [MEMO] The following movie sources can be used in the same way
// criManaPlayer_SetFile(player, NULL, movie_path);
// criManaPlayer_SetFileRange(player, movie_path, offset, range);
// Play set audio data
:
}
void criManaPlayer_SetPreviousDataAgain(CriManaPlayerHn player)
Reset the same movie data.
void criManaPlayer_SetDataRequestCallback(CriManaPlayerHn player, CriManaPlayerDataRequestCbFunc func, void *obj)
Register data request callback.
void criManaPlayer_Start(CriManaPlayerHn player)
Start playback.
void criManaPlayer_SetData(CriManaPlayerHn player, const void *dataptr, CriSint64 datasize)
Set data for memory playback.
CriManaPlayerObj * CriManaPlayerHn
Player handle.
Definition: cri_mana.h:571
Attention
This function can only be used in the data request callback function.
(It can be executed apart from the data request callback function, but nothing will happen.)
Notes:
For just loop playback, you can also use the criManaPlayer_Loop function.
See also
criManaPlayer_SetDataRequestCallback

◆ criManaPlayer_GetMovieInfo()

CriBool criManaPlayer_GetMovieInfo ( CriManaPlayerHn  player,
CriManaMovieInfo mvinf 
)

Get movie header information.

Parameters
[in]playerMana player handle
[out]mvinfAddress to the movie information structure
Returns
Whether or not CriBool movie information is retrieved.
Call conditions:
You can get information when called after the Mana player is in CRIMANAPLAYER_STATUS_WAIT_PREP status.

This is not thread safe.
Description:
Gets the CriManaMovieInfo movie information.
Mainly determine bit rate, resolution, the number of audio, and so on from the movie information.
Call the criManaPlayer_DecodeHeader function and analyze the header if you want to determine movie information before playback begins.

With concatenated play, it will return information on the movie file including the last frame that was grabbed.
See also
criManaPlayer_DecodeHeader

◆ criManaPlayer_DecodeHeader()

void criManaPlayer_DecodeHeader ( CriManaPlayerHn  player)

Request header decoding.

Parameters
[in]playerMana player handle
Call conditions:
Execute this function when in the CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND status.
Also, specify the playback file and playback data before executing this function.

This is not thread safe.
Description:
This function is to only analyze the header and then wait for starting a playback.
By using this function and finishing header analysis beforehand, you can get information on movie resolution and audio before playback begins.
Calling this function will transition the Mana player handle status from CRIMANAPLAYER_STATUS_STOP to CRIMANAPLAYER_STATUS_DECHDR. When header analysis is complete it will become CRIMANAPLAYER_STATUS_WAIT_PREP.
When getting the movie information, execute the criManaPlayer_GetMovieInfo function after the handle status becomes CRIMANAPLAYER_STATUS_WAIT_PREP.

You can continue with movie playback by calling the criManaPlayer_Prepare function or the criManaPlayer_Start function when the handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.
Notes:
If you have registered a data request callback function, you can omit presetting the movie data.
See also
criManaPlayer_GetStatus, criManaPlayer_Prepare, criManaPlayer_Start, criManaPlayer_SetDataRequestCallback

◆ criManaPlayer_Prepare()

void criManaPlayer_Prepare ( CriManaPlayerHn  player)

Request playback preparation.

Parameters
[in]playerMana player handle
Call conditions:
Specify the playback file and playback data before executing this function.

This is not thread safe.
Description:
This function is to only analyze the header, prepare for playback, and then wait for starting a playback.
You can precisely control the timing of starting movie playback by using this function and finishing playback preparations beforehand.
(Calling the start playback function without preparing for play will cause a time lag until playback actually begins.)
Calling this function will cause the Mana player handle status to transition from CRIMANAPLAYER_STATUS_STOP to CRIMANAPLAYER_STATUS_DECHDR to CRIMANAPLAYER_STATUS_PREP. When playback preparation is complete, it will become CRIMANAPLAYER_STATUS_READY.

You can start playback by calling the criManaPlayer_Start function when the handle status is CRIMANAPLAYER_STATUS_READY.

Calling this function without calling the criManaPlayer_DecodeHeader function will prevent the Mana player handle status from becoming CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND.
Notes:
If you have registered a data request callback function, you can omit presetting the movie data.
See also
criManaPlayer_GetStatus, criManaPlayer_DecodeHeader, criManaPlayer_Start, criManaPlayer_SetBufferingTime

◆ criManaPlayer_Start()

void criManaPlayer_Start ( CriManaPlayerHn  player)

Start playback.

Parameters
[in]playerMana player handle
Call conditions:
Specify the playback file and playback data before executing this function.

This is not thread safe.
Description:
Starts movie playback.
When calling this function without calling the criManaPlayer_Prepare function, there will be a time lag until the movie actually starts to play in order to prepare for movie analysis and playback.
If you call the criManaPlayer_Prepare function first and the handle status becomes CRIMANAPLAYER_STATUS_READY, then play will start immediately when this function is called.

Calling this function without calling the criManaPlayer_DecodeHeader or criManaPlayer_Prepare function will prevent the Mana player handle status from becoming CRIMANAPLAYER_STATUS_STOP or CRIMANAPLAYER_STATUS_PLAYEND.
Notes:
If you have registered a data request callback function, you can omit presetting the movie data.
See also
criManaPlayer_GetStatus, criManaPlayer_DecodeHeader, criManaPlayer_Prepare

◆ criManaPlayer_Stop()

void criManaPlayer_Stop ( CriManaPlayerHn  player)

Requests play to stop.

Parameters
[in]playerMana player handle
Call conditions:
This is not thread safe.
Description:
Requests to stop movie playback. This is a non-blocking function. Not all stop processes will be executed with this function.
Once this function is called, operate the normal main loop until the playback status becomes CRIMANAPLAYER_STATUS_STOP.
More specifically, you will need to call the criMana_ExecuteMain function, criMana_ExecuteVideoProcess function, and so on as normal.

When the playback status becomes CRIMANAPLAYER_STATUS_ERROR, call this function and wait for CRIMANAPLAYER_STATUS_STOP.
Notes:
The API name from the criManaPlayer_RequestStop was changed from Ver.1.10.
See also
criManaPlayer_GetStatus

◆ criManaPlayer_StopAndWaitCompletion()

void criManaPlayer_StopAndWaitCompletion ( CriManaPlayerHn  player)

Stop playback (complete return API)

Parameters
[in]playerMana player handle
Call conditions:
This is not thread safe.
Description:
Stops movie playback. This function is a blocking function. When the process returns from this function the player will be in the stopped status.
Streaming stop standby will occur in this function, so it may block the process for several dozen milliseconds.
Only implement this function if you do not mind the timing of scene transitions and other game processes to be delayed.

Use the criManaPlayer_Stop function if there will be problems with main processes being blocked.
See also
criManaPlayer_GetStatus

◆ criManaPlayer_Pause()

void criManaPlayer_Pause ( CriManaPlayerHn  player,
CriBool  sw 
)

Switch play pause.

Parameters
[in]playerMana player handle
[in]swPause switch (CRI_ON:Pause, CRI_OFF:Unpause)
Call conditions:
This is thread safe.
Description:
The operation of this function depends on the argument.
If the argument sw is CRI_ON(1), then it will pause. If the argument sw is CRI_OFF(0), then it will resume playback.

File reading and decoding stop will not occur immediately after this function is called.
Calling criManaPlayer_Stop will cancel the pause status.

◆ criManaPlayer_IsPaused()

CriBool criManaPlayer_IsPaused ( CriManaPlayerHn  player)

Get play pause status.

Parameters
[in]playerMana player handle
Returns
CriBool Pause status
Call conditions:
This is thread safe.
Description:
Gets the current Mana player pause status. If the return value is CRI_ON(1), then it is paused. If the argument sw is CRI_OFF(0), then pause has been cancelled.

◆ criManaPlayer_Loop()

void criManaPlayer_Loop ( CriManaPlayerHn  player,
CriBool  sw 
)

Switch play loop.

Parameters
[in]playerMana player handle
[in]swLoop switch (CRI_FALSE:No loop, CRI_TRUE:Loop present)
Call conditions:
This is thread safe.
Description:
Sets whether there is loop play. Loop play is OFF by default.
When turning loop play ON, the handle status will not become CRIMANAPLAYER_STATUS_PLAYEND, even if the movie is played to the end. Rather, the movie still repeats playback from the beginning.

When loop play is set to OFF, the handle status will transition to CRIMANAPLAYER_STATUS_PLAYEND when the loaded movie is played to the end.
If you turn loop play OFF during playback, depending on the timing it will be executed by the next repeat playback, and the movie being played will not stop at the end.

◆ criManaPlayer_GetTime()

void criManaPlayer_GetTime ( CriManaPlayerHn  player,
CriUint64 *  count,
CriUint64 *  unit 
)

Get playback time.

Parameters
[in]playerMana player handle
[out]countTimer count
[out]unitNumber of timer counts per second. Time is in second units because count / unit.
Call conditions:
This is not thread safe.
Description:
Gets timer time. Time is displayed in either count or unit variables.
Time is returned in second units because count / unit.
Time will be returned as zero (timer count will be zero) before playback begins or after playback ends.
This function will only return the timer time specified by the master timer. It does not return video frame time.
Reference the CriManaFrameInfo structure of the original display time of the video frame when it was grabbed.

◆ criManaPlayer_GetInputBufferSize()

CriSint32 criManaPlayer_GetInputBufferSize ( CriManaPlayerHn  player)

Get input buffer size.

Parameters
[in]playerMana player handle
Returns
CriSint32 Input buffer size [byte]
Call conditions:
This is not thread safe.
Description:
Gets the input buffer size of the Mana player.
You can get a valid input buffer size value after CRIMANAPLAYER_STATUS_PREP.
Notes:
This function is a debug function that can only be used in applications to get information.
See also
criManaPlayer_SetBufferingTime, criManaPlayer_GetInputBufferRemainSize

◆ criManaPlayer_GetInputBufferRemainSize()

CriSint32 criManaPlayer_GetInputBufferRemainSize ( CriManaPlayerHn  player)

Get amount of remaining data in input buffer.

Parameters
[in]playerMana player handle
Returns
CriSint32 Amount of remaining data in input buffer [byte]
Call conditions:
This is not thread safe.
Description:
Gets the amount of data remaining in the input buffer.
You can get a valid value after CRIMANAPLAYER_STATUS_PREP.
Notes:
This function is a debug function that can only be used in applications to get information.

When there is time lapse or time skipping in a video, you can use this function to check whether there is any data remaining in the player's input buffer during playback.
If the amount of data remaining is zero for an extended time, even during playback, then some error may be delaying the supply of data.
See also
criManaPlayer_SetBufferingTime, criManaPlayer_GetInputBufferRemainSize

◆ criManaPlayer_SetNumberOfFramePools()

void criManaPlayer_SetNumberOfFramePools ( CriManaPlayerHn  player,
CriUint32  npools 
)

Specify the number of internal video buffers (frame pools)

Parameters
[in]playerMana player handle
[in]npoolsNumber of internal video buffers (minimum of one)
Call conditions:
Call before the Mana player handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.
This function will affect the playback work parameters, so call before the criManaPlayer_GetPlaybackWorkParam function.

This is not thread safe.
Description:
Specifies the number of video buffers in the Mana player.
These internal buffers are for storing the results of decoding and are called frame pools.
You can precede with video decoding early the more frame pools there are, which more easily allows for smooth playback when decoding load fluctuations are large or when there are large fluctuations in the CPU time that can be used for decoding.

The number of default frame pools is one.

◆ criManaPlayer_SetBufferingTime()

void criManaPlayer_SetBufferingTime ( CriManaPlayerHn  player,
CriFloat32  sec 
)

Specify input data buffering time.

Parameters
[in]playerMana player handle
[in]secBuffering time. The unit is seconds.
Call conditions:
Call before the Mana player handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.
This function will affect the playback work parameters, so call before the criManaPlayer_GetPlaybackWorkParam function.

This is not thread safe.
Description:
Specifies seconds as the unit of time for the amount of input data being buffered during streaming.
The Mana player determines the size of the reading buffer from the buffering time, movie bit rate, and so on.

The default buffering time is one second.

When the buffering time is specified as 0.0f, the buffering time will be the library's default value.

◆ criManaPlayer_SetMinBufferSize()

void criManaPlayer_SetMinBufferSize ( CriManaPlayerHn  player,
CriUint32  min_buffer_size 
)

Specify minimum buffer size.

Parameters
[in]playerMana player handle
[in]min_buffer_sizeMinimum buffer size [byte]
Call conditions:
Call before the Mana player handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.
This function will affect the playback work parameters, so call before the criManaPlayer_GetPlaybackWorkParam function.

This is not thread safe.
Description:
Specifies the minimum buffer size for the movie data.
When the minimum buffer size is specified, any input buffer larger than the specified size is guaranteed to be allocated in the Mana player.

You do not need to use this function for simple playback. Use it for concatenated play of movies with extreme differences in bit rates.

When the minimum buffer size has been specified as zero, its value will be what the movie data contains. (Default)
Notes:
The minimum buffer size set by this function will not be reflected in the movie data obtained by the criManaPlayer_GetMovieInfo function.
The criManaPlayer_GetMovieInfo function can get the original movie data information.
See also
criManaPlayer_GetInputBufferSize

◆ criManaPlayer_SetFileStreamingFlag()

void criManaPlayer_SetFileStreamingFlag ( CriManaPlayerHn  player,
CriBool  streaming_flag 
)

Set streaming flag.

Parameters
[in]playerMana player handle
[in]streaming_flagStreaming flag
Call conditions:
This function can be called only when the Mana player handle status is in the STOP or PLAYEND.

This is thread safe.
Description:
Determines whether there will be streaming in the specified Mana player.
The default is CRI_TRUE. When CRI_FALSE is specified, the Mana player will be exclusively on-memory playback.

Notes:
A playback error will occur when streaming begins if the streaming flag is disabled.

◆ criManaPlayer_SetMaxMovieSize()

void criManaPlayer_SetMaxMovieSize ( CriManaPlayerHn  player,
CriSint32  max_width,
CriSint32  max_height 
)

Specify maximum resolution.

Parameters
[in]playerMana player handle
[in]max_widthMaximum movie width
[in]max_heightMaximum movie height
Call conditions:
This function can be called only when the Mana player handle status is in the STOP or PLAYEND.

This is thread safe.
Description:
Specifies the maximum resolution of the movie to be played by the player.

◆ criManaPlayer_SetMaxPictureDataSize()

void criManaPlayer_SetMaxPictureDataSize ( CriManaPlayerHn  player,
CriUint32  max_data_size 
)

Specify maximum resolution.

Parameters
[in]playerMana player handle
[in]max_data_sizeMaximum resolution [byte]
Call conditions:
Call this function before starting playback (criManaPlayer_Prepare function or criManaPlayer_Start function).

This is thread safe.
Description:
Specifies the maximum picture data size of the movie data to be played by the player.
Only use this API for concatenated play of a specific codec. (Unnecessary for the Sofdec.Prime codec)

When the maximum picture data size is specified as zero, its value will be what the maximum picture data size contains.

See also
criManaPlayer_SetDataRequestCallback

◆ criManaPlayer_ExecuteAutoSkip()

void criManaPlayer_ExecuteAutoSkip ( CriManaPlayerHn  player,
CriManaFrameInfo frame_info 
)

Execute decision to automatically skip a decoded frame.

Parameters
[in]playerMana player handle
[in]frame_infoFrame information structure
Call conditions:
This function can be called only when the Mana player handle status is in the STOP or PLAYEND.

This is not thread safe.
Description:
Decides to skip decoded frames on the app side. The frame will automatically skip internally when it is decided by the function that slowdown will occur due to playback load. While visually there will be stuttering, it will make it easier to prevent sound jumping.

Refer to the decoded frame information and call this function when the time of the frame returns CRI_TRUE.

Example:
CriManaFrameInfo frame_info;
if (criManaPlayer_ReferFrame(player, &frame_info) == CRI_TRUE) {
if (criManaPlayer_IsFrameOnTime(player, &frame_info) == CRI_TRUE) {
criManaPlayer_ExecuteAutoSkip(player, &frame_info);
}
}
CriBool criManaPlayer_IsFrameOnTime(CriManaPlayerHn player, const CriManaFrameInfo *frame_info)
Determine frame time.
void criManaPlayer_ExecuteAutoSkip(CriManaPlayerHn player, CriManaFrameInfo *frame_info)
Execute decision to automatically skip a decoded frame.
CriBool criManaPlayer_ReferFrame(CriManaPlayerHn player, CriManaFrameInfo *frame_info)
Refer to decoded frame information.
Video frame information.
Definition: cri_mana.h:850
Caution:
  • Do not use together with the criMana_SetDecodeSkipFlag function. (Set so that the criMana_SetDecodeSkipFlag function is not called or so that it is CRI_FALSE)
  • Calling the function multiple times for the same frame information structure will implement the request for skipping multiple times, so be sure that the information for each frame is called only one time.
    Valid for Sofdec.Prime only; H.264/VP9 is not supported for decode skipping.

◆ criManaPlayer_SetAudioTrack()

void criManaPlayer_SetAudioTrack ( CriManaPlayerHn  player,
CriSint32  track 
)

Set the main audio track number.

Parameters
[in]playerMana player handle
[in]trackTrack number
Call conditions:
Call this function before starting playback (criManaPlayer_Prepare function or criManaPlayer_Start function).

This function is not thread safe.
Description:
Sets the audio to be played when a movie has multiple audio tracks.
It will play the lowest numbered audio track if this function is not executed.
Audio will not play if a track number for which there is no data is specified.

If you specify CRIMANA_AUDIO_TRACK_OFF as the track number, then audio will not play even if audio is included in the movie.

If you want to set defaults (to play the lowest numbered audio channel), then specify CRIMANA_AUDIO_TRACK_AUTO as the channel.

Audio track information is analyzed by the header before playback begins, so the information can be obtained at random times.
Notes:
Changing tracks during playback is not supported. Register the frame number before changing the track and use seek playback.
See also
criManaPlayer_GetMovieInfo, criManaPlayer_DecodeHeader

◆ criManaPlayer_SetSubAudioTrack()

void criManaPlayer_SetSubAudioTrack ( CriManaPlayerHn  player,
CriSint32  track 
)

Set the subaudio track number.

Parameters
[in]playerMana player handle
[in]trackSubaudio track number
Call conditions:
Call this function before starting playback (criManaPlayer_Prepare function or criManaPlayer_Start function).

This function is not thread safe.
Description:
Sets the subaudio track number.
In playing the subaudio, you will need to enable the sub_audio_params parameters of the CriManaPlaybackExWorkConfig structure specified by the criManaPlayer_SetPlaybackWork function after specifying the track number with this function.

Nothing from the subaudio will play if the main audio is specified as the same track as the subaudio track.
If there is no audio in the specified track number, then it is OFF.

◆ criManaPlayer_SetExtraAudioTrack()

void criManaPlayer_SetExtraAudioTrack ( CriManaPlayerHn  player,
CriSint32  track 
)

Set the extra audio track index.

Parameters
[in]playerMana player handle
[in]trackExtra audio track index
Calling condition:
Please call this function before starting playback.

This function is not thread-safe.
Description:
Sets the index of the track containing the extra audio.
To play the extra audio, after specifying the track index with this function, you need to activate the "extra_audio_params" of the CriManaPlaybackExWorkConfig structure specified by the criManaPlayer_SetPlaybackWork function.

It turns it OFF if there is no audio at the specified track index.

◆ criManaPlayer_SetVolume()

void criManaPlayer_SetVolume ( CriManaPlayerHn  player,
CriFloat32  volume 
)

Set audio volume (main audio track)

Parameters
[in]playerMana player handle
[in]volumeVolume
Call conditions:
This function is not thread safe.
Description:
Sets the output sound volume of the movie's main audio track.

Specifies the volume at an actual value between a range of 0.0F and 1.0f.
The volume is a scaling factor of the amplitude of the sound data. (Not in decibel units.)
For example, specifying 1.0f will output the original sound at its original volume.
Specifying 0.0f will mute the sound. (There will be no sound.)
The default value for volume is 1.0f.

Specifying a value outside the 0.0f to 1.0f range will clip at the minimum and maximum values.
See also
criManaPlayer_GetVolume

◆ criManaPlayer_GetVolume()

CriFloat32 criManaPlayer_GetVolume ( CriManaPlayerHn  player)

Get audio volume (main audio track)

Parameters
[in]playerMana player handle
Returns
CriFloat32 Volume
Description:
Gets the output sound volume of the movie's main audio track. Volume range is 0.0f to 1.0f.
See also
criManaPlayer_SetVolume

◆ criManaPlayer_GetAtomExPlayerByTrackId()

CriAtomExPlayerHn criManaPlayer_GetAtomExPlayerByTrackId ( CriManaPlayerHn  player,
CriUint32  track_id 
)

Get AtomExPlayerHn.

Parameters
[in]playerMana player handle
[in]track_idAudio track number (0: main, 1: sub, 2: extra)
Returns
CriAtomExPlayerHn CriAtomExPlayer handle
Description:
Gets the ::criAtomExPlayerHn used by CriManaPlayer for audio playback.
It is possible to get a different ::criAtomExPlayerHn for each audio track track.
The value of the argument track_id specifies the audio track.
If track_id is 0, it means main, if 1 it means sub, and if 2 it means extra audio track.
Specify CRI_TRUE in the use_atomex_player member of the CriManaPlayerConfig structure, and this function returns NULL except for CriManaPlayerHn created by the criManaPlayer_CreateWithConfig function.
Attention
Do not discard ::CriAtomExPlayerHn acquired by this function.

◆ criManaPlayer_SetSubAudioVolume()

void criManaPlayer_SetSubAudioVolume ( CriManaPlayerHn  player,
CriFloat32  volume 
)

Set audio volume (subaudio track)

Parameters
[in]playerMana player handle
[in]volumeVolume
Call conditions:
This function is not thread safe.
Description:
Specifies the output sound volume of the movie's subaudio track.

Specifies the volume at an actual value between a range of 0.0F and 1.0f.
The volume is a scaling factor of the amplitude of the sound data. (Not in decibel units.)
For example, specifying 1.0f will output the original sound at its original volume.
Specifying 0.0f will mute the sound. (There will be no sound.)
The default value for volume is 1.0f.

Specifying a value outside the 0.0f to 1.0f range will clip the minimum and maximum values.
See also
criManaPlayer_GetSubAudioVolume

◆ criManaPlayer_GetSubAudioVolume()

CriFloat32 criManaPlayer_GetSubAudioVolume ( CriManaPlayerHn  player)

Get audio volume (subaudio track)

Parameters
[in]playerMana player handle
Returns
CriFloat32 Volume
Description:
Gets the output sound volume of the movie's subaudio track. Volume range is 0.0f to 1.0f.
See also
criManaPlayer_SetSubAudioVolume

◆ criManaPlayer_SetExtraAudioVolume()

void criManaPlayer_SetExtraAudioVolume ( CriManaPlayerHn  player,
CriFloat32  volume 
)

Set the audio volume of the extra audio track.

Parameters
[in]playerMana player handle
[in]volumeVolume
Call conditions:
This function is not thread safe.
Description:
Specifies the output volume of the movie's extra audio track.

Specifies the volume in the range from 0.0F to 1.0f.
The volume is a scaling factor of the amplitude of the sound data (i.e. it is not expressed in decibels).
For example, specifying 1.0f will output the sound at its original volume.
Specifying 0.0f will mute the sound. (There will be no sound.)
The default value for the volume argument is 1.0f.

Specifying a value outside of the 0.0f to 1.0f range will clip to the minimum and maximum values.
See also
criManaPlayer_GetExtraAudioVolume

◆ criManaPlayer_GetExtraAudioVolume()

CriFloat32 criManaPlayer_GetExtraAudioVolume ( CriManaPlayerHn  player)

Get the audio volume of the extra audio track.

Parameters
[in]playerMana player handle
Returns
CriFloat32 Volume
Description:
Gets the output sound volume of the movie's extra audio track. The volume is in the range from 0.0f to 1.0f.
See also
criManaPlayer_SetExtraAudioVolume

◆ criManaPlayer_SetPan()

void criManaPlayer_SetPan ( CriManaPlayerHn  player,
CriSint32  ch,
CriFloat32  pan 
)

Get 2D pan (main audio track)

Parameters
[in]playerMana player handle
[in]chChannel number
[in]panPan setting (-1.0f~1.0f)
Call conditions:
This function is not thread safe.
Description:
Specifies the 2D pan (left-right sound source localization) of the main audio track.
You can freely control the sound source localization for monaural or stereo sounds by executing this function.

Specifies the channel number of the second argument as the "sound data channel number."
(When playing monaural sounds)
  • Specifies the channel number as zero.
(When playing stereo sounds)
  • Channel number 0: Left sound
  • Channel number 1: Right sound

Specifies in what position the specified channel number data will be localized in the pan setting of the third argument.
The pan setting is specified as an actual value between a range of -1.0f to 1.0f.
Specifying the sound source as a negative value will localize the sound source on the left (the smaller the value, the farther left it will move). Specifying the sound source as 0.0f will localize it in the center, while specifying a positive value will localize it on the right (the larger the value, the farther right it will move).
(A convenient value is -1.0f for the left, 0.0f for the center, and 1.0f for the right.)
Notes:
If the actual applicable value exceeds 1.0f, it will be clipped to 1.0f.
In the same way, if the actual applicable value is less than -1.0f then it will be clipped to -1.0f.

Specifying channel numbers that do not rely on sound data during playback will ignore these settings.
In the same way, specifying anything above channel 2 will disable it.
See also
criManaPlayer_GetPan

◆ criManaPlayer_GetPan()

CriFloat32 criManaPlayer_GetPan ( CriManaPlayerHn  player,
CriSint32  ch 
)

Get 2D pan (main audio track)

Parameters
[in]playerMana player handle
[in]chChannel number
Returns
CriFloat32 Pan setting
Description:
Gets the pan settings of the specified channel number of the main audio track.
Pan setting range is -1.0f to 1.0f.
See also
criManaPlayer_SetPan

◆ criManaPlayer_ResetSendLevel()

void criManaPlayer_ResetSendLevel ( CriManaPlayerHn  player)

Reset send level (main audio track)

Parameters
[in]playerMana player handle
Description:
Resets the send level settings of the main audio track.
You will clear all previously set send level settings by executing this function.

Executing this function during movie playback will clear all send levels that were sent and will prevent all of the
speakers from outputting sound.
Notes:
There are two send level settings: Automatic and Manual.
Resetting the send level with this function directly after creating the Mana player will change the send level setting to Automatic.
(Refer to the criManaPlayer_SetSendLevel function explanation for routing when set to Automatic.)
See also
criManaPlayer_SetSendLevel

◆ criManaPlayer_SetSendLevel()

void criManaPlayer_SetSendLevel ( CriManaPlayerHn  player,
CriSint32  ch,
CriAtomSpeakerId  spk,
CriFloat32  level 
)

Set send level (main audio track)

Parameters
[in]playerMana player handle
[in]chChannel number
[in]spkSpeaker ID
[in]levelVolume setting (0.0f to 1.0f)
Description:
Specifies the send level of the main audio track.
The send level is a way to specify from which speaker and at what volume the sound from each sound data channel will be output.

The "ch" argument specifies the sound data channel number.
The "spk" argument specifies to which speaker the specified channel of sound data will be output. The "level" argument specifies the volume at which the data of the specified sound channel will be output on that speaker.
The volume is a value between 0.0f and 1.0f.
It is expressed as a scaling factor of the amplitude of the sound data. (It is not expressed in decibel units.)
For example, specifying 1.0f will output the original sound at its original volume.
When 0.5f is specified, the sound will be output at half the amplitude of the waveform of the original sound data (-6dB).
Specifying 0.0f will mute the sound. (There will be no sound.)
For example, specify the following arguments if you want to output the data from the first sound channel at full volume (1.0f) on the right speaker.
criManaPlayer_SetSendLevel(player, 0, CRIATOM_SPEAKER_FRONT_RIGHT, 1.0f);
void criManaPlayer_SetSendLevel(CriManaPlayerHn player, CriSint32 ch, CriAtomSpeakerId spk, CriFloat32 level)
Set send level (main audio track)

Thanks to this function, you can output one channel of the audio data to multiple speakers at different volumes.
For example, the code below shows what to do if you want to output the data from the second channel to the left speaker at a volume of 0.3f, to the right speaker at a volume of 0.5f, and to the center speaker at a volume 0.7f.
criManaPlayer_SetSendLevel(player, 1, CRIATOM_SPEAKER_FRONT_LEFT, 0.3f);
criManaPlayer_SetSendLevel(player, 1, CRIATOM_SPEAKER_FRONT_RIGHT, 0.5f);
criManaPlayer_SetSendLevel(player, 1, CRIATOM_SPEAKER_FRONT_CENTER, 0.7f);

You can reset the send level values you set with the criManaPlayer_ResetSendLevel function.
Notes:
There are two send level settings: Automatic and Manual.
Resetting the send level with the criManaPlayer_ResetSendLevel function directly after creating the Mana player will cause the send level setting to change to Automatic.
Executing this function will cause the send level setting to change to Manual.

The Mana player will route sound as described below when set to Automatic.

  • (When playing monaural sound)
    Sound from channel zero will be output to the left speaker, and sound from channel one will be output to the right speaker.

  • (When playing stereo sound)
    Sound from channel zero will be output to the left speaker, and sound from channel one will be output to the right speaker.

  • (When playing 4ch sound)
    Sound from channel zero will be output to the left speaker, sound from channel one will be output to the right speaker, sound from channel two will be output to the left surround speaker, and sound from channel three will be output to the right surround speaker.

  • (When playing 5.1ch sound)
    Sound from channel zero will be output to the left speaker, sound from channel 1 will be output to the right speaker, sound from channel two will be output to the center speaker, sound from channel three will be output to the LFE, sound from channel four will be output to the left surround speaker, and sound from channel five will be output to the right surround speaker.
Meanwhile, using this function on Manual will cause sound to be output with the specified routing, regardless of the number of sound data channels.
(It will not output sound from channels for which the sound levels have not been set.)
Execute the criManaPlayer_ResetSendLevel function if you want to clear the send levels and return the routing to Automatic.

You can use this function independently from the criManaPlayer_SetVolume function. For example, if you set the volume to 0.5f in this function and also to 0.5f by using the criManaPlayer_SetVolume function, then the resulting sound volume will be the multiplication of both values.
(The operation is 0.5f x 0.5f = 0.25f.)
Attention
If the send level has only been set for some channels, even though the sound data contains multi-channel data, then no sound will be output from channels where send levels have not been set.

Do not combine the use of this function with the criManaPlayer_SetPan function.
Using both together may cause functions executed later to overwrite the settings.
Use only either this function or the criManaPlayer_SetPan function when controlling sound source localization.
(Use this function when using 3D pan and the criManaPlayer_SetPan function when only using 2D pan.)
This function may not be supported on some platforms.
(Implementation of this function may be difficult depending on the sound library of the platform, so it cannot be used on all operating systems.)
Refer to the information contained in each platform's manual to know whether this function can be used or not.
See also
criManaPlayer_SetVolume, criManaPlayer_SetPan, criManaPlayer_ResetSendLevel

◆ criManaPlayer_ResetSubAudioSendLevel()

void criManaPlayer_ResetSubAudioSendLevel ( CriManaPlayerHn  player)

Reset send level (subaudio track)

Parameters
[in]playerMana player handle
Description:
Resets the send level settings of the subaudio track.
You will clear all previously set send level settings by executing this function.
Notes:
This function has the same operating specifications as criManaPlayer_ResetSendLevel.
The settings for this function are only for subaudio tracks.
See also
criManaPlayer_ResetSendLevel

◆ criManaPlayer_SetSubAudioSendLevel()

void criManaPlayer_SetSubAudioSendLevel ( CriManaPlayerHn  player,
CriSint32  ch,
CriAtomSpeakerId  spk,
CriFloat32  level 
)

Set send level (subaudio track)

Parameters
[in]playerMana player handle
[in]chChannel number
[in]spkSpeaker ID
[in]levelVolume (0.0f~1.0f)
Description:
Specifies the send level of the subaudio track.
Send level is a way of specifying from which speaker and at what volume sound from each sound data channel will be output.

Notes:
This function has the same operating specifications as criManaPlayer_SetSendLevel.
The settings for this function are only for subaudio tracks.
See also
criManaPlayer_SetSubAudioSendLevel

◆ criManaPlayer_ResetExtraAudioSendLevel()

void criManaPlayer_ResetExtraAudioSendLevel ( CriManaPlayerHn  player)

Reset the send level of the extra audio track.

Parameters
[in]playerMana player handle
Description:
Resets the send level of the extra audio track.
You will clear all previously send level settings by executing this function.
Notes:
This function works in the same way than criManaPlayer_ResetSendLevel.
The settings for this function are only for extra audio tracks.
See also
criManaPlayer_ResetSendLevel

◆ criManaPlayer_SetExtraAudioSendLevel()

void criManaPlayer_SetExtraAudioSendLevel ( CriManaPlayerHn  player,
CriSint32  ch,
CriAtomSpeakerId  spk,
CriFloat32  level 
)

Set the send level of the extra audio track.

Parameters
[in]playerMana player handle
[in]chChannel number
[in]spkSpeaker ID
[in]levelVolume (0.0f~1.0f)
Description:
Specifies the send level of the extra audio track.
Setting the send level is a way to specify from which speaker and at what volume the sound from each channel will be output.

Notes:
This function works in the same way than criManaPlayer_SetSendLevel.
The settings for this function are only for extra audio tracks.
See also
criManaPlayer_SetSubAudioSendLevel

◆ criManaPlayer_SetBusSendLevelByName()

void criManaPlayer_SetBusSendLevelByName ( CriManaPlayerHn  player,
const CriChar8 *  bus_name,
CriFloat32  level 
)

Set bus send level (main audio track)

Parameters
[in]playerMana player handle
[in]bus_nameBus name
[in]levelSend level value (0.0f to 1.0f)
Description:
Specifies the bus send level of the main audio track.
The bus send level is a way to specify how much sound is sent to a bus.
The sound will begin to play according to prior bus send level settings.
Any bus send level change during playback will be reflected immediately.

The second argument of the function references the bus we want to send the sound through.
The third argument of the function is the level (volume) of the sound sent through the specified bus.

The range and the haof send level values and their handling are the same as with volume. Refer to the criManaPlayer_SetVolume function.
Notes:
You can send volume down multiple buses by calling this function multiple times.
See also
criManaPlayer_SetVolume

◆ criManaPlayer_SetSubAudioBusSendLevelByName()

void criManaPlayer_SetSubAudioBusSendLevelByName ( CriManaPlayerHn  player,
const CriChar8 *  bus_name,
CriFloat32  level 
)

Set bus send level (sub audio track)

Parameters
[in]playerMana player handle
[in]bus_idBus ID
[in]levelSend level (0.0f to 1.0f)
Description:
Specifies the bus send level of the sub audio track.
The bus send level is a way to specify how much sound is sent to a bus.
The sound will begin to play according to prior bus send level settings.
Any bus send level change during playback will be reflected immediately.

Notes:
This function has the same operating specifications as criManaPlayer_SetBusSendLevelByName.
However this function only affects sub audio tracks.
See also
criManaPlayer_SetBusSendLevelByName

◆ criManaPlayer_SetExtraAudioBusSendLevelByName()

void criManaPlayer_SetExtraAudioBusSendLevelByName ( CriManaPlayerHn  player,
const CriChar8 *  bus_name,
CriFloat32  level 
)

Set the bus send level of the extra audio track.

Parameters
[in]playerMana player handle
[in]bus_idBus ID
[in]levelSend level (0.0f to 1.0f)
Description:
Specifies the bus send level of the extra audio track.
The bus send level is a way to specify how much sound is sent to a bus.
The sound will begin to play according to the prior bus send level.
Any bus send level change during playback will be reflected immediately.

Notes:
This function works in the same way than criManaPlayer_SetBusSendLevelByName.
However this function only affects extra audio tracks.
See also
criManaPlayer_SetBusSendLevelByName

◆ criManaPlayer_ResetBusSendLevelAll()

void criManaPlayer_ResetBusSendLevelAll ( CriManaPlayerHn  player)

Bus send level reset (all tracks)

Parameters
[in]playerMana player handle
Description:
Resets the bus send levels for all main, sub audio, and extra audio tracks.
If you reset the bus send level during playback, the setting value will be reflected immediately.

Notes:
This function has no effect on a player created by setting CRI_TRUE to the CriManaPlayerConfig.use_atomex_player .

◆ criManaPlayer_SetSoundRendererType()

void criManaPlayer_SetSoundRendererType ( CriManaPlayerHn  player,
CriAtomSoundRendererType  sound_renderer_type 
)

Set sound renderer type.

Parameters
[in]playerMana player handle
[in]sound_renderer_typeSet sound renderer type
Call conditions:
This is not thread safe.
Description:
Specifies an output sound renderer for the sound that is played by the Mana player.
Output sound renderer type settings are reflected in both the main audio and subaudio tracks.

You cannot change the sound renderer type during playback. If you specify the sound renderer type during playback, the settings will be reflected in the next movie to be played.

Attention
You can only specify the following two when using a pre-CRI Mana Ver.1.68.02 version.
  • CRIATOM_SOUND_RENDERER_NATIVE
  • CRIATOM_SOUND_RENDERER_ASR

◆ criManaPlayer_SetAsrRackId()

void criManaPlayer_SetAsrRackId ( CriManaPlayerHn  player,
CriSint32  asr_rack_id 
)

Set the ASR rack ID.

Parameters
[in]playerMana player handle
[in]asr_rack_idASR rack ID
Call conditions:
This is not thread safe.
Description:
Specifies an output ASR rack ID for the sound that is played by the Mana player..
Output ASR rack settings are reflected in both the main audio and subaudio tracks.

Enabled only when the output sound renderer type is CRIATOM_SOUND_RENDERER_ASR.
You cannot change the ASR rack ID during playback. If you specify the ASR rack ID during playback, the settings will be reflected in the next movie to be played.

◆ criManaPlayer_ReferFrame()

CriBool criManaPlayer_ReferFrame ( CriManaPlayerHn  player,
CriManaFrameInfo frame_info 
)

Refer to decoded frame information.

Parameters
[in]playerMana player handle
[out]frame_infoFrame information structure
Returns
CriBool Frame information reference results (CRI_TRUE: Reference successful, CRI_FALSE: Reference failed)
Call conditions:
Call this function when the Mana player handle status is CRIMANAPLAYER_STATUS_PLAYING. CRI_FALSE will always be returned in all other situations.

This is not thread safe.
Description:
References the frame information structure of a decoded video frame. You can get the following frame information if there is a decoded frame in the Mana player's frame pool.

In order to grab the video frame, first use this function to determine whether there is a decoded frame. Next, use the criManaPlayer_IsFrameOnTime function to check whether the frame has reached the playback time.

As long as you do not call criManaPlayer_DiscardFrame, this function will get the same frame information.
Remarks:
The video decoding process proceeds internally even while the Mana player is pausing, and the decoded frame information from this function can be referenced.
See also
criManaPlayer_IsFrameOnTime

◆ criManaPlayer_IsFrameOnTime()

CriBool criManaPlayer_IsFrameOnTime ( CriManaPlayerHn  player,
const CriManaFrameInfo frame_info 
)

Determine frame time.

Parameters
[in]playerMana player handle
[in]frame_infoFrame information structure
Returns
CriBool Return CRI_TRUE(1) if the input frame information already has a time stamp.
Call conditions:
Call this function when the Mana player handle status is CRIMANAPLAYER_STATUS_PLAYING. CRI_FALSE will always be returned in all other situations.

This is not thread safe.
Description:
Determines the time stamp of the frame referenced by the criManaPlayer_ReferFrame function. This time stamp is determined based on the master timer time.
See also
criManaPlayer_ReferFrame

◆ criManaPlayer_KeepFrame()

CriBool criManaPlayer_KeepFrame ( CriManaPlayerHn  player,
CriManaFrameInfo frame_info 
)

Keep frame.

Parameters
[in]playerMana player handle
[out]frame_infoFrame information structure
Returns
CriBool Whether or not frame information is kept.
Call conditions:
This is not thread safe.
Description:
If there is a decoded video frame, then the application can keep the decoded frame. Calling this function will allow the next frame in the frame pool to be referenced without destroying the current frame. In this way, the application can manage multiple frames.

The Mana player will maintain the decoding results as long as the kept frame is not destroyed with the ::criManaPlayer_Discard or criManaPlayer_DiscardOneKeepFrame function. Therefore, the frame can be used as a drawing while kept.

Use this function to grab multiple frames and use them as drawings, or when you want to temporarily keep frames on the system with drawing latency.
See also
criManaPlayer_ReferFrame, criManaPlayer_GetNumberOfKeepFrames, criManaPlayer_DiscardOneKeepFrame

◆ criManaPlayer_GetNumberOfKeepFrames()

CriSint32 criManaPlayer_GetNumberOfKeepFrames ( CriManaPlayerHn  player)

Get the number of kept frames.

Parameters
[in]playerMana player handle
Returns
CriSint32 Number of kept frames
Call conditions:
This is not thread safe.
Description:
Gets the number of frames that the application is currently keeping using the criManaPlayer_KeepFrame function.
See also
criManaPlayer_KeepFrame

◆ criManaPlayer_CopyFrameToBufferARGB32()

void criManaPlayer_CopyFrameToBufferARGB32 ( CriManaPlayerHn  player,
const CriManaFrameInfo frame_info,
CriManaTextureBuffer frame_buf 
)

Get decoding results (32bit ARGB format)

Parameters
[in]playerMana player handle
[out]frame_infoFrame information structure
[out]frame_bufFrame buffer (for drawing) at destination
Call conditions:
Always call the criMana_InitializeFrameARGB32 function beforehand.
Call this function when the Mana player handle status is CRIMANAPLAYER_STATUS_PLAYING.
This is not thread safe.
Description:
Gets (copies) the time stamped video frame in 32bit ARGB format.
You will first need to allocate an ARGB buffer entity when you call this function.

The actual sequence of 32bit ARGB pixel data will be the most standard format for that platform.
Attention
This function can even be used on the PS3 and Xbox360, but it will put an extremely high load on the CPU.
Getting a movie with 1280x720 resolution with this function will take close to 1vsync time.
On the PS3 and Xbox360, we recommend converting the frame through a combination of the criManaPlayer_CopyFrameToBuffersYUV function and a pixel shader.
This function is not supported during H.264 playback on the Wii U/XboxOne/VITA.
See also
criMana_InitializeFrameARGB32

◆ criManaPlayer_CopyFrameToBuffersYUV()

void criManaPlayer_CopyFrameToBuffersYUV ( CriManaPlayerHn  player,
const CriManaFrameInfo frame_info,
CriManaTextureBuffersYUV frame_buf 
)

Get decoding results (YUV individual buffer format)

Parameters
[in]playerMana player handle
[out]frame_infoFrame information structure
[in]frame_bufFrame buffer (for drawing) at destination
Call conditions:
Call this function when the Mana player handle status is CRIMANAPLAYER_STATUS_PLAYING.
This is not thread safe.
Description:
Gets the time stamped video frame in a YUV individual buffer format.
YUV individual buffer format is an output format for drawing frames with a pixel shader.
When you call this function, you will need to allocate a YUV individual buffer entity first.
The video frame is written in the specified YUV individual buffer by the argument frame_buf.

It does not use the a_plane parameters of the argument frame_buf when an alpha movie is not being played.

◆ criManaPlayer_DiscardFrame()

void criManaPlayer_DiscardFrame ( CriManaPlayerHn  player,
const CriManaFrameInfo frame_info 
)

Release frame.

Parameters
[in]playerMana player handle
[in]frame_infoFrame information structure
Call conditions:
This is not thread safe.
Description:
Releases the frame being referenced by the criManaPlayer_ReferFrame or criManaPlayer_KeepFrame function.
Call this function or the criManaPlayer_DiscardOneKeepFrame function to release the referenced frame.

When releasing the frame, the Mana player will consider the buffer of the released frame is empty and will use it for decoding.

◆ criManaPlayer_DiscardOneKeepFrame()

void criManaPlayer_DiscardOneKeepFrame ( CriManaPlayerHn  player)

Release frame.

Parameters
[in]playerMana player handle
Call conditions:
This is not thread safe.
Description:
Destroys the oldest frame being kept by the application with the criManaPlayer_KeepFrame function.
Use the criManaPlayer_DiscardFrame function instead if you want the application to expressly specify which frame to destroy.
See also
criManaPlayer_KeepFrame, criManaPlayer_GetNumberOfKeepFrames, criManaPlayer_DiscardFrame

◆ criManaPlayer_SetDataRequestCallback()

void criManaPlayer_SetDataRequestCallback ( CriManaPlayerHn  player,
CriManaPlayerDataRequestCbFunc  func,
void *  obj 
)

Register data request callback.

Parameters
[in]playerMana player handle
[in]funcData request callback
[in]objUser data passed as a data request callback argument
Call conditions:
This is not thread safe.
Description:
Registers the callback function of the movie files requested for concatenated movie playback. This callback function occurs at the following timing.
  • When the movie file has been read.
  • When playback begins with no file specified.

    You can combine and specify the next movie file in the data request callback function by calling the criManaPlayer_SetFile function, the criManaPlayer_SetFileRange function, or the criManaPlayer_SetData function.
    If none of these are called, then playback will finish once the movie that has been read ends.

    Call the criManaPlayer_SetPreviousDataAgain function in the callback function if you want to replay the previously specified movie source.

    When a data request callback occurs, the user object specified during registration will be passed into the second argument usrobj of the callback function. Use this function to manage lists of registered files, etc.

    Movie files that can be played in concatenation have the following conditions.
  • Video resolution is the same
  • Video frame rate is the same (except in instances where the master time is not synchronized) -Video codec is the same
  • Audio and subtitle track compositions are the same
Notes:
The API name from the ::criManaPlayer_SetFileRequestCallback function was changed from Ver.1.10.
See also
criManaPlayer_SetFile, criManaPlayer_SetData, criManaPlayer_SetFileRange, criManaPlayer_SetPreviousDataAgain, criManaPlayer_DeferCallback

◆ criManaPlayer_DeferCallback()

void criManaPlayer_DeferCallback ( CriManaPlayerHn  player)

Request to re-execute the data request callback.

Parameters
[in]playerMana player handle
Call conditions:
This function can only be used in the data request callback function.
However, it cannot call the initial data request callback when a playback began without having registered the files.
Description:
When a registered data request callback occurs in the criManaPlayer_SetDataRequestCallback function, calling it within the callback function will cause a data request callback in the next server processing.
By using this function, if a movie file that should be registered cannot be determined as the data request callback occurs, you can delay the timing of setting the movie file.

Notes:
The Mana player status will transition to CRIMANAPLAYER_STATUS_PLAYEND if nothing happens in the data request callback function.
If this function is executed, then the Mana player status can be maintained as CRIMANAPLAYER_STATUS_PLAYING until the next data request callback is issued.
Attention
You cannot use this function for the initial data request callback called if the file was not registered.
Always use when deferring specifying the second movie or later in concatenated playback.

Ensure that the next movie is registered at the latest 100 milliseconds before the last frame of a registered movie is displayed. Any later than that may be too late to load the next movie, preventing seamless concatenated play.
See also
criManaPlayer_SetFile, criManaPlayer_SetData, criManaPlayer_SetFileRange, criManaPlayer_SetPreviousDataAgain, criManaPlayer_SetDataRequestCallback

◆ criManaPlayer_SetSeekPosition()

void criManaPlayer_SetSeekPosition ( CriManaPlayerHn  player,
CriSint32  seek_frame_no 
)

Set seek position.

Parameters
[in]playerMana player handle
[in]seek_frame_noSeek frame number (change to seek_frame_no)
Call conditions:
Call this function before starting playback (before calling the criManaPlayer_Prepare function or criManaPlayer_Start function).

This is not thread safe.
Description:
Specifies the frame number where seek play will begin.

This function cannot be called during movie playback. To seek during playback, temporarily stop the playback and call this function.

The movie will begin playing from the beginning if this function is not executed or if frame number zero is specified. The movie will also play from the beginning if the specified frame number is greater than the total number of frames in the movie data or a negative value.

Information on seek position settings will remain after this function is called, even if playback on the player is stopped or started.
Caution:
You will need to use the criManaPlayer_SetMetaDataWorkAllocator function and register a meta data memory allocator before seek playback.
See also
criManaPlayer_SetMetaDataWorkAllocator

◆ criManaPlayer_SetMovieEventSyncMode()

void criManaPlayer_SetMovieEventSyncMode ( CriManaPlayerHn  player,
CriManaPlayerMovieEventSyncMode  mode 
)

Set the sync mode of movie events.

Parameters
[in]playerMana player handle
[in]modeMovie event synchronization mode
Call conditions:
Execute this function before starting playback.

This is not thread safe.
Description:
Set the sync mode of movie events (cue points, subtitles).
The default is to synchronize to the movie playback time (CRIMANAPLAYER_EVENT_SYNC_PLAYBACK_TIME). If you want to synchronize with the acquisition of video frames, please specify CRIMANAPLAYER_EVENT_SYNC_FRAME_TIME.
See also
CriManaPlayerMovieEventSyncMode

◆ criManaPlayer_SetSubtitleChannel()

void criManaPlayer_SetSubtitleChannel ( CriManaPlayerHn  player,
CriSint32  channel 
)

Get subtitle channel.

Parameters
[in]playerMana player handle
[in]channelSubtitle channel number
Call conditions:
This is not thread safe.
Description:
Sets the subtitle channel to get. It is set to "no get subtitles" by default.
You can find out how many subtitles are included in the movie to play before playback begins by using the criManaPlayer_DecodeHeader or criManaPlayer_GetMovieInfo function.

You cannot get subtitles if a channel number that does not exist in the data is specified.
Specify CRIMANA_SUBTITLE_CHANNEL_OFF as the channel if you want to use default settings (not to get subtitles).

Periodically execute the criManaPlayer_GetSubtitleOnTime function from the main loop if you specified a subtitle channel with this function. The movie will stop playing midway if subtitles are not periodically gotten.

You can switch subtitle channels during movie playback. However, the actual channel will switch from the next subtitle immediately after the one set.
See also
criManaPlayer_GetSubtitleOnTime

◆ criManaPlayer_GetSubtitleOnTime()

CriUint32 criManaPlayer_GetSubtitleOnTime ( CriManaPlayerHn  player,
CriUint8 *  bufptr,
CriUint32  bufsize 
)

Get subtitles.

Parameters
[in]playerMana player handle
[out]bufptrSubtitle buffer address of the write destination
[in]bufsizeSize of the write subtitle buffer
Returns
CriUint32 Size of the written subtitle data (bytes)
Call conditions:
Call this function when the Mana player handle status is CRIMANAPLAYER_STATUS_PLAYING.
This is not thread safe.
Description:
Gets the time stamped subtitle data. Allocate a subtitle buffer entity when calling this function.
Subtitle data is written to the specified buffer by the argument bufptr.
If the subtitle data is larger than bufsize, then only the amount that can be stored in bufsize will be written, with the rest destroyed.

The buffer contents will clear if there are no time stamped subtitles.

Periodically execute this function from the main loop when specifying a subtitle channel that exists in the criManaPlayer_SetSubtitleChannel function.
The movie will stop midway if it is not executed.
See also
criManaPlayer_GetSubtitleOnTime

◆ criManaPlayer_GetCuePointInfo()

CriManaCuePointInfo* criManaPlayer_GetCuePointInfo ( CriManaPlayerHn  player)

Get a list of Cuepoint information.

Parameters
[in]playerMana player handle
Returns
CriManaCuePointInfo* Cuepoint information
Call conditions:
Call this function after the Mana player handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.
This is not thread safe.
Description:
Gets Ccuepoint information (a list of event points).
The Cuepoint information gotten by this function directly references the playback handle work buffer.
While this information can be referenced when playback has stopped, reference will be prohibited after the next playback begins.
These conditions will not change even if this Cuepoint information is copied to a different memory.
Attention
In order to acquire cue point information, it is necessary to register the memory allocator for metadata in advance using criManaPlayer_SetMetaDataWorkAllocator function.

◆ criManaPlayer_SetCuePointCallback()

void criManaPlayer_SetCuePointCallback ( CriManaPlayerHn  player,
CriManaPlayerCuePointCbFunc  func,
void *  obj 
)

Set Cuepoint callback.

Parameters
[in]playerMana player handle
[in]funcGet Cuepoint callback function
[in]objUser object (optional)
Call conditions:
Call this function before movie playback begins.

This is not thread safe.
Description:
Registers a Cuepoint callback function. This callback function will be called when the movie playback time passes the time specified by each event point. Whether the callback function should be called or not is determined by the criManaPlayer_ExecuteMain function.

When a Cuepoint callback occurs, the event point information is passed into the second argument eventinfo of the callback function, and the user object specified during registration is passed into the third argument usrobj.

You must not call the movie playback control functions (such as the criManaPlayer_Stop function) within the Cuepoint callback function.
Attention
In order to acquire cue point information, it is necessary to register the memory allocator for metadata in advance using criManaPlayer_SetMetaDataWorkAllocator function.

◆ criManaPlayer_CalcFrameNoFromTime()

CriSint32 criManaPlayer_CalcFrameNoFromTime ( CriManaPlayerHn  player,
CriUint64  count,
CriUint64  unit 
)

Calculate frame number from playback time.

Parameters
[in]playerMana player handle
[in]countTimer count
[in]unitTimer count per second. Time is in second units because count / unit.
Returns
CriSint32 frame ID
Call conditions:
You can use this function after the Mana player handle status becomes CRIMANAPLAYER_STATUS_WAIT_PREP.
This is not thread safe.
Description:
Calculates the frame number from the playback time.
Use when you want to calculate the seek play start position from the time. (For example, when determining the seek position from the Cuepoint information.)
See also
criManaPlayer_CalcTimeFromFrameNo

◆ criManaPlayer_CalcTimeFromFrameNo()

CriUint64 criManaPlayer_CalcTimeFromFrameNo ( CriManaPlayerHn  player,
CriSint32  frame_no,
CriUint64  unit 
)

Calculate playback time from the frame number.

Parameters
[in]playerMana player handle
[in]frame_noFrame number
[in]unitTimer count per second. Time is in second units because count / unit.
Returns
Timer count
Call conditions:
You can use this function after the Mana player handle status becomes CRIMANAPLAYER_STATUS_WAIT_PREP.
This is not thread safe.
Description:
Calculates the playback time from the frame number.
You do not need to calculate this if you actually got the frame. Refer to the frame information structure time.
See also
criManaPlayer_CalcFrameNoFromTime

◆ criManaPlayer_SearchNextEventPointByTime()

CriSint32 criManaPlayer_SearchNextEventPointByTime ( CriManaPlayerHn  player,
CriUint64  count,
CriUint64  unit,
CriSint32  type,
CriManaEventPoint eventinfo 
)

Search event point directly after a specified time.

Parameters
[in]playerMana player handle
[in]countTimer count
[in]unitTimer count per second. Time is in second units because count / unit.
[in]typeType value of the event point to be searched
[in]eventinfoInformation on the event point found
Returns
CriSint32 Frame number
Call conditions:
You can use this function after the Mana player handle status becomes CRIMANAPLAYER_STATUS_WAIT_PREP.
This is not thread safe.
Description:
Searches for the next event point after the specified time and gets the frame number and event point information.
It searches for event points by type that match the specified value. Specifying -1 as the type will search for all event points.
The frame number will be returned as -1 if the event point that was searched for could not be found.
See also
criManaPlayer_SearchPrevEventPointByTime

◆ criManaPlayer_SearchPrevEventPointByTime()

CriSint32 criManaPlayer_SearchPrevEventPointByTime ( CriManaPlayerHn  player,
CriUint64  count,
CriUint64  unit,
CriSint32  type,
CriManaEventPoint eventinfo 
)

Search event point directly before a specified time.

Parameters
[in]playerMana player handle
[in]countTimer count
[in]unitTimer count per second. Time is in second units because count / unit.
[in]typeType value of the event point to be searched
[in]eventinfoInformation on the event point found
Returns
CriSint32 Frame number
Call conditions:
You can use this function after the Mana player handle status becomes CRIMANAPLAYER_STATUS_WAIT_PREP.
This is not thread safe.
Description:
Searches for the next event point before the specified time and gets the frame number and event point information.

It searches for event points by type that match the specified value. Specifying -1 as the type will search for all event points.

The frame number will be returned as -1 if the event point that was searched for could not be found.
See also
criManaPlayer_SearchNextEventPointByTime

◆ criManaPlayer_SetSpeed()

void criManaPlayer_SetSpeed ( CriManaPlayerHn  player,
CriSint32  speed_numerator,
CriSint32  speed_denominator 
)

Set playback speed.

Parameters
[in]playerMana player handle
[in]speed_numeratorSpecified speed playback numerator.
[in]speed_denominatorSpecified playback speed denominator.
Call conditions:
Call before the Mana player handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.
However, the playback speed can be changed while the movie is playing as long as the movie being played has no sound.

This is not thread safe.
Description:
Specifies the movie playback speed as a rational number. How fast the movie can be fast-forwarded (how high the playback speed can be increased) depends on the decoding load and the data read rate.
Setting a speed that exceeds playback performance may cause video stuttering or audio dropout.

Example
Numerator (numerator) Denominator (denominator) Meaning
1 1 Same speed playback (default)
2 1 2x playback
1 2 Half speed playback
1000 1001 Play 30fps videos at 29.97fps or 60fps videos at 59.94fps

Caution:
You cannot configure the speed settings while playing movies with sound. If you want to change the playback speed during playback, first stop playback, change the playback speed, and use seek playback from the desired frame number.

Notes:
Some platforms will not let you set the playback speed of movies with audio.

Speed will not change when unsynchronized mode (CRIMANAPLAYER_TIMER_NONE) is specified.

◆ criManaPlayer_SetDecodeMode()

void criManaPlayer_SetDecodeMode ( CriManaPlayerHn  player,
CriManaDecodeMode  mode 
)

Set decode operation mode.

Parameters
[in]playerMana player handle
[in]modeDecode operation mode
Call conditions:
Call before the Mana player handle status is CRIMANAPLAYER_STATUS_WAIT_PREP.

This is thread safe.
Description:
Specifies the Mana player decode operation mode.
Caution:
You cannot change the decode operation mode during playback. Operation mode settings made during playback will be reflected from the next playback.
Notes:
There are limits to what modes can be specified depending on the platform and codec.

◆ criManaPlayer_CalculateExtDecoderWorkSize()

CriSint32 criManaPlayer_CalculateExtDecoderWorkSize ( CriManaPlayerHn  player,
const CriManaPlaybackBasicWorkConfig config_basic,
const CriManaPlaybackExWorkConfig config_ex 
)

Calculate extended decoder work area size.

Parameters
[in]playerMana player handle
[in]config_basicPointer to the basic playback work parameters (required)
[in]config_exPointer to the extended playback work parameters (additional) can be specified as NULL
Returns
CriSint32 Extended decoder work size
Call conditions:
This is thread safe.
Description:
Calculates the size of the extended decoder work area necessary to play the specified movie file.
Returns 0 if extended decoder work is not necessary.

◆ criManaPlayer_SetExtDecoderWork()

void criManaPlayer_SetExtDecoderWork ( CriManaPlayerHn  player,
const CriManaPlaybackBasicWorkConfig config_basic,
const CriManaPlaybackExWorkConfig config_ex,
void *  work,
CriSint32  work_size 
)

Set extended decoder work area.

Parameters
[in]playerMana player handle
[in]config_basicPointer to the basic playback work parameters (required)
[in]config_exPointer to the extended playback work parameters (additional) can be specified as NULL
[in]workWork size allocated by the app (automatically aligned internally)
[in]work_sizeWork size
Call conditions:
Call when the status is CRIMANAPLAYER_STATUS_WAIT_PREP or before.

This is not thread safe.
Description:
Sets the extended decoder work memory necessary to play the specified movie file.

To expressly allocate memory on the application side, check the work size necessary with the criManaPlayer_CalculateExtDecoderWorkSize function and pass the allocated work memory into the argument.
When specifying NULL in work and zero in work_size, it will use the memory allocation function registered by the criManaPlayer_SetExtDecoderWorkAllocator function and allocate memory internally.
Starting a playback without executing this function will automatically use the default play parameters internally to play. When this happens, one condition will be that a memory allocator will be registered with the criManaPlayer_SetExtDecoderWork function.

◆ criManaPlayer_SetNumberOfFramesForPrep()

void criManaPlayer_SetNumberOfFramesForPrep ( CriManaPlayerHn  player,
CriUint32  num_frames 
)

Set number of frames stored during playback preparation.

Parameters
[in]playerMana player handle
[in]num_framesNumber of frames determined when playback preparations are complete (number is less than the number of frame pools)
Description:
Sets the number of decoder frames stored internally during playback preparation.
Unlike the number of frame pools, this setting determines how many frames it needs to decode during CRIMANAPLAYER_STATUS_PREP in order to become CRIMANAPLAYER_STATUS_READY status.

The number of frame pools will apply if nothing is set. Use this function when you want to increase the number of frame pools but minimize the playback latency as much as possible.