Mercurial > hg > easaier-soundaccess
comparison data/fileio/VideoFileReader.cpp @ 130:b3df8b8185db
video in a widget, with a basic solution (not optimal)
author | benoitrigolleau |
---|---|
date | Thu, 08 Nov 2007 14:27:36 +0000 |
parents | 587ad94d6ac2 |
children | 3b2b790e47e5 |
comparison
equal
deleted
inserted
replaced
129:587ad94d6ac2 | 130:b3df8b8185db |
---|---|
188 { | 188 { |
189 int w,h; | 189 int w,h; |
190 // we get the size from our active video stream, if no active video stream | 190 // we get the size from our active video stream, if no active video stream |
191 // exists, width and height are set to default values (320x240) | 191 // exists, width and height are set to default values (320x240) |
192 SDL_ffmpegGetVideoSize(file, &w, &h); | 192 SDL_ffmpegGetVideoSize(file, &w, &h); |
193 | 193 SDL_Init(SDL_INIT_VIDEO); |
194 // Open the Video device | 194 // Open the Video device |
195 screen = SDL_SetVideoMode(w, h, 0, SDL_DOUBLEBUF|SDL_HWSURFACE); | 195 screen = SDL_SetVideoMode(w, h, 0, SDL_DOUBLEBUF|SDL_HWSURFACE); |
196 SDL_WM_SetCaption("EASAIER Video Player", "EASAIER Video Player"); | 196 //SDL_WM_SetCaption("EASAIER Video Player", "EASAIER Video Player"); |
197 if(!screen) { | 197 if(!screen) { |
198 printf("Couldn't open video: %s\n", SDL_GetError()); | 198 printf("Couldn't open video: %s\n", SDL_GetError()); |
199 return false; | 199 return false; |
200 } | 200 } |
201 return true; | 201 return true; |