codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#pragma once struct Frame { std::vector<unsigned int> imgdata; std::vector<unsigned char> sounddata;//8bit, 1. word = left, 2. word = right, 3. word = left etc., mono = no mixing }; class MVILoader { struct Item { int type;//1=video, 2=unknown(only films), 3=leftchannel, 4=rightchannel, 5=palette int kind; int length; int offset; }; std::vector<unsigned char> out; std::vector<Item> items; unsigned int palette[256]; std::vector<Item>::iterator current; std::ifstream file; public: MVILoader(void) {} MVILoader(const MVILoader&e) { throw std::exception("copy of MVILoader not allowed"); } std::string name; int width; int height; int fps; bool has_audio; int audio_num_channels; int audio_samplerate; int audio_bits; std::vector<unsigned int> imgdata; std::vector<unsigned char> sounddata; void load(const char*); void decode_next_frame(void); void prefetch_sound(void); };
Private
[
?
]
Run code
Submit