]> git.sesse.net Git - nageru/blob - input_state.h
Write 1.4.0 changelog.
[nageru] / input_state.h
1 #ifndef _INPUT_STATE_H
2 #define _INPUT_STATE_H 1
3
4 #include "defs.h"
5 #include "ref_counted_frame.h"
6
7 struct BufferedFrame {
8         RefCountedFrame frame;
9         unsigned field_number;
10 };
11
12 // Encapsulates the state of all inputs at any given instant.
13 // In particular, this is captured by Theme::get_chain(),
14 // so that it can hold on to all the frames it needs for rendering.
15 struct InputState {
16         // For each card, the last five frames (or fields), with 0 being the
17         // most recent one. Note that we only need the actual history if we have
18         // interlaced output (for deinterlacing), so if we detect progressive input,
19         // we immediately clear out all history and all entries will point to the same
20         // frame.
21         BufferedFrame buffered_frames[MAX_VIDEO_CARDS][FRAME_HISTORY_LENGTH];
22 };
23
24 #endif  // !defined(_INPUT_STATE_H)