Query: dtk_video_exec
OS: debian
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DTK_VIDEO_EXEC(3) Draw Toolkit manual DTK_VIDEO_EXEC(3)NAMEdtk_video_exec - Start/stop/pause a video textureSYNOPSIS#include <dtk_video.h> int dtk_video_exec(dtk_htex vid, int command, const void* arg);DESCRIPTIONThis function changes the state (or playing position) of a video texture referenced by vid according to the value of command: DTKV_CMD_PLAY: Set the video to play. arg is interpreted as a pointer to a variable of type int whose non zero value indicates that the state change is asynchronous and can be finished after the function returns. If arg is NULL, the change is performed synchronously. DTKV_CMD_PAUSE: Set the video to pause. arg is interpreted as a pointer to a variable of type int whose non zero value indicates that the state change is asynchronous and can be finished after the function returns. If arg is NULL, the change is performed synchronously. DTKV_CMD_SEEK: Seek the video to the position specified by arg which is then interpreted as a pointer to a variable of type long representing the position in milliseconds from the beginning of the video. arg is allowed to be NULL. In that case, the video will be positioned at its start. vid must be a dynamic texture created by one of the functions dtk_create_video_*(3). If the video was already in the requested state, the function will do nothing. If the video is created from the live source (webcam, network broadcast...), executing DTKV_CMD_SEEK will fail.RETURN VALUE0 if the state has been changed or was already the one requested, -1 otherwise.SEE ALSOdtk_load_video_file(3), dtk_load_video_gst(3), dtk_load_video_test(3), dtk_load_video_udp(3), dtk_load_video_tcp(3)EPFL2011 DTK_VIDEO_EXEC(3)