Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 12, 2005, 4:32:11 PM (18 years ago)
Author:
hdavid
Message:

branches\avi_play: MediaContainer::getNextFrame() grabs a frame and saves it as a ppm image, would not try it with large video files ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/avi_play/src/lib/graphics/importer/media_container.h

    r6057 r6068  
    2424using namespace std;
    2525
    26 /* Forward Declaration */
    27 struct SDL_Surface;
    28 
    2926class MediaContainer : public BaseObject
    3027{
     
    3229private:
    3330
    34         int current_frame;
    35         int num_frames;
     31  int current_frame;
     32  int num_frames;
     33  GLuint texture;
    3634
    37         AVFormatContext* format_context;
    38         AVCodecContext* codec_context;
    39         AVCodec* codec;
    40         AVFrame* frame;
    41         AVPacket packet;
     35  AVFormatContext* format_context;
     36  AVCodecContext* codec_context;
     37  AVCodec* codec;
     38  AVFrame* frame;
     39  AVPacket packet;
     40  AVPicture* picture;
     41  AVFrame* RGB_frame;
    4242       
    43         int num_bytes;
    44         int video_stream;
    45         bool frames_left;
     43  int num_bytes;
     44  uint8_t *buffer;
     45  int video_stream;
    4646
    4747public:
     
    5050  ~MediaContainer();
    5151
    52         //GLuint getFrame(int frame_number);
    53         SDL_Surface* getFrame(int frame_number);
    54         //GLuint getNextFrame();
    55         SDL_Surface* getNextFrame();
    56         void loadMedia(const char* filename);
     52  GLuint getFrame(int frame_number);
     53  GLuint getNextFrame();
     54  void loadMedia(const char* filename);
    5755       
    58         int getHeight();
    59         int getWidth();
    60         int getFrameRate();
    61         void getStream(/* stream */);
     56  int getHeight();
     57  int getWidth();
     58  int getFrameRate();
     59  void getStream(/* stream */);
    6260
    63         bool framesLeft();
    64 
    65         /* prints some information about the
    66            media file for debug reasons */
    67         void printMediaInformation();
     61  /* prints some information about the
     62     media file for debug reasons */
     63  void printMediaInformation();
     64  void printPacketInformation();
     65  void saveCurrentFrame();
    6866
    6967};
Note: See TracChangeset for help on using the changeset viewer.