Changeset 6013 in orxonox.OLD for branches/avi_play/src/lib
- Timestamp:
- Dec 10, 2005, 5:56:36 PM (19 years ago)
- Location:
- branches/avi_play/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/graphics/importer/media_container.cc
r6003 r6013 40 40 av_register_all(); 41 41 42 43 42 current_frame = 0; 43 num_frames = 0; 44 44 45 45 if (filename != NULL) … … 53 53 MediaContainer::~MediaContainer() 54 54 { 55 //av_free(pFrameRGB);55 av_free(pFrameRGB); 56 56 57 57 /* Free the frame */ 58 58 av_free(frame); 59 59 … … 78 78 SDL_Surface* MediaContainer::getFrame(int frame_number) 79 79 { 80 SDL_Surface* frame; 81 80 SDL_Surface* frame; 82 81 83 return frame; 82 83 return frame; 84 84 } 85 85 86 86 SDL_Surface* MediaContainer::getNextFrame() 87 87 { 88 89 88 current_frame++; 89 return this->getFrame(current_frame); 90 90 } 91 91 … … 96 96 PRINTF(1)("Could not open %s\n", filename); 97 97 98 98 /* Retrieve stream information */ 99 99 if (av_find_stream_info(format_context) < 0) 100 100 PRINTF(1)("Could not find stream information in %s\n", filename); 101 101 102 102 // Dump information about file onto standard error … … 106 106 video_stream = -1; 107 107 for(int i = 0; i < format_context->nb_streams; i++) 108 109 110 111 108 { 109 // NOTE: different code for the 0.4.9-pre1 release of ffmpeg (tardis) 110 // if(format_context->streams[i]->codec.codec_type == CODEC_TYPE_VIDEO) 111 if(format_context->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) 112 112 { 113 113 video_stream = i; 114 114 break; 115 115 } 116 116 } 117 117 118 119 118 if(video_stream == -1) 119 PRINTF(1)("Could not find a video stream in %s\n", filename); 120 120 121 122 123 121 /* Get a pointer to the codec context for the video stream */ 122 // NOTE: different code for the 0.4.9-pre1 release of ffmpeg (tardis) 123 // codec_context = &format_context->streams[video_stream]->codec; 124 124 codec_context = format_context->streams[video_stream]->codec; 125 125 126 126 /* Find the decoder for the video stream */ 127 127 codec = avcodec_find_decoder(codec_context->codec_id); 128 128 if (codec == NULL) 129 129 PRINTF(1)("Could not find codec\n"); 130 130 131 131 /* Open codec */ 132 132 if (avcodec_open(codec_context, codec) < 0) 133 PRINTF(1)("Could not open codec\n"); 134 135 133 PRINTF(1)("Could not open codec\n"); 136 134 137 135 } -
branches/avi_play/src/lib/sound/sound_engine.cc
r6003 r6013 294 294 ALCchar deviceName[] = 295 295 #endif 296 296 297 #ifdef __WIN32__ 297 298 "Direct3D";
Note: See TracChangeset
for help on using the changeset viewer.