1#ifndef MP4V2_PLATFORM_IO_FILE_H
2#define MP4V2_PLATFORM_IO_FILE_H
8class MP4V2_EXPORT FileProvider
11 static FileProvider& standard();
26 virtual ~FileProvider() { }
28 virtual bool open( std::string name, Mode mode ) = 0;
29 virtual bool seek( Size pos ) = 0;
30 virtual bool read(
void* buffer, Size size, Size& nin, Size maxChunkSize ) = 0;
31 virtual bool write(
const void* buffer, Size size, Size& nout, Size maxChunkSize ) = 0;
32 virtual bool close() = 0;
33 virtual bool getSize( Size& nout ) = 0;
51class MP4V2_EXPORT
File :
public FileProvider
185 FileProvider& _provider;
195 void setName(
const std::string&
name );
201class CustomFileProvider :
public FileProvider
206 bool open( std::string name,
Mode mode );
207 bool seek(
Size pos );
208 bool read(
void* buffer,
Size size,
Size& nin,
Size maxChunkSize );
209 bool write(
const void* buffer,
Size size,
Size& nout,
Size maxChunkSize );
211 bool getSize(
Size& nout );
struct MP4FileProvider_s MP4FileProvider
Structure of functions implementing custom file provider.