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

NAME

6       dtk_load_video_file - Load an video file as a texture
7

SYNOPSIS

9       #include <dtk_video.h>
10
11       dtk_htex dtk_load_video_file(int flags, const char *filename);
12

DESCRIPTION

14       This  function loads the video file specified by filename argument as a
15       dynamic texture. The texture will then been tracked by an internal tex‐
16       ture  manager  so  that  the next call using the same filename argument
17       will return the same texture handle, thus sparing the resources of  the
18       system.  If not specified by flags the video will not be played immedi‐
19       ately and dtk_video_exec(3) should be called to do start playing.
20
21       The argument flags is used to modify the creation. It should contains a
22       bitwise OR combination of the following flags:
23
24              DTK_AUTOSTART  :  Indicates  that the video should start immedi‐
25              ately after creation.
26
27              DTK_NOBLOCKING : Indicates that the creation function should not
28              block waiting that the video pipeline is fully running.
29
30       A  dynamic  texture  can  be used the same way as a static texture (for
31       example image file). The only difference is that  the  content  of  the
32       texture changes automatically with the stream of video. This means that
33       every time a shape using this texture is drawn, the latest frame avail‐
34       able from the video stream will be mapped on the shape.
35
36       There  is  no need for a valid window to create successfully a texture,
37       i.e.  creation of textures are completely decoupled from  the  creation
38       of others resources and can even be created in one thread to be used in
39       another one.
40
41       Once a the texture is stopped being used, it  should  be  destroyed  by
42       dtk_destroy_texture(3).
43

RETURN VALUE

45       In case of success, the function returns the handle to the created tex‐
46       ture.  In case of failure, NULL is returned.
47

THREAD SAFETY

49       dtk_load_video_file() is thread-safe.
50

SEE ALSO

52       dtk_destroy_texture(3), dtk_video_exec(3), dtk_video_getstate(3)
53
54
55
56
57
58EPFL                                 2011               DTK_LOAD_VIDEO_FILE(3)
Impressum