Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/avi_play/src/lib/graphics/importer/media_container.h @ 6373

Last change on this file since 6373 was 6373, checked in by hdavid, 18 years ago

branches\avi_play: different texture creation

File size: 958 bytes
Line 
1/*!
2 * @file media_container.h
3  *  Manages the media files
4
5*/
6
7#ifndef _MEDIA_CONTAINER
8#define _MEDIA_CONTAINER
9
10#include <SDL.h>
11
12#ifdef HAVE_AVFORMAT_H
13  #include <avformat.h>
14#else
15  #include <ffmpeg/avformat.h>
16#endif
17
18/* include base_object.h since all classes are derived from this one */
19#include "base_object.h"
20#include "texture_sequence.h"
21
22#include "glincl.h"
23
24class MediaContainer : public TextureSequence
25{
26
27private:
28
29  AVFormatContext* format_context;
30  AVCodecContext* codec_context;
31  AVCodec* codec;
32  AVFrame* frame;
33  AVPacket packet;
34  AVFrame* RGB_frame;
35
36  //SDL_Surface* surface;
37  GLuint texture;
38  uint8_t* data;
39  uint8_t* buffer;
40  int num_bytes;
41  int video_stream;
42  double fps;
43
44public:
45
46  MediaContainer(const char* filename);
47  MediaContainer();
48  ~MediaContainer();
49
50  void loadMedia(const char* filename);
51  void loadFrames();
52
53  double getFPS();
54
55private:
56 
57  GLuint getNextFrame();
58
59};
60
61
62#endif /* _MEDIA_CONTAINER */
Note: See TracBrowser for help on using the repository browser.