Valkka
0.17.0
OpenSource Video Management
include
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
* Copyright 2017, 2018 Valkka Security Ltd. and 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 Affero 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 Affero General Public License for more details.
21
*
22
* You should have received a copy of the GNU Affero 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
40
struct
RGBFrameFifoContext
{
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>
63
RGBFrameFifo
(
RGBFrameFifoContext
ctx);
// <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
framefifo.h
Thread safe system of fifo and a stack.
RGBFrameFifo
A FrameFifo for RGBFrame s.
Definition:
rgbframefifo.h:56
FrameFifo
A thread-safe combination of a fifo (first-in-first-out) queue and an associated stack.
Definition:
framefifo.h:72
RGBFrameFifoContext
Definition:
rgbframefifo.h:40
Frame
Frame: An abstract queueable class.
Definition:
frame.h:108
Generated by
1.8.13