mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-11 04:31:35 -10:00
Uses FFmpeg for video decoding and multiple threads for reading and decoding files. Can handle 1080p with no stuttering.
26 lines
495 B
C++
26 lines
495 B
C++
#pragma once
|
|
|
|
#include "cutscene/ffmpeg/internal.h"
|
|
#include "cutscene/ffmpeg/FFMPEGDecoder.h"
|
|
|
|
namespace cutscene {
|
|
namespace ffmpeg {
|
|
class VideoDecoder: public FFMPEGStreamDecoder<VideoFrame> {
|
|
private:
|
|
int m_frameId;
|
|
SwsContext* m_swsCtx;
|
|
|
|
void convertAndPushPicture(const AVFrame* frame);
|
|
|
|
public:
|
|
explicit VideoDecoder(DecoderStatus* status);
|
|
|
|
virtual ~VideoDecoder();
|
|
|
|
virtual void decodePacket(AVPacket* packet) SCP_OVERRIDE;
|
|
|
|
virtual void finishDecoding() SCP_OVERRIDE;
|
|
};
|
|
}
|
|
}
|