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: David Hasenfratz, Stephan Lienhard |
---|
13 | co-programmer: |
---|
14 | */ |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | /* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_MEDIA module |
---|
19 | For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput |
---|
20 | */ |
---|
21 | #define DEBUG_MODULE_MEDIA |
---|
22 | |
---|
23 | |
---|
24 | /* include your own header */ |
---|
25 | #include "media_container.h" |
---|
26 | |
---|
27 | /* header for debug output */ |
---|
28 | #include "debug.h" |
---|
29 | |
---|
30 | |
---|
31 | /** |
---|
32 | * Default constructor |
---|
33 | */ |
---|
34 | MediaContainer::MediaContainer(const char* filename) |
---|
35 | { |
---|
36 | /* set the class id for the base object */ |
---|
37 | this->setClassID(CL_MEDIA_CONTAINER, "MediaContainer"); |
---|
38 | |
---|
39 | /* register all formats and codecs */ |
---|
40 | av_register_all(); |
---|
41 | |
---|
42 | if (filename != NULL) |
---|
43 | this->loadMedia(filename); |
---|
44 | |
---|
45 | } |
---|
46 | |
---|
47 | /** |
---|
48 | * Default destructor |
---|
49 | */ |
---|
50 | MediaContainer::~MediaContainer() |
---|
51 | { |
---|
52 | |
---|
53 | } |
---|
54 | |
---|
55 | GLuint MediaContainer::getFrame(int frame_number) |
---|
56 | { |
---|
57 | |
---|
58 | } |
---|
59 | |
---|
60 | GLuint MediaContainer::getNextFrame() |
---|
61 | { |
---|
62 | |
---|
63 | } |
---|
64 | |
---|
65 | void MediaContainer::loadMedia(const char* filename) |
---|
66 | { |
---|
67 | /* Open video file */ |
---|
68 | if (av_open_input_file(&format_context, filename, NULL, 0, NULL) !=0 ) |
---|
69 | PRINTF(1)("Could not open %s\n", filename); |
---|
70 | |
---|
71 | } |
---|
72 | |
---|
73 | int MediaContainer::getHeight() |
---|
74 | { |
---|
75 | |
---|
76 | } |
---|
77 | |
---|
78 | int MediaContainer::getWidth() |
---|
79 | { |
---|
80 | |
---|
81 | } |
---|
82 | |
---|
83 | int MediaContainer::getFrameRate() |
---|
84 | { |
---|
85 | |
---|
86 | } |
---|
87 | |
---|
88 | void MediaContainer::getStream(/* stream */) |
---|
89 | { |
---|
90 | |
---|
91 | } |
---|