Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

branches/avi_file: created media_container files

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