Split theora::VideoStream into OggDemuxer and TheoraVideoStream

This makes the internal API more modular, but the split also forces a cleaner
implementation. It also means the OggDemuxer is now responsible for the
ogg-specific stuff like seeking and (ogg-specific) type detection.

Backported from the love.video-vpx branch of love-experiments

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2017-10-12 14:23:58 +02:00
parent 95adf7e347
commit 0e9f71b29a
7 changed files with 369 additions and 200 deletions
+4 -3
View File
@@ -28,7 +28,8 @@
#include "filesystem/File.h"
#include "video/Video.h"
#include "thread/threads.h"
#include "VideoStream.h"
#include "video/VideoStream.h"
#include "TheoraVideoStream.h"
namespace love
{
@@ -63,13 +64,13 @@ public:
// Implements Threadable
void threadFunction();
void addStream(VideoStream *stream);
void addStream(TheoraVideoStream *stream);
// Frees itself!
void stop();
private:
std::vector<StrongRef<VideoStream>> streams;
std::vector<StrongRef<TheoraVideoStream>> streams;
love::thread::MutexRef mutex;
love::thread::ConditionalRef cond;