Skip to content

Latest commit

 

History

History
135 lines (121 loc) · 6.31 KB

lipstick-recorder.xml

File metadata and controls

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