Valkka  1.6.1
OpenSource Video Management
rgbframefifo.h
Go to the documentation of this file.
1 #ifndef rgbframefifo_HEADER_GUARD
2 #define rgbframefifo_HEADER_GUARD
3 /*
4  * rgbframefifo.h :
5  *
6  * (c) Copyright 2017-2024 Sampsa Riikonen
7  *
8  * Authors: Sampsa Riikonen <sampsa.riikonen@iki.fi>
9  *
10  * This file is part of the Valkka library.
11  *
12  * Valkka is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License as
14  * published by the Free Software Foundation, either version 3 of the
15  * License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * along with this program. If not, see <https://www.gnu.org/licenses/>
24  *
25  */
26 
36 #include "framefifo.h"
37 
38 
39 
41  RGBFrameFifoContext(int max_width, int max_height, int n) : max_width(max_width), max_height(max_height), n(n), flush_when_full(false) {};
42  int max_width;
43  int max_height;
44  int n;
45  bool flush_when_full;
46 };
47 
48 
56 class RGBFrameFifo : public FrameFifo {
57 
58 public:
62  // RGBFrameFifo(int max_width, int max_height, int n); // <pyapi>
66  ~RGBFrameFifo(); // <pyapi>
67 
68 protected:
69  RGBReservoir rgb_reservoir;
70  RGBStack rgb_stack;
71  // note: we still have "reservoirs" and "stacks" inherited from FrameFifo
72 
73 public: // redefined virtual
74  virtual bool writeCopy(Frame* f, bool wait=false);
75  virtual void recycle_(Frame* f);
76 
77 }; // <pyapi>
78 
79 
80 
81 #endif
A thread-safe combination of a fifo (first-in-first-out) queue and an associated stack.
Definition: framefifo.h:83
FrameFifoContext ctx
Parameters defining the stack and overflow behaviour.
Definition: framefifo.h:93
Frame: An abstract queueable class.
Definition: frame.h:112
A FrameFifo for RGBFrame s.
Definition: rgbframefifo.h:56
virtual void recycle_(Frame *f)
Redefined. Uses FrameFifo::recycle_. Separates configuration frames and YUVFrames.
Definition: rgbframefifo.cpp:106
virtual bool writeCopy(Frame *f, bool wait=false)
Redefined. Uses FrameFifo::writeCopy. Separates configuration frames and YUVFrames.
Definition: rgbframefifo.cpp:57
RGBFrameFifo(RGBFrameFifoContext ctx)
Default constructor.
Definition: rgbframefifo.cpp:40
~RGBFrameFifo()
Default destructor.
Definition: rgbframefifo.cpp:50
Thread safe system of fifo and a stack.
Definition: rgbframefifo.h:40