Use ffmpeg for thumbnail support.

Removed dep on QtGui for the headless modules.
This commit is contained in:
codestation
2015-05-26 23:34:13 -04:30
parent babe16c43d
commit b6eebd79b1
6 changed files with 192 additions and 109 deletions

View File

@@ -42,9 +42,9 @@ public:
bool open(const QString filename);
void close();
bool loadCodec(codec_type codec);
bool seekVideo(int percentage);
QByteArray getAudioThumbnail(int width, int height);
QByteArray getVideoThumbnail(int width, int height);
QByteArray getThumbnail(int &width, int &height);
void getAudioMetadata(metadata_t &metadata);
void getVideoMetadata(metadata_t &metadata);
const char *getMetadataEntry(const char *key, const char *default_value = NULL);
@@ -80,6 +80,7 @@ public:
private:
AVFrame *getDecodedFrame(AVCodecContext *pCodecCtx, int stream_index);
QByteArray WriteJPEG(AVCodecContext *pCodecCtx, AVFrame *pFrame, int width, int height);
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;