mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 18:31:26 -10:00
This adds a playback property for making the movie loop to the start when the end is reached. The way this is done is by simply keeping the decoder running even if the end of the movie is reached. Then the movie is reset to the beginning and decoding continues. The player detects this reset by examining the frame times which keeps the playback constant. This also includes support for this in the movie scripting API.
26 lines
491 B
C++
26 lines
491 B
C++
#pragma once
|
|
|
|
#include "cutscene/ffmpeg/internal.h"
|
|
#include "cutscene/ffmpeg/FFMPEGDecoder.h"
|
|
|
|
namespace cutscene {
|
|
namespace ffmpeg {
|
|
|
|
class SubtitleDecoder: public FFMPEGStreamDecoder<SubtitleFrame> {
|
|
public:
|
|
explicit SubtitleDecoder(DecoderStatus* status);
|
|
|
|
~SubtitleDecoder() override;
|
|
|
|
void decodePacket(AVPacket* packet) override;
|
|
|
|
void finishDecoding() override;
|
|
void pushSubtitleFrame(AVPacket* subtitle, AVSubtitle* pSubtitle);
|
|
void flushBuffers() override;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
|