mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
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:
@@ -46,7 +46,7 @@ Video::~Video()
|
||||
|
||||
VideoStream *Video::newVideoStream(love::filesystem::File *file)
|
||||
{
|
||||
VideoStream *stream = new VideoStream(file);
|
||||
TheoraVideoStream *stream = new TheoraVideoStream(file);
|
||||
workerThread->addStream(stream);
|
||||
return stream;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ Worker::~Worker()
|
||||
stop();
|
||||
}
|
||||
|
||||
void Worker::addStream(VideoStream *stream)
|
||||
void Worker::addStream(TheoraVideoStream *stream)
|
||||
{
|
||||
love::thread::Lock l(mutex);
|
||||
streams.push_back(stream);
|
||||
@@ -110,7 +110,7 @@ void Worker::threadFunction()
|
||||
|
||||
for (auto it = streams.begin(); it != streams.end(); ++it)
|
||||
{
|
||||
VideoStream *stream = *it;
|
||||
TheoraVideoStream *stream = *it;
|
||||
if (stream->getReferenceCount() == 1)
|
||||
{
|
||||
// We're the only ones left
|
||||
|
||||
Reference in New Issue
Block a user