[Ffmpeg-devel] Re: Using avcodec.dll and avformat.dll meansthatoutput_example.c would not work?

Lars Blumberg Lars.Blumberg
Thu Dec 8 21:54:01 CET 2005


Hello Martin,

I am using the API function LoadLibrary to connect to methods in the DLLs. 
That all works fine. It is the same way as you would use dynamic loading in 
C++. And I did not know before, that are "linked against each other" at 
runtime when loaded within the same application. Is that really true?

sincerly,

Lars

"Martin Boehme" <boehme at inb.uni-luebeck.de> schrieb im Newsbeitrag 
news:438C0ADE.9070707 at inb.uni-luebeck.de...
Lars Blumberg wrote:
> I am using ffmpeg functionality via the libraries "avcodec.dll" and 
> "avformat.dll", which  i have built before. To examine how to use both 
> DLLs (in Delphi) I am translating the example code "output_example.c" 
> given with the ffmpeg distribution.
>
> The first code which is run is "av_register_all" to register all necessary 
> things. When I have a look into the implementation of this method, I see 
> that "avcodec_register_all" is called there at first.
>
> But as you know, both methods are in different DLLs. That means, that 
> "av_register_all" cannot call "avcodec_register_all". When I only call the 
> first function I cannot use any codec. That's why I have to call 
> "avcodec_register_all" by myself after calling "av_register_all".

Hm... don't have any idea how loading DLLs works in Delphi... all I can
say is that "it works for me" under MinGW. My understanding was that
when a DLL has dependencies on further DLLs, those DLLs also get loaded
as part of the process.

Are you calling LoadLibrary() yourself (i.e. loading the DLLs
explicitly) or does Delphi do that for you?

Martin

-- 
Martin B?hme
Inst. f. Neuro- and Bioinformatics
Ratzeburger Allee 160, D-23538 Luebeck
Phone: +49 451 500 5514
Fax:   +49 451 500 5502
boehme at inb.uni-luebeck.de 







More information about the ffmpeg-devel mailing list