~nemo-mobile-team/nemo-mobile/lipstick

« back to all changes in this revision

Viewing changes to protocol/lipstick-recorder.xml

  • Committer: David Greaves
  • Author(s): David Greaves
  • Date: 2015-10-19 20:20:12 UTC
  • Revision ID: git-v1:3c17eedd5fcde9880c844fd860bc7ca8cfd7587e
Migration to git.merproject.org

Signed-off-by: David Greaves <david.greaves@jolla.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<protocol name="lipstick_recorder">
2
 
    <copyright>
3
 
        Copyright (C) 2014 Jolla Ltd.
4
 
 
5
 
        Permission to use, copy, modify, distribute, and sell this
6
 
        software and its documentation for any purpose is hereby granted
7
 
        without fee, provided that the above copyright notice appear in
8
 
        all copies and that both that copyright notice and this permission
9
 
        notice appear in supporting documentation, and that the name of
10
 
        the copyright holders not be used in advertising or publicity
11
 
        pertaining to distribution of the software without specific,
12
 
        written prior permission.  The copyright holders make no
13
 
        representations about the suitability of this software for any
14
 
        purpose.  It is provided "as is" without express or implied
15
 
        warranty.
16
 
 
17
 
        THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
18
 
        SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
19
 
        FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
 
        SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21
 
        WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
22
 
        AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23
 
        ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24
 
        THIS SOFTWARE.
25
 
    </copyright>
26
 
 
27
 
    <interface name="lipstick_recorder_manager" version="1">
28
 
        <request name="create_recorder">
29
 
            <description summary="create a recorder object">
30
 
                Create a recorder object for the specified output.
31
 
            </description>
32
 
            <arg name="recorder" type="new_id" interface="lipstick_recorder"/>
33
 
            <arg name="output" type="object" interface="wl_output"/>
34
 
        </request>
35
 
    </interface>
36
 
 
37
 
    <interface name="lipstick_recorder" version="1">
38
 
        <request name="destroy" type="destructor">
39
 
            <description summary="destroy the recorder object">
40
 
                Destroy the recorder object, discarding any frame request
41
 
                that may be pending.
42
 
            </description>
43
 
        </request>
44
 
        <request name="record_frame">
45
 
            <description summary="request a frame to be recorded">
46
 
                Ask the compositor to record its next frame, putting
47
 
                the content into the specified buffer data. The frame
48
 
                event will be sent when the frame is recorded.
49
 
                Only one frame will be recorded, the client will have
50
 
                to call this again after the frame event if it wants to
51
 
                record more frames.
52
 
 
53
 
                The buffer must be a shm buffer, trying to use another
54
 
                type of buffer will result in failure to capture the
55
 
                frame and the failed event will be sent.
56
 
            </description>
57
 
            <arg name="buffer" type="object" interface="wl_buffer"/>
58
 
        </request>
59
 
 
60
 
        <request name="repaint">
61
 
            <description summary="request the compositor to repaint asap">
62
 
                Calling record_frame will not cause the compositor to
63
 
                repaint, but it will wait instead for the first frame
64
 
                the compositor draws due to some other external event
65
 
                or internal change.
66
 
                Calling this request after calling record_frame will
67
 
                ask the compositor to redraw as soon at possible even
68
 
                if it wouldn't otherwise.
69
 
                If no frame was requested this request has no effect.
70
 
            </description>
71
 
        </request>
72
 
 
73
 
        <enum name="result">
74
 
            <entry name="bad_buffer" value="2"/>
75
 
        </enum>
76
 
 
77
 
        <enum name="transform">
78
 
            <entry name="normal" value="1"/>
79
 
            <entry name="y_inverted" value="2"/>
80
 
        </enum>
81
 
 
82
 
        <event name="setup">
83
 
            <description summary="notify the requirements for the frame buffers">
84
 
                This event will be sent immediately after creation of the
85
 
                lipstick_recorder object. The wl_buffers the client passes
86
 
                to the frame request must be big enough to store an image
87
 
                with the given width, height and format.
88
 
                If they are not the compositor will send the failed event.
89
 
                If this event is sent again later in the lifetime of the object
90
 
                the pending frames will be cancelled.
91
 
 
92
 
                The format will be one of the values as defined in the
93
 
                wl_shm::format enum.
94
 
            </description>
95
 
            <arg name="width" type="int" description="width of the frame, in pixels"/>
96
 
            <arg name="height" type="int" description="height of the frame, in pixels"/>
97
 
            <arg name="stride" type="int" description="stride of the frame"/>
98
 
            <arg name="format" type="int" desciption="format of the frame"/>
99
 
        </event>
100
 
 
101
 
        <event name="frame">
102
 
            <description summary="notify a frame was recorded, or an error">
103
 
                The compositor will send this event after a frame was
104
 
                recorded, or in case an error happened. The client can
105
 
                call record_frame again to record the next frame.
106
 
 
107
 
                'time' is the time the compositor recorded that frame,
108
 
                in milliseconds, with an unspecified base.
109
 
            </description>
110
 
            <arg name="buffer" type="object" interface="wl_buffer"/>
111
 
            <arg name="time" type="uint"/>
112
 
            <arg name="transform" type="int"/>
113
 
        </event>
114
 
 
115
 
        <event name="failed">
116
 
            <description summary="the frame capture failed">
117
 
                The value of the 'result' argument will be one of the
118
 
                values of the 'result' enum.
119
 
            </description>
120
 
            <arg name="result" type="int"/>
121
 
            <arg name="buffer" type="object" interface="wl_buffer"/>
122
 
        </event>
123
 
 
124
 
        <event name="cancelled">
125
 
            <description summary="notify a request was cancelled">
126
 
                The compositor will send this event if the client calls
127
 
                request_frame more than one time for the same compositor
128
 
                frame. The cancel event will be sent carrying the old
129
 
                buffer, and the frame will be recorded using the newest
130
 
                buffer.
131
 
            </description>
132
 
            <arg name="buffer" type="object" interface="wl_buffer"/>
133
 
        </event>
134
 
    </interface>
135
 
</protocol>