#include "renderfunctions.h"
#include <libavformat/avformat.h>
#include <QOpenGLFramebufferObject>
#include <QApplication>
#include <QDesktopWidget>
#include <QDebug>
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "project/media.h"
#include "effects/effect.h"
#include "project/footage.h"
#include "effects/transition.h"
#include "ui/collapsiblewidget.h"
#include "rendering/audio.h"
#include "global/math.h"
#include "global/config.h"
#include "panels/timeline.h"
#include "panels/viewer.h"
Functions | |
void | PrepareToDraw (QOpenGLFunctions *f) |
void | full_blit () |
void | draw_clip (QOpenGLContext *ctx, GLuint fbo, GLuint texture, bool clear) |
GLuint | draw_clip (QOpenGLFramebufferObject *fbo, GLuint texture, bool clear) |
void | process_effect (Clip *c, Effect *e, double timecode, GLTextureCoords &coords, GLuint &composite_texture, bool &fbo_switcher, bool &texture_failed, int data) |
long | rescale_frame_number (long framenumber, double source_frame_rate, double target_frame_rate) |
Rescale a frame number between two frame rates. More... | |
double | get_timecode (Clip *c, long playhead) |
Get timecode. More... | |
long | playhead_to_clip_frame (Clip *c, long playhead) |
Convert playhead frame number to a clip frame number. More... | |
double | playhead_to_clip_seconds (Clip *c, long playhead) |
Converts the playhead to clip seconds. More... | |
int64_t | seconds_to_timestamp (Clip *c, double seconds) |
Convert seconds to FFmpeg timestamp. More... | |
int64_t | playhead_to_timestamp (Clip *c, long playhead) |
Convert Timeline playhead to FFmpeg timestamp. More... | |
void | close_active_clips (Sequence *s) |
Close all open clips in a Sequence. More... | |
void close_active_clips | ( | Sequence * | s | ) |
Close all open clips in a Sequence.
Closes any currently open clips on a Sequence and waits for them to close before returning. This may be slow as a result on large Sequence objects. If a Clip is a nested Sequence, this function calls itself recursively on that Sequence too.
s | The Sequence to close all clips on. |
void draw_clip | ( | QOpenGLContext * | ctx, |
GLuint | fbo, | ||
GLuint | texture, | ||
bool | clear | ||
) |
GLuint draw_clip | ( | QOpenGLFramebufferObject * | fbo, |
GLuint | texture, | ||
bool | clear | ||
) |
void full_blit | ( | ) |
double get_timecode | ( | Clip * | c, |
long | playhead | ||
) |
Get timecode.
Get the current clip/media time from the Timeline playhead in seconds. For instance if the playhead was at the start of a clip (whose in point wasn't trimmed), this would be 0.0 as it's the start of the clip/media;
c | Clip to get the timecode of |
playhead | Sequence playhead to convert to a clip/media timecode |
Timecode in seconds
long playhead_to_clip_frame | ( | Clip * | c, |
long | playhead | ||
) |
Convert playhead frame number to a clip frame number.
Converts a Timeline playhead to a the current clip's frame. Equivalent to PLAYHEAD - CLIP_TIMELINE_IN + CLIP_MEDIA_IN
. All keyframes are in clip frames.
c | The clip to get the current frame number of |
playhead | The current Timeline frame number |
The curren frame number of the clip at playhead
double playhead_to_clip_seconds | ( | Clip * | c, |
long | playhead | ||
) |
Converts the playhead to clip seconds.
Get the current timecode at the playhead in terms of clip seconds.
FIXME: Possible duplicate of get_timecode()? Will need to research this more.
c | Clip to return clip seconds of. |
playhead | Current Timeline playhead to convert to clip seconds |
Clip time in seconds
int64_t playhead_to_timestamp | ( | Clip * | c, |
long | playhead | ||
) |
void PrepareToDraw | ( | QOpenGLFunctions * | f | ) |
void process_effect | ( | Clip * | c, |
Effect * | e, | ||
double | timecode, | ||
GLTextureCoords & | coords, | ||
GLuint & | composite_texture, | ||
bool & | fbo_switcher, | ||
bool & | texture_failed, | ||
int | data | ||
) |
long rescale_frame_number | ( | long | framenumber, |
double | source_frame_rate, | ||
double | target_frame_rate | ||
) |
Rescale a frame number between two frame rates.
Converts a frame number from one frame rate to its equivalent in another frame rate
framenumber | The frame number to convert |
source_frame_rate | Frame rate that the frame number is currently in |
target_frame_rate | Frame rate to convert to |
Rescaled frame number
int64_t seconds_to_timestamp | ( | Clip * | c, |
double | seconds | ||
) |