Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

branches\avi_play: some changes….

File size: 1.2 KB
RevLine 
[5937]1/*!
2 * @file media_container.h
3  *  Manages the media files
4
5*/
6
7#ifndef _MEDIA_CONTAINER
8#define _MEDIA_CONTAINER
9
[6163]10#include <SDL.h>
11#include <vector>
[5937]12
[5959]13#ifdef HAVE_AVFORMAT_H
14  #include <avformat.h>
15#else
16  #include <ffmpeg/avformat.h>
17#endif
18
[5937]19/* include base_object.h since all classes are derived from this one */
20#include "base_object.h"
21
22/* using namespace std is default, this needs to be here */
23using namespace std;
24
25class MediaContainer : public BaseObject
26{
27
28private:
29
[6127]30  double fps;
[6163]31  SDL_Surface* surface;
[6112]32  uint8_t* data;
[5937]33
[6068]34  AVFormatContext* format_context;
35  AVCodecContext* codec_context;
36  AVCodec* codec;
37  AVFrame* frame;
38  AVPacket packet;
[6163]39  AVFrame* RGB_frame;
[6068]40  AVPicture* picture;
[6112]41
[6068]42  int num_bytes;
43  uint8_t *buffer;
44  int video_stream;
[6254]45  int duration;
[5937]46
[6163]47  vector<SDL_Surface*>    surface_list;
48
[5937]49public:
50
[5939]51  MediaContainer(const char* filename);
[5937]52  ~MediaContainer();
53
[6254]54  SDL_Surface* getFrame(float time_stamp);
[6160]55  SDL_Surface* getNextFrame();
[6163]56  vector<SDL_Surface*> getFrameList();
[6068]57  void loadMedia(const char* filename);
[6112]58
[6068]59  int getHeight();
60  int getWidth();
[6127]61  int getFrameNumber();
62  double getFPS();
[5937]63
[6163]64  void saveCurrentFrame();
65
[6068]66  void printMediaInformation();
67  void printPacketInformation();
[6057]68
[5937]69};
70
71
72#endif /* _MEDIA_CONTAINER */
Note: See TracBrowser for help on using the repository browser.