1
<protocol name="lipstick_recorder">
3
Copyright (C) 2014 Jolla Ltd.
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
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
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.
32
<arg name="recorder" type="new_id" interface="lipstick_recorder"/>
33
<arg name="output" type="object" interface="wl_output"/>
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
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
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.
57
<arg name="buffer" type="object" interface="wl_buffer"/>
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
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.
74
<entry name="bad_buffer" value="2"/>
77
<enum name="transform">
78
<entry name="normal" value="1"/>
79
<entry name="y_inverted" value="2"/>
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.
92
The format will be one of the values as defined in the
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"/>
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.
107
'time' is the time the compositor recorded that frame,
108
in milliseconds, with an unspecified base.
110
<arg name="buffer" type="object" interface="wl_buffer"/>
111
<arg name="time" type="uint"/>
112
<arg name="transform" type="int"/>
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.
120
<arg name="result" type="int"/>
121
<arg name="buffer" type="object" interface="wl_buffer"/>
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
132
<arg name="buffer" type="object" interface="wl_buffer"/>