Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6112 was 6112, checked in by stefalie, 18 years ago

branches\avi_play: OpenGL still has problems to display our texture, way too slow

File size: 1.2 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
26class MediaContainer : public BaseObject
27{
28
29private:
30
31  int current_frame;
32  int num_frames;
33  GLuint texture;
34  uint8_t* data;
35
36  AVFormatContext* format_context;
37  AVCodecContext* codec_context;
38  AVCodec* codec;
39  AVFrame* frame;
40  AVPacket packet;
41  AVPicture* picture;
42  AVFrame* RGB_frame;
43
44  int num_bytes;
45  uint8_t *buffer;
46  int video_stream;
47
48public:
49
50  MediaContainer(const char* filename);
51  ~MediaContainer();
52
53  GLuint getFrame(int frame_number);
54  GLuint getNextFrame();
55  void loadMedia(const char* filename);
56
57  int getHeight();
58  int getWidth();
59  int getCurrentFrame();
60  int getFrameRate();
61  void getStream(/* stream */);
62
63  /* prints some information about the
64     media file for debug reasons */
65  void printMediaInformation();
66  void printPacketInformation();
67  void saveCurrentFrame();
68
69};
70
71
72
73#endif /* _MEDIA_CONTAINER */
Note: See TracBrowser for help on using the repository browser.