1DTK_VIDEO_EXEC(3)             Draw Toolkit manual            DTK_VIDEO_EXEC(3)
2
3
4

NAME

6       dtk_video_exec - Start/stop/pause a video texture
7

SYNOPSIS

9       #include <dtk_video.h>
10
11       int dtk_video_exec(dtk_htex vid, int command, const void* arg);
12

DESCRIPTION

14       This  function  changes the state (or playing position) of a video tex‐
15       ture referenced by vid according to the value of command:
16
17       DTKV_CMD_PLAY: Set the video to play. arg is interpreted as a
18              pointer to a variable of type int whose non zero value indicates
19              that  the state change is asynchronous and can be finished after
20              the function returns. If arg is NULL, the  change  is  performed
21              synchronously.
22
23       DTKV_CMD_PAUSE: Set the video to pause. arg is interpreted as a
24              pointer to a variable of type int whose non zero value indicates
25              that the state change is asynchronous and can be finished  after
26              the  function  returns.  If arg is NULL, the change is performed
27              synchronously.
28
29       DTKV_CMD_SEEK: Seek the video to the position specified by arg
30              which is then interpreted as a pointer to  a  variable  of  type
31              long  representing  the position in milliseconds from the begin‐
32              ning of the video.  arg is allowed to be NULL. In that case, the
33              video will be positioned at its start.
34
35       vid  must be a dynamic texture created by one of the functions dtk_cre‐
36       ate_video_*(3). If the video was already in the  requested  state,  the
37       function will do nothing.
38
39       If  the  video  is created from the live source (webcam, network broad‐
40       cast...), executing DTKV_CMD_SEEK will fail.
41

RETURN VALUE

43       0 if the state has been changed or was already the  one  requested,  -1
44       otherwise.
45

SEE ALSO

47       dtk_load_video_file(3),  dtk_load_video_gst(3), dtk_load_video_test(3),
48       dtk_load_video_udp(3), dtk_load_video_tcp(3)
49
50
51
52
53
54EPFL                                 2011                    DTK_VIDEO_EXEC(3)
Impressum