|
Olive
|
#include "renderfunctions.h"#include <QOpenGLFramebufferObject>#include <QApplication>#include <QDesktopWidget>#include <QDebug>#include "project/clip.h"#include "project/sequence.h"#include "project/media.h"#include "project/effect.h"#include "project/footage.h"#include "project/transition.h"#include "ui/collapsiblewidget.h"#include "playback/audio.h"#include "playback/playback.h"#include "io/math.h"#include "io/config.h"#include "panels/timeline.h"#include "panels/viewer.h"#include <libavformat/avformat.h>Functions | |
| 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 (ClipPtr c, EffectPtr e, double timecode, GLTextureCoords &coords, GLuint &composite_texture, bool &fbo_switcher, bool &texture_failed, int data) |
| GLuint | compose_sequence (ComposeSequenceParams ¶ms) |
| Compose a frame of a given sequence. More... | |
| void | compose_audio (Viewer *viewer, SequencePtr seq, int playback_speed) |
| Convenience wrapper function for compose_sequence() to render audio. More... | |
| void compose_audio | ( | Viewer * | viewer, |
| SequencePtr | seq, | ||
| int | playback_speed | ||
| ) |
Convenience wrapper function for compose_sequence() to render audio.
Much of the functionality provided (and parameters required) by compose_sequence() is only useful/necessary for video rendering. For audio rendering, this function is easier to handle and will correctly set up compose_sequence() to render audio without the cumbersome effort of setting up a ComposeSequenceParams object.
| GLuint compose_sequence | ( | ComposeSequenceParams & | params | ) |
Compose a frame of a given sequence.
For any given Sequence, this function will render the current frame indicated by Sequence::playhead. Will automatically open and close clips (memory allocation and file handles) as necessary, communicate with the Clip::cacher objects to retrieve upcoming frames and store them in memory, run Effect processing functions, and finally composite all the currently active clips together into a final texture.
Will sometimes render a frame incomplete or inaccurately, e.g. if a video file hadn't finished opening by the time of the render or a clip's cacher didn't have the requested frame available at the time of the render. If so, the texture_failed variable of params will be set to TRUE. Check this after calling compose_sequence() and if it is TRUE, compose_sequence() should be called again later to attempt another render (unless the Sequence is being played, in which case just play the next frame rather than redrawing an old frame).
| params | A struct of parameters to use while rendering. |
| void draw_clip | ( | QOpenGLContext * | ctx, |
| GLuint | fbo, | ||
| GLuint | texture, | ||
| bool | clear | ||
| ) |
| GLuint draw_clip | ( | QOpenGLFramebufferObject * | fbo, |
| GLuint | texture, | ||
| bool | clear | ||
| ) |
| void full_blit | ( | ) |
| void process_effect | ( | ClipPtr | c, |
| EffectPtr | e, | ||
| double | timecode, | ||
| GLTextureCoords & | coords, | ||
| GLuint & | composite_texture, | ||
| bool & | fbo_switcher, | ||
| bool & | texture_failed, | ||
| int | data | ||
| ) |
1.8.15