1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2004 Blender Foundation.
* All rights reserved.
*/
#pragma once
/** \file
* \ingroup sequencer
*/
#ifdef __cplusplus
extern "C" {
#endif
struct ImBuf;
struct SeqRenderData;
struct Sequence;
struct TextVars;
/* Wipe effect */
enum {
DO_SINGLE_WIPE,
DO_DOUBLE_WIPE,
/* DO_BOX_WIPE, */ /* UNUSED */
/* DO_CROSS_WIPE, */ /* UNUSED */
DO_IRIS_WIPE,
DO_CLOCK_WIPE,
};
struct SeqEffectHandle {
bool multithreaded;
bool supports_mask;
/* constructors & destructor */
/* init is _only_ called on first creation */
void (*init)(struct Sequence *seq);
/* number of input strips needed
* (called directly after construction) */
int (*num_inputs)(void);
/* load is called first time after readblenfile in
* get_sequence_effect automatically */
void (*load)(struct Sequence *seqconst);
/* duplicate */
void (*copy)(struct Sequence *dst, struct Sequence *src, const int flag);
/* destruct */
void (*free)(struct Sequence *seq, const bool do_id_user);
/* returns: -1: no input needed,
* 0: no early out,
* 1: out = ibuf1,
* 2: out = ibuf2 */
int (*early_out)(struct Sequence *seq, float fac);
/* sets the default `fac` value */
void (*get_default_fac)(struct Sequence *seq, float timeline_frame, float *fac);
/* execute the effect
* sequence effects are only required to either support
* float-rects or byte-rects
* (mixed cases are handled one layer up...) */
struct ImBuf *(*execute)(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
float fac,
struct ImBuf *ibuf1,
struct ImBuf *ibuf2,
struct ImBuf *ibuf3);
struct ImBuf *(*init_execution)(const struct SeqRenderData *context,
struct ImBuf *ibuf1,
struct ImBuf *ibuf2,
struct ImBuf *ibuf3);
void (*execute_slice)(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
float fac,
struct ImBuf *ibuf1,
struct ImBuf *ibuf2,
struct ImBuf *ibuf3,
int start_line,
int total_lines,
struct ImBuf *out);
};
struct SeqEffectHandle SEQ_effect_handle_get(struct Sequence *seq);
int SEQ_effect_get_num_inputs(int seq_type);
void SEQ_effect_text_font_unload(struct TextVars *data, const bool do_id_user);
void SEQ_effect_text_font_load(struct TextVars *data, const bool do_id_user);
#ifdef __cplusplus
}
#endif
|