summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cam/sdl_texture.h2
-rw-r--r--src/cam/sdl_texture_mjpg.cpp4
-rw-r--r--src/cam/sdl_texture_mjpg.h4
-rw-r--r--src/cam/sdl_texture_yuyv.cpp2
-rw-r--r--src/cam/sdl_texture_yuyv.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/cam/sdl_texture.h b/src/cam/sdl_texture.h
index 1d8b0928..f523fa5e 100644
--- a/src/cam/sdl_texture.h
+++ b/src/cam/sdl_texture.h
@@ -17,7 +17,7 @@ public:
SDLTexture(const SDL_Rect &rect, uint32_t pixelFormat, const int pitch);
virtual ~SDLTexture();
int create(SDL_Renderer *renderer);
- virtual void update(const libcamera::Span<uint8_t> &data) = 0;
+ virtual void update(libcamera::Span<const uint8_t> data) = 0;
SDL_Texture *get() const { return ptr_; }
protected:
diff --git a/src/cam/sdl_texture_mjpg.cpp b/src/cam/sdl_texture_mjpg.cpp
index 7eddc00c..7542efd7 100644
--- a/src/cam/sdl_texture_mjpg.cpp
+++ b/src/cam/sdl_texture_mjpg.cpp
@@ -43,7 +43,7 @@ SDLTextureMJPG::SDLTextureMJPG(const SDL_Rect &rect)
{
}
-int SDLTextureMJPG::decompress(const Span<uint8_t> &data)
+int SDLTextureMJPG::decompress(Span<const uint8_t> data)
{
struct jpeg_decompress_struct cinfo;
@@ -76,7 +76,7 @@ int SDLTextureMJPG::decompress(const Span<uint8_t> &data)
return 0;
}
-void SDLTextureMJPG::update(const Span<uint8_t> &data)
+void SDLTextureMJPG::update(Span<const uint8_t> data)
{
decompress(data);
SDL_UpdateTexture(ptr_, nullptr, rgb_.get(), pitch_);
diff --git a/src/cam/sdl_texture_mjpg.h b/src/cam/sdl_texture_mjpg.h
index 328c45a9..5141ed73 100644
--- a/src/cam/sdl_texture_mjpg.h
+++ b/src/cam/sdl_texture_mjpg.h
@@ -14,10 +14,10 @@ class SDLTextureMJPG : public SDLTexture
public:
SDLTextureMJPG(const SDL_Rect &rect);
- void update(const libcamera::Span<uint8_t> &data) override;
+ void update(libcamera::Span<const uint8_t> data) override;
private:
- int decompress(const libcamera::Span<uint8_t> &data);
+ int decompress(libcamera::Span<const uint8_t> data);
std::unique_ptr<unsigned char[]> rgb_;
};
diff --git a/src/cam/sdl_texture_yuyv.cpp b/src/cam/sdl_texture_yuyv.cpp
index cc161b2c..637c0900 100644
--- a/src/cam/sdl_texture_yuyv.cpp
+++ b/src/cam/sdl_texture_yuyv.cpp
@@ -14,7 +14,7 @@ SDLTextureYUYV::SDLTextureYUYV(const SDL_Rect &rect)
{
}
-void SDLTextureYUYV::update(const Span<uint8_t> &data)
+void SDLTextureYUYV::update(Span<const uint8_t> data)
{
SDL_UpdateTexture(ptr_, &rect_, data.data(), pitch_);
}
diff --git a/src/cam/sdl_texture_yuyv.h b/src/cam/sdl_texture_yuyv.h
index 9f7c72f0..529a72d6 100644
--- a/src/cam/sdl_texture_yuyv.h
+++ b/src/cam/sdl_texture_yuyv.h
@@ -13,5 +13,5 @@ class SDLTextureYUYV : public SDLTexture
{
public:
SDLTextureYUYV(const SDL_Rect &rect);
- void update(const libcamera::Span<uint8_t> &data) override;
+ void update(libcamera::Span<const uint8_t> data) override;
};