Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

branches/avi_file: includes

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