/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2020, Collabora Ltd. * Author: Nicolas Dufresne * * gstlibcamera-utils.h - GStreamer libcamera Utility Functions */ #ifndef __GST_LIBCAMERA_UTILS_H__ #define __GST_LIBCAMERA_UTILS_H__ #include #include #include GstCaps *gst_libcamera_stream_formats_to_caps(const libcamera::StreamFormats &formats); GstCaps *gst_libcamera_stream_configuration_to_caps(const libcamera::StreamConfiguration &stream_cfg); void gst_libcamera_configure_stream_from_caps(libcamera::StreamConfiguration &stream_cfg, GstCaps *caps); void gst_libcamera_resume_task(GstTask *task); /** * \class GLibLocker * \brief A simple scoped mutex locker for GMutex */ class GLibLocker { public: GLibLocker(GMutex *mutex) : mutex_(mutex) { g_mutex_lock(mutex_); } GLibLocker(GstObject *object) : mutex_(GST_OBJECT_GET_LOCK(object)) { g_mutex_lock(mutex_); } ~GLibLocker() { g_mutex_unlock(mutex_); } private: GMutex *mutex_; }; /** * \class GLibRecLocker * \brief A simple scoped mutex locker for GRecMutex */ class GLibRecLocker { public: GLibRecLocker(GRecMutex *mutex) : mutex_(mutex) { g_rec_mutex_lock(mutex_); } ~GLibRecLocker() { g_rec_mutex_unlock(mutex_); } private: GRecMutex *mutex_; }; #endif /* __GST_LIBCAMERA_UTILS_H__ */ _level_status.h?h=v0.0.2'>logtreecommitdiff
blob: d085f64b27feedc54652a07ba2162cf4c8c978aa (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: BSD-2-Clause */
/*
 * Copyright (C) 2019, Raspberry Pi (Trading) Limited
 *
 * black_level_status.h - black level control algorithm status
 */
#pragma once

// The "black level" algorithm stores the black levels to use.

#ifdef __cplusplus
extern "C" {
#endif

struct BlackLevelStatus {
	uint16_t black_level_r; // out of 16 bits
	uint16_t black_level_g;
	uint16_t black_level_b;
};

#ifdef __cplusplus
}
#endif