struct screenshooter_frame_listener {
struct wl_listener listener;
struct weston_buffer *buffer;
+ struct weston_output *output;
weston_screenshooter_done_func_t done;
void *data;
};
struct screenshooter_frame_listener *l =
container_of(listener,
struct screenshooter_frame_listener, listener);
- struct weston_output *output = data;
+ struct weston_output *output = l->output;
struct weston_compositor *compositor = output->compositor;
int32_t stride;
uint8_t *pixels, *d, *s;
}
l->buffer = buffer;
+ l->output = output;
l->done = done;
l->data = data;
l->listener.notify = screenshooter_frame_notify;
{
struct weston_recorder *recorder =
container_of(listener, struct weston_recorder, frame_listener);
- struct weston_output *output = data;
+ struct weston_output *output = recorder->output;
struct weston_compositor *compositor = output->compositor;
uint32_t msecs = timespec_to_msec(&output->frame_time);
pixman_box32_t *r;