summaryrefslogtreecommitdiff
path: root/src/cam/sdl_texture_mjpg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/sdl_texture_mjpg.cpp')
-rw-r--r--src/cam/sdl_texture_mjpg.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/cam/sdl_texture_mjpg.cpp b/src/cam/sdl_texture_mjpg.cpp
deleted file mode 100644
index 69e99ad3..00000000
--- a/src/cam/sdl_texture_mjpg.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2022, Ideas on Board Oy
- *
- * sdl_texture_mjpg.cpp - SDL Texture MJPG
- */
-
-#include "sdl_texture_mjpg.h"
-
-#include <SDL2/SDL_image.h>
-
-using namespace libcamera;
-
-SDLTextureMJPG::SDLTextureMJPG(const SDL_Rect &rect)
- : SDLTexture(rect, SDL_PIXELFORMAT_RGB24, 0)
-{
-}
-
-void SDLTextureMJPG::update(const Span<uint8_t> &data)
-{
- SDL_RWops *bufferStream = SDL_RWFromMem(data.data(), data.size());
- SDL_Surface *frame = IMG_Load_RW(bufferStream, 0);
- SDL_UpdateTexture(ptr_, nullptr, frame->pixels, frame->pitch);
- SDL_FreeSurface(frame);
-}