Please, help me! I have compiled an AVI file into my EXE file as a user resource. Then I've got (during FindResource, LoadResource...) a pointer to data of this AVI in memory. So, my question is : How to create MCI window and play this AVI in it?????

How to play my AVI data in memory in window (during MCI because this AVI is compressed as MPEG-4)???

p.s.
I created MCI window by MCIWndCreate function, and tried to send a mci message (mciSendMessage) MCIWM_OPENINTERFACE and as a parameter I wrote that pointer in memory, but it didn't work!!!
Posted on 2002-01-21 05:45:21 by basil
I think there was a similar thread earlier... the solution, iirc, was to
write the media file to disk and use MCI commands to open it from
there - try using the board's search feature. Yep, this is an ugly way
to do it, but MCI is a piece of crap :).
Posted on 2002-01-21 06:46:25 by f0dder
Thank you, but my aim is to compile AVI file into my executable module! For example look how does program "empty recycle bin" works, when the process of deleting files is in progress there is a window in which a siply AVI is playing. (this AVI isn't anywhere on my disk as an independent file...

OK. Anyhow. Are there another methodes to blayblack AVI data, which is loaded into memory block, in a window??
Posted on 2002-01-21 07:06:52 by basil
I believe those type of animations are used in "Animation Controls",
and only support a very limited subset of the AVI stuff.
Look up "Animation Controls" in PlatformSDK.
Posted on 2002-01-21 07:17:38 by f0dder
>OK. Anyhow. Are there another methodes to blayblack AVI data, which is loaded into memory block, in a window??

You're lucky, man! Yesterday, I wrote a function wich plays a AVI from resource! :)
When I'm at home, I'll post it here! I'm sure, you like it, because you don't have to struggle with FindResource / LockResource :) And it doesn't use MCI!
Posted on 2002-01-21 07:22:11 by bazik
Sounds great, bAZIK!
Posted on 2002-01-21 07:24:51 by f0dder
In your .rc file



#define AVI_FILE 2010 // avi file reference
#define IDC_ANIM 2011 // control reference

AVI_FILE AVI "anim.avi"

CONTROL "AVI_FILE", IDC_ANIM, "SysAnimate32", WS_VISIBLE | 0x8 | ACS_TRANSPARENT | ACS_AUTOPLAY, 3, 33, 0, 0

in your wndproc WM_INITDIALOG or something
invoke SendDlgItemMessage, hwnd, IDC_ANIM, ACM_OPENA, 0, AVI_FILE

This will make avi auto play.
You may check Animation Control Messages in win32.hlp file formore commands.
Hope it helps.
Posted on 2002-01-21 17:10:23 by LaptoniC
I remember that AVI Controls work only with uncompressed AVI files - is this true?

Another issue is playing with MCI from resource - there is a way described at microsoft, look at www.microsoft.com for "play avi from memory" or try the link:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q155360
Posted on 2002-01-22 03:46:26 by beaster

In your .rc file



#define AVI_FILE 2010 // avi file reference
#define IDC_ANIM 2011 // control reference

AVI_FILE AVI "anim.avi"

CONTROL "AVI_FILE", IDC_ANIM, "SysAnimate32", WS_VISIBLE | 0x8 | ACS_TRANSPARENT | ACS_AUTOPLAY, 3, 33, 0, 0

in your wndproc WM_INITDIALOG or something
invoke SendDlgItemMessage, hwnd, IDC_ANIM, ACM_OPENA, 0, AVI_FILE

This will make avi auto play.
You may check Animation Control Messages in win32.hlp file formore commands.
Hope it helps.


Hmm... shit... I was to tiered yesterday, and had no time to post my code here... but I'll post it anyway, because it uses CreateWindowEx instead of a rc file. And it has Start, Pause, Stop buttons :)
Posted on 2002-01-22 08:37:43 by bazik