![]() |
|
Video playback issues |
drezgames
Member #16,835
April 2018
![]() |
I've noticed that after you call al_set_physfs_file_interface, then all calls to al_open_video no longer will accept the filename being on a path. The file will have to be in the root of the exe or if inside an archive has to be at the root level. All the other resources seem to not be affected by this behavior. I have all game resources in a folder called data: [data] I load images such as: data/bitmaps/image.png. But I am unable to do the same for video after al_set_physfs_file_interface call. Having the it structured this way, I can zip the data folder up to data.dat and everything will continue to work without having to change any path. Just video seems to have a different behavior. Any ideas? Thanks Jarrod Davis |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
your best bet is to step into al_load_video and debug it yourself. Step into the allegro loading functions and see which function is being used to actually load the file. It probably calls al_fopen, so you can set a break point there. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
SiegeLord
Member #7,827
October 2006
![]() |
You can enable logging by calling al_set_config_value(al_get_system_config(), "trace", "level", "debug") before al_init, which will create a log file (`allegro.log`) in your current directory. There, the video addon should dump some useful information. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
drezgames
Member #16,835
April 2018
![]() |
Hi, thanks for the replies. I'm using Delphi. Everything else that I've tried (bitmaps, samples and streams) all seem to work as expected. It just video that will not accept a path in filename after physfs is enabled. At this point, only a filename and must be in root. I know some c/c++ but my primary language is Delphi. I have a project that I'm working so I had to get this working. In the meantime I implemented my own management for zip archives. Hopefully it will be good enough. Even if video had al_open_videof that accepted a ALLEGRO_FILE interface it would have been easier to make something else work, but nope. Hopefully what I got now will work well enough for this project. Update: video W ogv.c:1184 ogv_open_video [ 8.13665] Failed to open data\video\presents.ogv. Which is this section of code: filename = al_path_cstr(video->filename, ALLEGRO_NATIVE_PATH_SEP); fp = al_fopen(filename, "rb"); if (!fp) { ALLEGRO_WARN("Failed to open %s.\n", filename); return false; } Docs says that al_fopen will use physfs_open after its enabled. All the other loading routines (bitmap, sample, streams) seem to work fine. Jarrod Davis |
beoran
Member #12,636
March 2011
|
What happens when you change the path separator to a forward slash? I |
drezgames
Member #16,835
April 2018
![]() |
Actually, I do use forward slashes in code (that was a copy/paste from the log). Its very weird. Can't seem to get a handle on why its even an issue. Jarrod Davis |
|