Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

branches/avi_play: some changes

File size: 955 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
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
26class MediaContainer : public BaseObject
27{
28
29private:
30
31        char* filename;
32        int current_frame;
33
34        AVFormatContext* format_context;
35        AVCodecContext* codec_context;
36        AVCodec* codec;
37        AVFrame* frame;
38        AVPacket packet;
39       
40        int num_bytes;
41        int video_stream;
42
43public:
44
45  MediaContainer(const char* filename);
46  ~MediaContainer();
47
48        GLuint getFrame(int frame_number);
49        GLuint getNextFrame();
50        void loadMedia(const char* filename);
51       
52        int getHeight();
53        int getWidth();
54        int getFrameRate();
55        void getStream(/* stream */);
56
57};
58
59
60
61#endif /* _MEDIA_CONTAINER */
Note: See TracBrowser for help on using the repository browser.