.\"Copyright 2011 (c) EPFL .TH DTK_LOAD_VIDEO_TEST 3 2011 "EPFL" "Draw Toolkit manual" .SH NAME dtk_load_video_test - Load an test video as a texture .SH SYNOPSIS .LP .B #include .sp .BI "dtk_htex dtk_load_video_test(int " flags ");" .br .SH DESCRIPTION .LP This function loads a test video file as a dynamic texture. The texture will then been tracked by an internal texture manager so that the next call will return the same texture handle, thus sparing the resources of the system. If not specified by \fIflags\fP the video will not be played immediately and \fBdtk_video_exec\fP(3) should be called to do start playing. .LP The argument \fIflags\fP is used to modify the creation. It should contains a bitwise OR combination of the following flags: .IP \fBDTK_AUTOSTART\fP : Indicates that the video should start immediately after creation. .IP \fBDTK_NOBLOCKING\fP : Indicates that the creation function should not block waiting that the video pipeline is fully running. .LP A dynamic texture can be used the same way as a static texture (for example image file). The only difference is that the content of the texture changes automatically with the stream of video. This means that every time a shape using this texture is drawn, the latest frame available from the video stream will be mapped on the shape. .LP There is no need for a valid window to create successfully a texture, i.e. creation of textures are completely decoupled from the creation of others resources and can even be created in one thread to be used in another one. .LP Once a the texture is stopped being used, it should be destroyed by \fBdtk_destroy_texture\fP(3). .SH "RETURN VALUE" .LP In case of success, the function returns the handle to the created texture. In case of failure, \fINULL\fP is returned. .SH "THREAD SAFETY" .LP \fBdtk_load_video_test\fP() is thread-safe. .SH "SEE ALSO" .BR dtk_destroy_texture (3), .BR dtk_video_exec (3), .BR dtk_video_getstate (3)