Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

branches/avi_play: some init stuff

File size: 1.1 KB
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
11#ifdef HAVE_AVFORMAT_H
12  #include <avformat.h>
13#else
14  #include <ffmpeg/avformat.h>
15#endif
16
17
18#include "glincl.h"
19
20/* include base_object.h since all classes are derived from this one */
21#include "base_object.h"
22
23/* using namespace std is default, this needs to be here */
24using namespace std;
25
26/* Forward Declaration */
27struct SDL_Surface;
28
29class MediaContainer : public BaseObject
30{
31
32private:
33
34        char* filename;
35        int current_frame;
36        int num_frames;
37
38        AVFormatContext* format_context;
39        AVCodecContext* codec_context;
40        AVCodec* codec;
41        AVFrame* frame;
42        AVPacket packet;
43       
44        int num_bytes;
45        int video_stream;
46
47public:
48
49  MediaContainer(const char* filename);
50  ~MediaContainer();
51
52        //GLuint getFrame(int frame_number);
53        SDL_Surface* getFrame(int frame_number);
54        //GLuint getNextFrame();
55        SDL_Surface* getNextFrame();
56        void loadMedia(const char* filename);
57       
58        int getHeight();
59        int getWidth();
60        int getFrameRate();
61        void getStream(/* stream */);
62
63};
64
65
66
67#endif /* _MEDIA_CONTAINER */
Note: See TracBrowser for help on using the repository browser.