mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-08-28 05:32:03 -04:00
50ded17ef5
git-svn-id: svn://localhost@855 8062f311-0dae-4547-b526-b8ab9ac864a5
30 lines
647 B
C++
30 lines
647 B
C++
#ifndef _THEORAMEMORYLOADER_H
|
|
#define _THEORAMEMORYLOADER_H
|
|
|
|
#include <string>
|
|
#include <stdio.h>
|
|
#include "TheoraDataSource.h"
|
|
|
|
/**
|
|
* \brief Simple class to load a video from memory
|
|
*/
|
|
class TheoraMemoryLoader : public TheoraDataSource
|
|
{
|
|
std::string mName;
|
|
unsigned long mSize,mReadPointer;
|
|
unsigned char* mData;
|
|
public:
|
|
TheoraMemoryLoader(std::string name, unsigned char *source, unsigned long size);
|
|
~TheoraMemoryLoader();
|
|
|
|
int read(void* output,int nBytes);
|
|
void seek(unsigned long byte_index);
|
|
|
|
std::string repr() { return "Memory:"+mName; }
|
|
unsigned long size();
|
|
unsigned long tell();
|
|
};
|
|
|
|
#endif
|
|
|