Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/avi_play/src/subprojects/importer/importer.cc @ 6068

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

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

File size: 1.3 KB
RevLine 
[4554]1/*
[4333]2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14
15   this file extends the framework file, so it renders what i want.
16*/
17
18#include "framework.h"
19
[4343]20#include "light.h"
[4333]21
[4343]22#include "objModel.h"
23#include "primitive_model.h"
[6003]24#include "media_container.h"
[4343]25#include <stdlib.h>
[4333]26
[4649]27#include "resource_manager.h"
[4343]28
29Model* obj;
[6057]30MediaContainer* movie;
[4343]31
32void Framework::moduleInit(int argc, char** argv)
[4333]33{
[6003]34
[6057]35  movie = new MediaContainer(argv[1]);
[6003]36
[6068]37  // print information about the media file
38  movie->printMediaInformation();
[6057]39
[6068]40  SDL_Delay(1000);
[4649]41
[6068]42  // get the frame and save it as an image
43  //while(movie->getNextFrame() != NULL);       
[4653]44
[4333]45}
46
[4334]47void Framework::moduleEventHandler(SDL_Event* event)
48{
49  switch (event->type)
50    {
51    case SDL_KEYDOWN:
52      switch (event->key.keysym.sym)
[4554]53        {
54        case SDLK_i:
55          break;
56        }
[4334]57    }
[4333]58}
59
60void Framework::moduleTick(float dt)
61{
[6068]62  while(movie->getNextFrame() != NULL); 
[4333]63}
64
[4349]65void Framework::moduleDraw(void) const
[4334]66{
[4343]67
[4334]68}
[4333]69
[4334]70
[4333]71void Framework::moduleHelp(void) const
72{
[4554]73
[4333]74}
Note: See TracBrowser for help on using the repository browser.