Functions | |
XN_C_API XnStatus | xnCreatePlayer (XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phPlayer) |
Creates a player. | |
XN_C_API XnStatus | xnEnumeratePlayerNodes (XnNodeHandle hPlayer, XnNodeInfoList **ppList) |
Retrieves a list of the nodes played by a player. | |
XN_C_API XnStatus | xnGetPlayerNumFrames (XnNodeHandle hPlayer, const XnChar *strNodeName, XnUInt32 *pnFrames) |
Retrieves the number of frames of a specific node played by a player. | |
XN_C_API XnStatus | xnGetPlayerSource (XnNodeHandle hPlayer, XnRecordMedium *pSourceType, XnChar *strSource, XnUInt32 nBufSize) |
Gets the player's source, i.e where the played events come from. | |
XN_C_API const XnChar * | xnGetPlayerSupportedFormat (XnNodeHandle hPlayer) |
Gets the name of the format supported by a player. | |
XN_C_API XnBool | xnIsPlayerAtEOF (XnNodeHandle hPlayer) |
Checks whether the player is at the end-of-file marker. | |
XN_C_API XnStatus | xnPlayerReadNext (XnNodeHandle hPlayer) |
Reads the next data element from the player. | |
XN_C_API XnStatus | xnRegisterToEndOfFileReached (XnNodeHandle hPlayer, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback) |
Registers a callback function to be called when end-of-file is reached. | |
XN_C_API XnStatus | xnSeekPlayerToFrame (XnNodeHandle hPlayer, const XnChar *strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin) |
Seeks the player to a specific frame of a specific played node, so that playing will continue from that frame onwards. | |
XN_C_API XnStatus | xnSeekPlayerToTimeStamp (XnNodeHandle hPlayer, XnInt64 nTimeOffset, XnPlayerSeekOrigin origin) |
Seeks the player to a specific timestamp, so that playing will continue from that point onwards. | |
XN_C_API XnStatus | xnSetPlayerRepeat (XnNodeHandle hPlayer, XnBool bRepeat) |
Determines whether the player will automatically rewind to the beginning of the recording when reaching the end. | |
XN_C_API XnStatus | xnSetPlayerSource (XnNodeHandle hPlayer, XnRecordMedium sourceType, const XnChar *strSource) |
Sets the source for the player, i.e. where the played events will come from. | |
XN_C_API XnStatus | xnTellPlayerFrame (XnNodeHandle hPlayer, const XnChar *strNodeName, XnUInt32 *pnFrame) |
Reports the current frame number of a specific node played by a player. | |
XN_C_API XnStatus | xnTellPlayerTimestamp (XnNodeHandle hPlayer, XnUInt64 *pnTimestamp) |
Reports the current timestamp of a player, i.e. the amount of time passed since the beginning of the recording. | |
XN_C_API void | xnUnregisterFromEndOfFileReached (XnNodeHandle hInstance, XnCallbackHandle hCallback) |
Unregisters a callback function which was registered using xnRegisterToEndOfFileReached(). |
A Player node is a Production Node that allows playing of a recording. It supports all Production Node functions, and adds additional functions.
XN_C_API XnStatus xnCreatePlayer | ( | XnContext * | pContext, |
const XnChar * | strFormatName, | ||
XnNodeHandle * | phPlayer | ||
) |
Creates a player.
pContext | [in] The context in which to create the player. |
strFormatName | [in] The name of the recording format that the created player should play. |
phPlayer | [out] Pointer to the created player handle. |
XN_C_API XnStatus xnEnumeratePlayerNodes | ( | XnNodeHandle | hPlayer, |
XnNodeInfoList ** | ppList | ||
) |
Retrieves a list of the nodes played by a player.
hPlayer | [in] A handle to the player. |
ppList | [out] A pointer to the retrieved list of nodes. |
XN_C_API XnStatus xnGetPlayerNumFrames | ( | XnNodeHandle | hPlayer, |
const XnChar * | strNodeName, | ||
XnUInt32 * | pnFrames | ||
) |
Retrieves the number of frames of a specific node played by a player.
hPlayer | [in] A handle to the player. |
strNodeName | [in] The name of the node for which to retrieve the number of frames. |
pnFrames | [out] A pointer to the retrieved number of frames. |
XN_C_API XnStatus xnGetPlayerSource | ( | XnNodeHandle | hPlayer, |
XnRecordMedium * | pSourceType, | ||
XnChar * | strSource, | ||
XnUInt32 | nBufSize | ||
) |
Gets the player's source, i.e where the played events come from.
hPlayer | [in] A handle to the player. |
pSourceType | [out] The player's source type. |
strSource | [in] The player's source. |
nBufSize | [in] The size of the buffer specified by strSource. |
XN_C_API const XnChar* xnGetPlayerSupportedFormat | ( | XnNodeHandle | hPlayer | ) |
Gets the name of the format supported by a player.
hPlayer | [in] A handle to the player. |
XN_C_API XnBool xnIsPlayerAtEOF | ( | XnNodeHandle | hPlayer | ) |
Checks whether the player is at the end-of-file marker.
hPlayer | [in] A handle to the player. |
XN_C_API XnStatus xnPlayerReadNext | ( | XnNodeHandle | hPlayer | ) |
Reads the next data element from the player.
Can cause data updates and/or property updates of the played nodes.
hPlayer | [in] A handle to the player. |
XN_C_API XnStatus xnRegisterToEndOfFileReached | ( | XnNodeHandle | hPlayer, |
XnStateChangedHandler | handler, | ||
void * | pCookie, | ||
XnCallbackHandle * | phCallback | ||
) |
Registers a callback function to be called when end-of-file is reached.
hPlayer | [in] A handle to the player. |
handler | [in] A pointer to a function that will be called. |
pCookie | [in] A user cookie that will be passed to the callback function. |
phCallback | [out] Will be filled with a handle to be passed to xnUnregisterFromEndOfFileReached(). |
XN_C_API XnStatus xnSeekPlayerToFrame | ( | XnNodeHandle | hPlayer, |
const XnChar * | strNodeName, | ||
XnInt32 | nFrameOffset, | ||
XnPlayerSeekOrigin | origin | ||
) |
Seeks the player to a specific frame of a specific played node, so that playing will continue from that frame onwards.
hPlayer | [in] A handle to the player. |
strNodeName | [in] The name of the node whose frame is to be sought. |
nFrameOffset | [in] The number of frames to move, relative to the specified origin. See the remark below. |
origin | [in] The origin to seek from. See the remark below. |
origin | Meaning of the nFrameOffset parameter |
XN_PLAYER_SEEK_SET | nFrameOffset specifies the total number of frames since the beginning of the node's recording. Note that nFrameOffset will be case to XnUInt64 in this case. |
XN_PLAYER_SEEK_CUR | nFrameOffset specifies the number of frames to move, relative to the current frame of the specifies node. A positive value means move forward, and a negative value means move backwards. |
XN_PLAYER_SEEK_END | nFrameOffset specifies the number of frames to move, relative to the end of the node's recording. This must be a negative value. |
XN_C_API XnStatus xnSeekPlayerToTimeStamp | ( | XnNodeHandle | hPlayer, |
XnInt64 | nTimeOffset, | ||
XnPlayerSeekOrigin | origin | ||
) |
Seeks the player to a specific timestamp, so that playing will continue from that point onwards.
hPlayer | [in] A handle to the player. |
nTimeOffset | [in] The offset, in microseconds, to move, relative to the specified origin. See the remark below. |
origin | [in] The origin to seek from. See the remark below. |
origin | Meaning of the nTimeOffset parameter |
XN_PLAYER_SEEK_SET | nTimeOffset specifies the total time passed since the beginning of the recording. Note that nTimeOffset will be case to XnUInt64 in this case. |
XN_PLAYER_SEEK_CUR | nTimeOffset specifies a period of time to move, relative to the current player position. A positive value means move forward, and a negative value means move backwards. |
XN_PLAYER_SEEK_END | nTimeOffset specifies a period of time to move, relative to the end of the recording. This must be a negative value. |
XN_C_API XnStatus xnSetPlayerRepeat | ( | XnNodeHandle | hPlayer, |
XnBool | bRepeat | ||
) |
Determines whether the player will automatically rewind to the beginning of the recording when reaching the end.
hPlayer | [in] A handle to the player. |
bRepeat | [in] Determines whether the player will repeat or not. |
XN_C_API XnStatus xnSetPlayerSource | ( | XnNodeHandle | hPlayer, |
XnRecordMedium | sourceType, | ||
const XnChar * | strSource | ||
) |
Sets the source for the player, i.e. where the played events will come from.
The only supported source type at this point is a file.
hPlayer | [in] A handle to the player. |
sourceType | [in] The type of source to set. Currently only XN_RECORD_MEDIUM_FILE is supported. |
strSource | [in] The source from which to play. If sourceType is XN_RECORD_MEDIUM_FILE, strSource specifies a file name. |
XN_C_API XnStatus xnTellPlayerFrame | ( | XnNodeHandle | hPlayer, |
const XnChar * | strNodeName, | ||
XnUInt32 * | pnFrame | ||
) |
Reports the current frame number of a specific node played by a player.
hPlayer | [in] A handle to the player. |
strNodeName | [in] The name of the node for which to report the frame number. |
pnFrame | [out] A pointer to the reported frame number. |
XN_C_API XnStatus xnTellPlayerTimestamp | ( | XnNodeHandle | hPlayer, |
XnUInt64 * | pnTimestamp | ||
) |
Reports the current timestamp of a player, i.e. the amount of time passed since the beginning of the recording.
hPlayer | [in] A handle to the player. |
pnTimestamp | [out] A pointer to the retrieved timestamp in microseconds. |
XN_C_API void xnUnregisterFromEndOfFileReached | ( | XnNodeHandle | hInstance, |
XnCallbackHandle | hCallback | ||
) |
Unregisters a callback function which was registered using xnRegisterToEndOfFileReached().
hInstance | [in] A handle to the player. |
hCallback | [in] The handle to the callback returned from xnRegisterToEndOfFileReached(). |