Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SEQ_time.h « sequencer « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 11dbe0dab0a82524ba6457beaf9abd99aef8c342 (plain)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2004 Blender Foundation. All rights reserved. */

#pragma once

/** \file
 * \ingroup sequencer
 */

#ifdef __cplusplus
extern "C" {
#endif

struct ListBase;
struct Scene;
struct Sequence;
struct rctf;

/**
 * Initialize given rectangle with the Scene's timeline boundaries.
 *
 * \param scene: the Scene instance whose timeline boundaries are extracted from
 * \param rect: output parameter to be filled with timeline boundaries
 */
void SEQ_timeline_init_boundbox(const struct Scene *scene, struct rctf *rect);
/**
 * Stretch the given rectangle to include the given strips boundaries
 *
 * \param seqbase: ListBase in which strips are located
 * \param rect: output parameter to be filled with strips' boundaries
 */
void SEQ_timeline_expand_boundbox(const struct Scene *scene,
                                  const struct ListBase *seqbase,
                                  struct rctf *rect);
/**
 * Define boundary rectangle of sequencer timeline and fill in rect data
 *
 * \param scene: Scene in which strips are located
 * \param seqbase: ListBase in which strips are located
 * \param rect: data structure describing rectangle, that will be filled in by this function
 */
void SEQ_timeline_boundbox(const struct Scene *scene,
                           const struct ListBase *seqbase,
                           struct rctf *rect);
/**
 * Get FPS rate of source media. Movie, scene and movie-clip strips are supported.
 * Returns 0 for unsupported strip or if media can't be loaded.
 */
float SEQ_time_sequence_get_fps(struct Scene *scene, struct Sequence *seq);
/**
 * Find start or end position of next or previous strip.
 * \param scene: Video editing scene
 * \param timeline_frame: reference frame for searching
 * \param side: direction of searching, `SEQ_SIDE_LEFT`, `SEQ_SIDE_RIGHT` or `SEQ_SIDE_BOTH`.
 * \param do_center: find closest strip center if true, otherwise finds closest handle position.
 * \param do_unselected: only find closest position of unselected strip.
 */
int SEQ_time_find_next_prev_edit(struct Scene *scene,
                                 int timeline_frame,
                                 short side,
                                 bool do_skip_mute,
                                 bool do_center,
                                 bool do_unselected);
/**
 * Test if strip intersects with timeline frame.
 * \note This checks if strip would be rendered at this frame. For rendering it is assumed, that
 * timeline frame has width of 1 frame and therefore ends at timeline_frame + 1
 *
 * \param seq: Sequence to be checked
 * \param timeline_frame: absolute frame position
 * \return true if strip intersects with timeline frame.
 */
bool SEQ_time_strip_intersects_frame(const struct Scene *scene,
                                     const struct Sequence *seq,
                                     int timeline_frame);
/**
 * Returns true if strip has frames without content to render.
 */
bool SEQ_time_has_still_frames(const struct Scene *scene, const struct Sequence *seq);
/**
 * Returns true if at beginning of strip there is no content to be rendered.
 */
bool SEQ_time_has_left_still_frames(const struct Scene *scene, const struct Sequence *seq);
/**
 * Returns true if at end of strip there is no content to be rendered.
 */
bool SEQ_time_has_right_still_frames(const struct Scene *scene, const struct Sequence *seq);
/**
 * Get timeline frame where strip boundary starts.
 */
int SEQ_time_left_handle_frame_get(const struct Scene *scene, const struct Sequence *seq);
/**
 * Get timeline frame where strip boundary ends.
 */
int SEQ_time_right_handle_frame_get(const struct Scene *scene, const struct Sequence *seq);
/**
 * Set frame where strip boundary starts. This function moves only handle, content is not moved.
 */
void SEQ_time_left_handle_frame_set(const struct Scene *scene,
                                    struct Sequence *seq,
                                    int timeline_frame);
/**
 * Set frame where strip boundary ends.
 * This function moves only handle, content is not moved.
 */
void SEQ_time_right_handle_frame_set(const struct Scene *scene,
                                     struct Sequence *seq,
                                     int timeline_frame);
/**
 * Get number of frames (in timeline) that can be rendered.
 * This can change depending on scene FPS or strip speed factor.
 */
int SEQ_time_strip_length_get(const struct Scene *scene, const struct Sequence *seq);
/**
 * Set strip playback speed.
 * Strip length is affected by changing speed factor.
 */
void SEQ_time_speed_factor_set(const struct Scene *scene,
                               struct Sequence *seq,
                               const float speed_factor);
/**
 * Get timeline frame where strip content starts.
 */
float SEQ_time_start_frame_get(const struct Sequence *seq);
/**
 * Get timeline frame where strip content ends.
 */
float SEQ_time_content_end_frame_get(const struct Scene *scene, const struct Sequence *seq);
/**
 * Set frame where strip content starts.
 * This function will also move strip handles.
 */
void SEQ_time_start_frame_set(const struct Scene *scene, struct Sequence *seq, int timeline_frame);
/**
 * Update length of meta-strip after any contained strip length or position has changed.
 * \note this function is currently only used internally and in versioning code.
 */
void SEQ_time_update_meta_strip_range(const struct Scene *scene, struct Sequence *seq_meta);

#ifdef __cplusplus
}
#endif