![]() |
OpenNI 1.5.4
|
| XN_C_API XnStatus XN_C_DECL 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 XN_C_DECL 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 XnDouble XN_C_DECL xnGetPlaybackSpeed | ( | XnNodeHandle | hInstance | ) |
Gets the playback speed. see xnSetPlaybackSpeed() for more details.
| hInstance | [in] A handle to the player. |
| XN_C_API XnStatus XN_C_DECL 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 XN_C_DECL 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. |
| const XN_C_API XnChar* XN_C_DECL xnGetPlayerSupportedFormat | ( | XnNodeHandle | hPlayer | ) |
Gets the name of the format supported by a player.
| hPlayer | [in] A handle to the player. |
| XN_C_API XnBool XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL xnSetPlaybackSpeed | ( | XnNodeHandle | hInstance, |
| XnDouble | dSpeed | ||
| ) |
Sets the playback speed, as a ratio of the time passed in the recording. A value of 1.0 means the player will try to output frames in the rate they were recorded (according to their timestamps). A value bigger than 1.0 means fast-forward, and a value between 0.0 and 1.0 means slow-motion. The special value of XN_PLAYBACK_SPEED_FASTEST (0.0) means there will be no delay, and that frames will be returned as soon as asked for.
| hInstance | [in] A handle to the player. |
| dSpeed | [in] The speed ratio (see function description). |
| XN_C_API XnStatus XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL 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 XN_C_DECL 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(). |