-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pl_mpeg + physfs = possible? #19
Comments
This is absolutely possible! For a little bit of a jumpstart, I went ahead and modified the video player example from this repository to use physfs instead, to demonstrate how to join these libraries better :) https://gist.github.com/alichay/0e1096a3e147b02a097190870345bea2 |
@alichay Oh, sorry, just noticed your reply. Ok, I will check this out. Many thanks! 👍🏿 |
Actually, if you use the buffer interface, then you can read in chucks at a time and not have to load the whole thing into memory. procedure plm_buffer_load(buffer: Pplm_buffer_t; user: Pointer); cdecl;
const
LBufSize = 1024*2;
var
LBuff: array[1..LBufSize] of Byte;
begin
if PHYSFS_eof(Phys) <> 0 then
begin
if plm_get_loop(Plm) = 1 then
PHYSFS_seek(Phys, 0);
else
plm_buffer_signal_end(buffer);
end
else
begin
PHYSFS_readBytes(Phys, @LBuff[1], LBufSize);
plm_buffer_write(buffer, @LBuff[1], LBufSize);
end;
end; |
Hi, I'm looking around for a video playback solution and considering pl_mpeg. Can it be made to work with physfs?? I'm currently using physfs to load resources from a zip archive, so I need to be able to also play the videos from this archive as well. At present I don't see a way to easily do it. Maybe I've overlooked something, please advise.
Thanks
Jarrod
The text was updated successfully, but these errors were encountered: