/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2019, Google Inc. * * ipc_unixsocket.h - IPC mechanism based on Unix sockets */ #ifndef __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ #define __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ #include #include #include #include namespace libcamera { class EventNotifier; class IPCUnixSocket { public: struct Payload { std::vector data; std::vector fds; }; IPCUnixSocket(); ~IPCUnixSocket(); int create(); int bind(int fd); void close(); bool isBound() const; int send(const Payload &payload); int receive(Payload *payload); Signal readyRead; private: struct Header { uint32_t data; uint8_t fds; }; int sendData(const void *buffer, size_t length, const int32_t *fds, unsigned int num); int recvData(void *buffer, size_t length, int32_t *fds, unsigned int num); void dataNotifier(EventNotifier *notifier); int fd_; bool headerReceived_; struct Header header_; EventNotifier *notifier_; }; } /* namespace libcamera */ #endif /* __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ */ class='tabs'> summaryrefslogtreecommitdiff
blob: bdd19db80df1348ad61a6e81580a93344eac643c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2020, Collabora Ltd.
 *     Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
 *
 * gstlibcameraprovider.h - GStreamer Device Provider
 */

#ifndef __GST_LIBCAMERA_PROVIDER_H__
#define __GST_LIBCAMERA_PROVIDER_H__

#include <gst/gst.h>

G_BEGIN_DECLS

#define GST_TYPE_LIBCAMERA_PROVIDER gst_libcamera_provider_get_type()
G_DECLARE_FINAL_TYPE(GstLibcameraProvider, gst_libcamera_provider,
		     GST_LIBCAMERA, PROVIDER, GstDeviceProvider)

G_END_DECLS

#endif /* __GST_LIBCAMERA_PROVIDER_H__ */