diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-21 13:40:39 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-21 13:40:39 +0200 |
commit | 68a9ac0475aaf87db2b40940ae4ed88a67610d8e (patch) | |
tree | 0223d214fd2a72ea823bd2e5916c4413176bbedc /video-ps3eye/PS3EYEDriver/frame-queue.hpp | |
parent | 1896548fce4f4dd45155b65c2affa6596f6a993e (diff) |
video/ps3eye: kill wrong ps3eyedriver fork
Diffstat (limited to 'video-ps3eye/PS3EYEDriver/frame-queue.hpp')
-rw-r--r-- | video-ps3eye/PS3EYEDriver/frame-queue.hpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/video-ps3eye/PS3EYEDriver/frame-queue.hpp b/video-ps3eye/PS3EYEDriver/frame-queue.hpp deleted file mode 100644 index 8cee2223..00000000 --- a/video-ps3eye/PS3EYEDriver/frame-queue.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once -#include "ps3eye.hpp" - -#include <mutex> -#include <condition_variable> - -struct FrameQueue final -{ - FrameQueue(uint32_t frame_size); - - inline uint8_t* ptr() { return frame_buffer.get(); } - uint8_t* Enqueue(); - - bool Dequeue(uint8_t* dest, int width, int height, ps3eye_camera::format fmt, bool flip_v); - static void DebayerGray(int frame_width, int frame_height, const uint8_t* inBayer, uint8_t* outBuffer); - - template<int nchannels> - static void set_alpha(uint8_t* destGreen); - - template<int nchannels> - void debayer_RGB(int frame_width, int frame_height, const uint8_t* inBayer, uint8_t* outBuffer, bool inBGR, bool flip_v); - -private: - std::unique_ptr<uint8_t[]> frame_buffer; - std::mutex mutex; - std::condition_variable queue_cvar; - uint32_t frame_size = 0; - uint32_t head = 0; - uint32_t tail = 0; - uint32_t available = 0; - - static constexpr unsigned num_frames = 4; -}; |