Last change
on this file since 6080 was
6068,
checked in by hdavid, 19 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
|
Line | |
---|
1 | /* |
---|
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 | |
---|
20 | #include "light.h" |
---|
21 | |
---|
22 | #include "objModel.h" |
---|
23 | #include "primitive_model.h" |
---|
24 | #include "media_container.h" |
---|
25 | #include <stdlib.h> |
---|
26 | |
---|
27 | #include "resource_manager.h" |
---|
28 | |
---|
29 | Model* obj; |
---|
30 | MediaContainer* movie; |
---|
31 | |
---|
32 | void Framework::moduleInit(int argc, char** argv) |
---|
33 | { |
---|
34 | |
---|
35 | movie = new MediaContainer(argv[1]); |
---|
36 | |
---|
37 | // print information about the media file |
---|
38 | movie->printMediaInformation(); |
---|
39 | |
---|
40 | SDL_Delay(1000); |
---|
41 | |
---|
42 | // get the frame and save it as an image |
---|
43 | //while(movie->getNextFrame() != NULL); |
---|
44 | |
---|
45 | } |
---|
46 | |
---|
47 | void Framework::moduleEventHandler(SDL_Event* event) |
---|
48 | { |
---|
49 | switch (event->type) |
---|
50 | { |
---|
51 | case SDL_KEYDOWN: |
---|
52 | switch (event->key.keysym.sym) |
---|
53 | { |
---|
54 | case SDLK_i: |
---|
55 | break; |
---|
56 | } |
---|
57 | } |
---|
58 | } |
---|
59 | |
---|
60 | void Framework::moduleTick(float dt) |
---|
61 | { |
---|
62 | while(movie->getNextFrame() != NULL); |
---|
63 | } |
---|
64 | |
---|
65 | void Framework::moduleDraw(void) const |
---|
66 | { |
---|
67 | |
---|
68 | } |
---|
69 | |
---|
70 | |
---|
71 | void Framework::moduleHelp(void) const |
---|
72 | { |
---|
73 | |
---|
74 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.