added many linking features
This commit is contained in:
@@ -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
@@ -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);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "previewgenerator.h"
|
||||
|
||||
PreviewGenerator::PreviewGenerator(QWidget* parent) : QThread(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PreviewGenerator::run() {
|
||||
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user