Skip to content

Commit 983ffa7

Browse files
committed
Merge branch 'master' into next
Signed-off-by: Naushir Patuck <[email protected]>
2 parents 90a1d9c + 86c45c8 commit 983ffa7

File tree

119 files changed

+1236
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1236
-497
lines changed

Documentation/meson.build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,8 @@ endif
116116
# Sphinx
117117
#
118118

119-
sphinx = find_program('sphinx-build-3', required : false)
120-
if not sphinx.found()
121-
sphinx = find_program('sphinx-build', required : get_option('documentation'))
122-
endif
119+
sphinx = find_program('sphinx-build-3', 'sphinx-build',
120+
required : get_option('documentation'))
123121

124122
if sphinx.found()
125123
docs_sources = [

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ A C++ toolchain: [required]
7676
Either {g++, clang}
7777

7878
Meson Build system: [required]
79-
meson (>= 0.60) ninja-build pkg-config
79+
meson (>= 0.63) ninja-build pkg-config
8080

8181
for the libcamera core: [required]
8282
libyaml-dev python3-yaml python3-ply python3-jinja2
@@ -115,6 +115,7 @@ for cam: [optional]
115115
- libdrm-dev: Enables the KMS sink
116116
- libjpeg-dev: Enables MJPEG on the SDL sink
117117
- libsdl2-dev: Enables the SDL sink
118+
- libtiff-dev: Enables writing DNG
118119

119120
for qcam: [optional]
120121
libtiff-dev qt6-base-dev qt6-tools-dev-tools

include/libcamera/base/bound_method.h

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,15 @@ class BoundMethodArgs : public BoundMethodBase
9898
using PackType = BoundMethodPack<R, Args...>;
9999

100100
private:
101-
template<std::size_t... I, typename T = R>
102-
std::enable_if_t<!std::is_void<T>::value, void>
103-
invokePack(BoundMethodPackBase *pack, std::index_sequence<I...>)
101+
template<std::size_t... I>
102+
void invokePack(BoundMethodPackBase *pack, std::index_sequence<I...>)
104103
{
105-
PackType *args = static_cast<PackType *>(pack);
106-
args->ret_ = invoke(std::get<I>(args->args_)...);
107-
}
104+
[[maybe_unused]] auto *args = static_cast<PackType *>(pack);
108105

109-
template<std::size_t... I, typename T = R>
110-
std::enable_if_t<std::is_void<T>::value, void>
111-
invokePack(BoundMethodPackBase *pack, std::index_sequence<I...>)
112-
{
113-
/* args is effectively unused when the sequence I is empty. */
114-
PackType *args [[gnu::unused]] = static_cast<PackType *>(pack);
115-
invoke(std::get<I>(args->args_)...);
106+
if constexpr (!std::is_void_v<R>)
107+
args->ret_ = invoke(std::get<I>(args->args_)...);
108+
else
109+
invoke(std::get<I>(args->args_)...);
116110
}
117111

118112
public:

include/libcamera/base/mutex.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ namespace libcamera {
2323
class LIBCAMERA_TSA_CAPABILITY("mutex") Mutex final
2424
{
2525
public:
26-
constexpr Mutex()
27-
{
28-
}
29-
3026
void lock() LIBCAMERA_TSA_ACQUIRE()
3127
{
3228
mutex_.lock();
@@ -84,10 +80,6 @@ class LIBCAMERA_TSA_SCOPED_CAPABILITY MutexLocker final
8480
class ConditionVariable final
8581
{
8682
public:
87-
ConditionVariable()
88-
{
89-
}
90-
9183
void notify_one() noexcept
9284
{
9385
cv_.notify_one();

include/libcamera/base/object.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <list>
1111
#include <memory>
12+
#include <utility>
1213
#include <vector>
1314

1415
#include <libcamera/base/bound_method.h>
@@ -39,7 +40,7 @@ class Object
3940
{
4041
T *obj = static_cast<T *>(this);
4142
auto *method = new BoundMethodMember<T, R, FuncArgs...>(obj, this, func, type);
42-
return method->activate(args..., true);
43+
return method->activate(std::forward<Args>(args)..., true);
4344
}
4445

4546
Thread *thread() const { return thread_; }

include/libcamera/base/span.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,7 @@ class Span<T, dynamic_extent>
346346
}
347347

348348
constexpr Span(const Span &other) noexcept = default;
349-
350-
constexpr Span &operator=(const Span &other) noexcept
351-
{
352-
data_ = other.data_;
353-
size_ = other.size_;
354-
return *this;
355-
}
349+
constexpr Span &operator=(const Span &other) noexcept = default;
356350

357351
constexpr iterator begin() const { return data(); }
358352
constexpr const_iterator cbegin() const { return begin(); }

include/libcamera/camera_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <memory>
1111
#include <string>
12+
#include <string_view>
1213
#include <sys/types.h>
1314
#include <vector>
1415

@@ -31,7 +32,7 @@ class CameraManager : public Object, public Extensible
3132
void stop();
3233

3334
std::vector<std::shared_ptr<Camera>> cameras() const;
34-
std::shared_ptr<Camera> get(const std::string &id);
35+
std::shared_ptr<Camera> get(std::string_view id);
3536

3637
static const std::string &version() { return version_; }
3738

include/libcamera/controls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {
125125
};
126126

127127
template<typename T>
128-
struct control_type<T, std::enable_if_t<std::is_enum_v<T>>> : public control_type<int32_t> {
128+
struct control_type<T, std::enable_if_t<std::is_enum_v<T> && sizeof(T) == sizeof(int32_t)>> : public control_type<int32_t> {
129129
};
130130

131131
} /* namespace details */

include/libcamera/internal/ipa_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#include <memory>
1011
#include <stdint.h>
1112
#include <vector>
1213

@@ -67,7 +68,7 @@ class IPAManager
6768

6869
bool isSignatureValid(IPAModule *ipa) const;
6970

70-
std::vector<IPAModule *> modules_;
71+
std::vector<std::unique_ptr<IPAModule>> modules_;
7172

7273
#if HAVE_IPA_PUBKEY
7374
static const uint8_t publicKeyData_[];

include/libcamera/internal/media_object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class MediaEntity : public MediaObject
112112
unsigned int deviceMinor() const { return minor_; }
113113

114114
const std::vector<MediaPad *> &pads() const { return pads_; }
115-
const std::vector<MediaEntity *> ancillaryEntities() const { return ancillaryEntities_; }
115+
const std::vector<MediaEntity *> &ancillaryEntities() const { return ancillaryEntities_; }
116116

117117
const MediaPad *getPadByIndex(unsigned int index) const;
118118
const MediaPad *getPadById(unsigned int id) const;

0 commit comments

Comments
 (0)