CRI ADX  Last Updated: 2024-07-17 10:48 p
CriAtomDbas API

结构体

struct  CriAtomDbasConfigTag
 D-BAS creation parameter structure 更多...
 

宏定义

#define CRIATOMDBAS_ILLEGAL_ID   (-1)
 Atom D-BAS ID 更多...
 
#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS   (4)
 Default number of guaranteed buffers for creating D-BAS 更多...
 
#define CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS   (2)
 Minimum number of guaranteed buffers that can be specified for creating D-BAS 更多...
 
#define criAtomDbas_SetDefaultConfig(p_config)
 Set default parameters for CriAtomDbasConfig 更多...
 

类型定义

typedef CriSint32 CriAtomDbasId
 Atom D-BAS ID 更多...
 
typedef struct CriAtomDbasConfigTag CriAtomDbasConfig
 D-BAS creation parameter structure 更多...
 

函数

CriSint32 criAtomDbas_CalculateWorkSize (const CriAtomDbasConfig *config)
 Calculate work area size for creating D-BAS 更多...
 
CriAtomDbasId criAtomDbas_Create (const CriAtomDbasConfig *config, void *work, CriSint32 work_size)
 Create D-BAS 更多...
 
void criAtomDbas_Destroy (CriAtomDbasId atom_dbas_id)
 Destroy D-BAS 更多...
 
CriSint32 criAtomDbas_GetStreamingPlayerHandles (CriAtomDbasId dbas_id, CriAtomPlayerHn *players, CriSint32 length)
 Get Atom player handle in streaming playback 更多...
 

详细描述

宏定义说明

◆ CRIATOMDBAS_ILLEGAL_ID

#define CRIATOMDBAS_ILLEGAL_ID   (-1)

Atom D-BAS ID

Description:
Value returned when the criAtomDbas_Create function fails.
参见
criAtomDbas_Create, criAtomDbas_Destroy

◆ CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS

#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS   (4)

Default number of guaranteed buffers for creating D-BAS

Description:
Default number of guaranteed buffers for creating D-BAS. A safe value is set so that streaming is played without interruption even for sound data with extremely little data at the beginning and end of the loop.
参见
criAtomDbas_Create, criAtomDbas_CalculateWorkSize

◆ CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS

#define CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS   (2)

Minimum number of guaranteed buffers that can be specified for creating D-BAS

Description:
Minimum number of guaranteed buffers that can be specified for creating D-BAS. For streaming playback without interruption, at least two buffers are required (double buffering). Therefore, this value cannot be smaller than 2.
参见
criAtomDbas_Create, criAtomDbas_CalculateWorkSize

◆ criAtomDbas_SetDefaultConfig

#define criAtomDbas_SetDefaultConfig (   p_config)
值:
{\
(p_config)->identifier = 0;\
(p_config)->max_streams = CRIATOM_DEFAULT_DBAS_MAX_STREAMS;\
(p_config)->max_bps = CRIATOM_DEFAULT_DBAS_MAX_BPS;\
(p_config)->max_mana_streams = 0;\
(p_config)->max_mana_bps = 0;\
(p_config)->num_securement_buffers = CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS;\
}
#define CRIATOM_DEFAULT_DBAS_MAX_BPS
Default initialization maximum bit rate for creating D-BAS
Definition: cri_le_atom.h:114
#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS
Default number of guaranteed buffers for creating D-BAS
Definition: cri_le_atom.h:128

Set default parameters for CriAtomDbasConfig

参数
[in]p_configpointer to the configuration structure for creating D-BAS
Description:
Sets default values for the configuration structure ( CriAtomDbasConfig ) that is set for the criAtomDbas_Create function.
参见
CriAtomDbasConfig, criAtomDbas_Create, criAtomDbas_CalculateWorkSize

类型定义说明

◆ CriAtomDbasId

typedef CriSint32 CriAtomDbasId

Atom D-BAS ID

Description:
ID for managing D-BAS.
The ID can be acquired by creating D-BAS using the criAtomDbas_Create function.
Applications use this D-BAS ID only for destroying D-BAS.
参见
criAtomDbas_Create, criAtomDbas_Destroy

◆ CriAtomDbasConfig

D-BAS creation parameter structure

Description:
D-BAS creation parameter structure specified as argument of the criAtomDbas_Create function.

注意
More members will be added in the future. So, when not using the criAtomDbas_SetDefaultConfig macro, make sure to initialize the structure to zero before using it.
(Make sure that no indefinite value is set to any member of the structure.)
参见
criAtomDbas_Create, criAtomDbas_CalculateWorkSize, criAtomDbas_SetDefaultConfig

函数说明

◆ criAtomDbas_CalculateWorkSize()

CriSint32 criAtomDbas_CalculateWorkSize ( const CriAtomDbasConfig config)

Calculate work area size for creating D-BAS

参数
[in]configpointer to the configuration structure for creating D-BAS
[out]CriSint32work area size for creating D-BAS
返回值
>=0 successfully completed
-1error occurred
Description:
Calculates the work area size required for creating a D-BAS based on the D-BAS creation parameters.

If work area size calculation fails, this function returns -1.
The reason for work area size calculation failure can be determined by viewing the error callback message.
注意
You must initialize the library before executing this function.

Depending on the setting, D-BAS may required 2GB or greater work size
in which case an error occurs and -1 is returned.
If an error occurs, reduce the value of max_streams or max_bps.
参见
criAtomDbas_Create

◆ criAtomDbas_Create()

CriAtomDbasId criAtomDbas_Create ( const CriAtomDbasConfig config,
void *  work,
CriSint32  work_size 
)

Create D-BAS

参数
[in]configpointer to the configuration structure for creating D-BAS.
[in]workpointer to the work area for creating D-BAS
[in]work_sizework area size used for creating D-BAS
返回
CriAtomDbasId D-BAS management ID
Description:
Creates a D-BAS based on the D-BAS creation parameters.
When the function creates D-BAS successfully, it registers the D-BAS to the library and returns a valid management ID.
If the creation of the D-BAS fails, this function returns CRIATOMDBAS_ILLEGAL_ID .
(The cause of the error will be returned in the error callback.)

The obtained ID is used in the criAtomDbas_Destroy function.
注意
The library must be initialized before this function is executed.
参见
criAtomDbas_CalculateWorkSize, criAtomDbas_Destroy

◆ criAtomDbas_Destroy()

void criAtomDbas_Destroy ( CriAtomDbasId  atom_dbas_id)

Destroy D-BAS

参数
[in]atom_dbas_idD-BAS management ID
Description:
Destroys D-BAS specified by the management ID obtained with the criAtomDbas_Create function.
参见
criAtomDbas_Create

◆ criAtomDbas_GetStreamingPlayerHandles()

CriSint32 criAtomDbas_GetStreamingPlayerHandles ( CriAtomDbasId  dbas_id,
CriAtomPlayerHn players,
CriSint32  length 
)

Get Atom player handle in streaming playback

参数
[in]dbas_idD-BAS management ID
[out]playersarray for recieving player handles
[in]lengthnumber of elements for the above array
返回
CriSint32 number of players
返回值
>=0 successfully completed
-1error occurred
Description:
Gets an Atom player handle that is in streaming playback.
If successfully getting a player handle, the address of the player handle is stored in the third argument (the players array), and the number of player handles is returned as a return value.
Remarks:
By specifying NULL for the third argument (the players array) and 0 for the fourth argument (the length), only the number of players that are playing stream can be returned.
注意
If you want to obtain the handle after obtaining the number of players, you must use the criAtom_Lock function for exclusive control to prevent server processing from interrupting between obtaining the number of players and obtaining the handle.
(The number of players may change depending on the timing of server processing.)

If the number of elements is less than the number of players in streaming, this function returns an error value (-1).