mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-31 07:11:14 -04:00
spa: libcamera: use std::span
libcamera is planning to move to C++20 and drop the custom `libcamera::Span`
type at some point in the future. Since pipewire already uses C++20, remove
all uses of it and instead use `std::span` so that things will compile
after the removal.
(cherry picked from commit 84e7b744a6)
This commit is contained in:
parent
4a90facafe
commit
27eedc0396
1 changed files with 2 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
/* SPDX-License-Identifier: MIT */
|
/* SPDX-License-Identifier: MIT */
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <span>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <spa/support/plugin.h>
|
#include <spa/support/plugin.h>
|
||||||
|
|
@ -25,7 +26,6 @@
|
||||||
|
|
||||||
#include <libcamera/camera.h>
|
#include <libcamera/camera.h>
|
||||||
#include <libcamera/property_ids.h>
|
#include <libcamera/property_ids.h>
|
||||||
#include <libcamera/base/span.h>
|
|
||||||
|
|
||||||
using namespace libcamera;
|
using namespace libcamera;
|
||||||
|
|
||||||
|
|
@ -50,7 +50,7 @@ struct impl {
|
||||||
std::string device_id);
|
std::string device_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const libcamera::Span<const int64_t> cameraDevice(const Camera& camera)
|
std::span<const int64_t> cameraDevice(const Camera& camera)
|
||||||
{
|
{
|
||||||
if (auto devices = camera.properties().get(properties::SystemDevices))
|
if (auto devices = camera.properties().get(properties::SystemDevices))
|
||||||
return devices.value();
|
return devices.value();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue