Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Load AVI from another file resource and detect format of unsupported types (https://www.delphipraxis.net/181389-load-avi-another-file-resource-detect-format-unsupported-types.html)

WojTec 11. Aug 2014 09:32

Delphi-Version: XE5

Load AVI from another file resource and detect format of unsupported types
 
So, I created simple resource viewer for my purposes, all is oke, but I don't know how to load some resources types to preview: AVI, JPEG, PNG, GIF and RTF.

For AVI there is RT_AVI type, I can create hexadecimal preview, but I would like to see animation. I tried use TAnimation.ResName, but looks like it don't know location (file) from to load this resource. How I can load AVI preview?

For rest formats I wrote on beginning there are no RT_* values, please advice how to detect resource format (currently I can anly load as hex)? Have to create additional constants for this (but what values should has)?

arnof 11. Aug 2014 13:56

AW: Load AVI from another file resource and detect format of unsupported types
 
at your systeme you need the compressdriver for playback the movie.

can windows mediaplay playback this movie ?

WojTec 11. Aug 2014 16:17

Re: AW: Load AVI from another file resource and detect format of unsupported types
 
Zitat:

Zitat von arnof (Beitrag 1268338)
can windows mediaplay playback this movie ?

Codec is not problem, problem is how to load resource from another file than self or system (common AVI) to TAnimate. Or maybe another simple component that can load from stream (I know resource name and have content in stream)?

Code:
Animate1.ResHandle:= { handle from CreateFile() };
Animate1.ResName := { name here };

// Here is how handle is received
Handle := CreateFile(PChar(FFileName), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
And what about other types?


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:59 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz