Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Animation question

Author
Message
Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 26th Oct 2002 22:23
I just want to ask how to do this. Example:
I want to show one animation frame from a AVI (or DVD) animation file, for example the frame number 476. Is there a way, or should I ask Lee for a command like ANIMATION FRAME=476?: Or can this be done via API and memblocks, and how?
There are also probaly some bugs too:
(DivX on AMD Thunderbird 1200) Animation jerks, the player is too slow to draw whole images on screen, so most frames stop to be drawn from the middle of the screen (the other half is the old frame), some animations freezes for few seconds (only video, not audio). After playing a longer animation one time the cursor changes into a square.
Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 27th Oct 2002 23:54
More sad stuff: the Avi does not allways obey to SET ANIMATION SPEED. If I set speed to 10 (1/10th of normal speed), it hangs as usual some seconds after start, then it plays faster, then again slower...
I really need something like SHOW NEXT ANIMATION FRAME available if animation paused.

Thade!
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: Austria
Posted: 28th Oct 2002 00:34
How can you ask for such complicated things while even the easy things do not run ?
Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 28th Oct 2002 02:02
Okay okay, I had even a more complicated request (READ xxx BYTES FROM FILE TO MEMBLOCK), but you´re right, this should wait until anything runs smoothly.
But he question is still there: Has someone found a possibility to access Media Player, to pass single still frame to a Memblock?
As far I know, it can be done from C++ or Delphi, but I never coded Multimedia stuff in C++, and never touched Delphi.
My old AVI reader for uncompressed AVIs only, still works, but imagine this: One Frame (256x192 pixels) takes 2.5 seconds to load (AMD TB 1200). Compressed AVIs are not loadable at moment.

Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 28th Oct 2002 03:14
Oh noooooo!!!!
I tried to made the AVI reader faster (It was faster with DB 1.13 too).
The reason for slowness is the READ BYTE function, so I replaced it by READ LONG (It is slow too, but reads 4 Bytes at one time, which makes it four times faster) and I tried to put it into Memblock with WRITE MEMBLOCK DWORD, this saves 1/4 of the time, but then after some frames the code fails.
Why?
I found the reason: DWORD copied into MEMBLOCK must be between 0 and 2147483648 (see in help), but 4 Byte from LONG can represent 0 to 4294967296, was there a reason to do this limitation?. Remember: I use Patch 1, so I did not know if this is fixed in Patch 2, but hopefully this will be Patch 3 will do!
If I replace this with READ WORD/WRITE MEMBLOCK WORD, the code will need twice the time it needs now.
Hope, there is planed to make READ TO MEMBLOCK (filenr,memblock,bytes) function.
READ MEMBLOCK that exist now, needs just to be modified a bit to skip the header.

Login to post a reply

Server time is: 2024-04-23 22:54:49
Your offset time is: 2024-04-23 22:54:49