added many linking features

This commit is contained in:
itsmattkc
2018-06-13 22:39:05 -07:00
parent 093b68cb67
commit 124b76d58c
16 changed files with 312 additions and 100 deletions
+15
View File
@@ -4,6 +4,21 @@ extern "C" {
#include <libavformat/avformat.h>
}
Media::Media() {
}
Media::~Media() {
for (int i=0;i<video_tracks.size();i++) {
delete video_tracks.at(i);
}
for (int i=0;i<audio_tracks.size();i++) {
delete audio_tracks.at(i);
}
video_tracks.clear();
audio_tracks.clear();
}
long Media::get_length_in_frames(float frame_rate) {
return ceil((float) length / (float) AV_TIME_BASE * frame_rate);
}
+10 -2
View File
@@ -5,6 +5,7 @@
#include <QVector>
#include <QMetaType>
#include <QVariant>
#include <QMutex>
struct Sequence;
@@ -13,16 +14,23 @@ struct MediaStream {
int video_width;
int video_height;
bool infinite_length;
// preview thumbnail/waveform
QPixmap* preview;
QMutex preview_lock;
};
struct Media
{
Media();
~Media();
QString url;
QString name;
bool is_sequence;
int64_t length;
QVector<MediaStream> video_tracks;
QVector<MediaStream> audio_tracks;
QVector<MediaStream*> video_tracks;
QVector<MediaStream*> audio_tracks;
Sequence* sequence;
int save_id;
long get_length_in_frames(float frame_rate);
+10
View File
@@ -0,0 +1,10 @@
#include "previewgenerator.h"
PreviewGenerator::PreviewGenerator(QWidget* parent) : QThread(parent)
{
}
void PreviewGenerator::run() {
}
+13
View File
@@ -0,0 +1,13 @@
#ifndef PREVIEWGENERATOR_H
#define PREVIEWGENERATOR_H
#include <QThread>
class PreviewGenerator : public QThread
{
public:
PreviewGenerator(QWidget* parent = 0);
void run() override;
};
#endif // PREVIEWGENERATOR_H