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

NAME

6       dtk_load_video_gst - Load the sink of gstreamer pipeline as a texture
7

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

49       In case of success, the function returns the handle to the created tex‐
50       ture.  In case of failure, NULL is returned.
51

THREAD SAFETY

53       dtk_load_video_gst() is thread-safe.
54

SEE ALSO

56       gst-launch(1),        dtk_destroy_texture(3),        dtk_video_exec(3),
57       dtk_video_getstate(3)
58
59
60
61
62
63EPFL                                 2010                DTK_LOAD_VIDEO_GST(3)
Impressum