188 lines
7.3 KiB
C
188 lines
7.3 KiB
C
#ifndef __CELOXICA_GMAC_INFO_H__
|
|
#define __CELOXICA_GMAC_INFO_H__
|
|
|
|
#include "gmac_object.h"
|
|
#include "gmac.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum
|
|
{
|
|
SRC_CHANNEL_UNDEF = 0x00,
|
|
SRC_CHANNEL_LIVE = 0x01,
|
|
SRC_CHANNEL_SNAP = 0x02,
|
|
SRC_CHANNEL_REFERENTIAL = 0x4,
|
|
SRC_CHANNEL_RETRANSMISSION = 0x8,
|
|
SRC_CHANNEL_MBP = 0x10,
|
|
SRC_CHANNEL_MBO = 0x20,
|
|
SRC_CHANNEL_MAX = SRC_CHANNEL_MBO + 1
|
|
} GMACChannelFunctionalType_t;
|
|
|
|
typedef enum
|
|
{
|
|
SRC_CHANNEL_ARBITRAGE_NONE,
|
|
SRC_CHANNEL_ARBITRAGE_A,
|
|
SRC_CHANNEL_ARBITRAGE_B,
|
|
} GMACChannelArbitrage_t;
|
|
|
|
|
|
typedef enum
|
|
{
|
|
PLUGIN_TYPE_UNAVAILABLE,
|
|
PLUGIN_TYPE_LLDT,
|
|
PLUGIN_TYPE_SOCKET,
|
|
PLUGIN_TYPE_CLXNG,
|
|
PLUGIN_TYPE_FILE,
|
|
PLUGIN_TYPE_API
|
|
} GMACSrcChannelPluginType_t ;
|
|
|
|
|
|
typedef enum
|
|
{
|
|
GMAC_PROP_STOP = 0,
|
|
GMAC_ROOT_PROP_OFFSET = 1,
|
|
GMAC_MARKET_PROP_OFFSET = 300,
|
|
GMAC_PROP_MARKET_ID, ///< GMACObjID* type of market id.
|
|
GMAC_PROP_MARKET_NAME, ///< const char* type market name
|
|
GMAC_PROP_MARKET_PLUGIN_NAME, ///< const char* type market plugin name
|
|
GMAC_PROP_MARKET_TRANSCODING_TYPE, ///< const GMACTranscodingType* type market transcoding type
|
|
GMAC_PROP_MARKET_FILTERING_MODE, ///< const GMACFilteringMode* type market filtering mode
|
|
GMAC_QUEUE_PROP_OFFSET = 600,
|
|
GMAC_PROP_QUEUE_ID, ///< GMACObjID* type of queue id.
|
|
GMAC_SRC_CHANNEL_OFFSET = 900,
|
|
GMAC_PROP_SRC_CHANNEL_ID,
|
|
GMAC_PROP_SRC_CHANNEL_CONFIG_ID, ///< uint32_t* to id from configuration file otherwise it is -1.
|
|
GMAC_PROP_SRC_CHANNEL_FUNCTIONAL_TYPE, ///< uint32_t* bit mask of GMACChannelFunctionalType_t
|
|
GMAC_PROP_SRC_CHANNEL_ARBITRAGE, ///< GMACChannelArbitrage_t* the arbitrage of the source
|
|
GMAC_PROP_SRC_CHANNEL_INETIP_ADDR, ///< inet ip represtation
|
|
GMAC_PROP_SRC_CHANNEL_IP_ADDR, ///< const char* type market plugin name
|
|
GMAC_PROP_SRC_CHANNEL_PORT,
|
|
GMAC_PROP_SRC_ARB_LINKED_CHANNEL_ID, ///< Arbitrage linked src id.
|
|
GMAC_PROP_SRC_CHANNEL_PLUGIN_TYPE, ///< GMACSrcChannelPluginType_t*
|
|
GMAC_DST_CHANNEL_OFFSET = 1200,
|
|
GMAC_PROP_DST_CHANNEL_ID,
|
|
GMAC_PROP_MAX
|
|
} GMACObjProp_t;
|
|
|
|
typedef enum
|
|
{
|
|
GMAC_PROP_TYPE_VOID,
|
|
GMAC_PROP_TYPE_CHAR,
|
|
GMAC_PROP_TYPE_UINT8,
|
|
GMAC_PROP_TYPE_UINT16,
|
|
GMAC_PROP_TYPE_UINT32,
|
|
GMAC_PROP_TYPE_ENUM,
|
|
GMAC_PROP_TYPE_OBJID,
|
|
GMAC_PROP_TYPE_UINT64,
|
|
GMAC_PROP_TYPE_INT8,
|
|
GMAC_PROP_TYPE_INT16,
|
|
GMAC_PROP_TYPE_INT32,
|
|
GMAC_PROP_TYPE_INT64,
|
|
GMAC_PROP_TYPE_DOUBLE,
|
|
GMAC_PROP_TYPE_STRING,
|
|
|
|
} GMACObjPropType_t;
|
|
|
|
typedef struct
|
|
{
|
|
GMACObjProp_t Prop;
|
|
const char* Description;
|
|
GMACObjPropType_t Type;
|
|
} GMACObjPropDesc_t;
|
|
|
|
static const GMACObjPropDesc_t GMACObjPropToString [] GMAC_UNUSED = {
|
|
{ GMAC_PROP_STOP, NULL, GMAC_PROP_TYPE_VOID },
|
|
{ GMAC_ROOT_PROP_OFFSET, NULL, GMAC_PROP_TYPE_VOID },
|
|
{ GMAC_MARKET_PROP_OFFSET, NULL, GMAC_PROP_TYPE_VOID },
|
|
{ GMAC_PROP_MARKET_ID, "MARKET_ID", GMAC_PROP_TYPE_OBJID },
|
|
{ GMAC_PROP_MARKET_NAME, "MARKET_NAME", GMAC_PROP_TYPE_STRING },
|
|
{ GMAC_PROP_MARKET_PLUGIN_NAME, "PLUGIN_NAME", GMAC_PROP_TYPE_STRING },
|
|
{ GMAC_PROP_MARKET_TRANSCODING_TYPE, "TRANSCODING_TYPE", GMAC_PROP_TYPE_ENUM },
|
|
{ GMAC_PROP_MARKET_FILTERING_MODE, "FILTERING_MODE", GMAC_PROP_TYPE_ENUM },
|
|
{ GMAC_QUEUE_PROP_OFFSET, NULL, GMAC_PROP_TYPE_VOID },
|
|
{ GMAC_PROP_QUEUE_ID, "QUEUE_ID", GMAC_PROP_TYPE_OBJID },
|
|
{ GMAC_SRC_CHANNEL_OFFSET, NULL, GMAC_PROP_TYPE_VOID},
|
|
{ GMAC_PROP_SRC_CHANNEL_ID, "SRC_CHANNEL_ID", GMAC_PROP_TYPE_OBJID },
|
|
{ GMAC_PROP_SRC_CHANNEL_CONFIG_ID, "SRC_CHANNEL_CONFIG_ID", GMAC_PROP_TYPE_UINT32 },
|
|
{ GMAC_PROP_SRC_CHANNEL_FUNCTIONAL_TYPE, "SRC_CHANNEL_FUNCTIONAL_TYPE", GMAC_PROP_TYPE_ENUM },
|
|
{ GMAC_PROP_SRC_CHANNEL_ARBITRAGE, "SRC_CHANNEL_ARBITRAGE", GMAC_PROP_TYPE_ENUM },
|
|
{ GMAC_PROP_SRC_CHANNEL_INETIP_ADDR, "SRC_CHANNEL_INET_ADDR", GMAC_PROP_TYPE_UINT32 },
|
|
{ GMAC_PROP_SRC_CHANNEL_IP_ADDR, "SRC_CHANNEL_IP_ADDR", GMAC_PROP_TYPE_STRING },
|
|
{ GMAC_PROP_SRC_CHANNEL_PORT, "SRC_CHANNEL_PORT", GMAC_PROP_TYPE_UINT16 },
|
|
{ GMAC_PROP_SRC_ARB_LINKED_CHANNEL_ID, "SRC_CHANNEL_LINKED_CHANNEL_ID", GMAC_PROP_TYPE_OBJID },
|
|
{ GMAC_PROP_SRC_CHANNEL_PLUGIN_TYPE, "SRC_CHANNEL_PLUGIN_TYPE", GMAC_PROP_TYPE_ENUM },
|
|
{ GMAC_DST_CHANNEL_OFFSET, NULL, GMAC_PROP_TYPE_VOID },
|
|
{ GMAC_PROP_DST_CHANNEL_ID, "DST_CHANNEL_ID", GMAC_PROP_TYPE_OBJID },
|
|
{ GMAC_PROP_MAX, NULL, GMAC_PROP_TYPE_VOID }
|
|
};
|
|
/**
|
|
* GMACGetObjCount : Retrieve a number of objects the user describe.
|
|
* @param handle : GMACHandle returned by GMACOpen.
|
|
* @param parentType : The type of object that contains the requested count
|
|
* @param parentID : The id of object that contains the requested count
|
|
* @param typeToCount : The type of object you want to count.
|
|
* @param count (out) : will hold the counted if the call succeed.
|
|
* @return : GMAC_STATUS_OK in case of success otherwise GMAC_STATUS_PARAM_ERROR
|
|
*
|
|
* example to count source channels for a market with id = 3,
|
|
* GMACGetObjCount(handle, GMAC_OBJ_MARKET, 3, GMAC_OBJ_SRC_CHANNEL, &count);
|
|
*/
|
|
extern GMACStatus GMACGetObjCount(GMACHandle* handle,
|
|
const GMACObjType parentType,
|
|
const GMACObjID parentId,
|
|
const GMACObjType typeToCount,
|
|
uint32_t* count);
|
|
|
|
/**
|
|
* GMACGetObjList : Retrieve a ids of objects the user describe.
|
|
* @param handle : GMACHandle returned by GMACOpen.
|
|
* @param parentType : The type of object that contains the requested enumerate
|
|
* @param parentID : The id of object that contains the requested enumerate
|
|
* @param typeToEnumerate : The type of object you want to enumerate.
|
|
* @param objctVector (out) : will hold the the id of enumerated objects
|
|
* @param countedObj (out) : will hold the number of ids filled in objctVector
|
|
* @param objectVectorSize : the size reserved of objectVector to check against object count
|
|
* @return : GMAC_STATUS_OK in case of success otherwise GMAC_STATUS_PARAM_ERROR
|
|
*
|
|
* example to count source channels for a market with id = 3,
|
|
* GMACObjID objVect[1024];
|
|
* uint32_t count = 0;
|
|
* GMACGetObjList(handle, GMAC_OBJ_MARKET, 3, GMAC_OBJ_SRC_CHANNEL,
|
|
* objVect, &count, 1024);
|
|
*/
|
|
extern GMACStatus GMACGetObjList(GMACHandle* handle,
|
|
const GMACObjType parentType,
|
|
const GMACObjID parentId,
|
|
const GMACObjType typeToEnumerate,
|
|
GMACObjID* objctVector,
|
|
uint32_t* countedObj,
|
|
const size_t objectVectorSize);
|
|
|
|
/**
|
|
* GMACGetObjProps : Retrive a property(ies) of an object addressed by type and id,
|
|
* The output value is a pointer that depend on asked property.
|
|
* This is a sentinel function that means the params should end with NULL
|
|
* @param handle : GMACHandle returned by GMACOpen.
|
|
* @param objType : The type of object
|
|
* @param objId : id of the object
|
|
* @param firstProp : the first property to retieve in a property list
|
|
* @param va_list : a list of ptr, prop, ptr ... ended by NULL
|
|
* @return : GMAC_STATUS_OK in case of success otherwise GMAC_STATUS_PARAM_ERROR
|
|
*/
|
|
|
|
extern GMACStatus GMACGetObjProps(GMACHandle* handle,
|
|
const GMACObjType objType,
|
|
const GMACObjID objId, GMACObjProp_t firstProp, ...) __attribute__ ((sentinel));
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif /* __CELOXICA_GMAC_INFO_H__ */
|