On Wed, 18 Feb 2009 15:04:34 -0500, AliReza Khoshgoftar Monfared <[email protected]> wrote: > Yes, > I am trying to add some stuff that may be useful. But have never had a > similar experience for a linux library. > So I don't know how to do this.
This is kind of a large topic (and very off-topic for the libav user list) but I'll try to point you in the right direction. >> > I had a question regarding adding a written library to ffmpeg. > (Next, I wanna make some other libraries that may have different stuff, > but use ffmpeg functions to do video processing stuff, and I want to > make them a part of ffmpeg) First, terminology: they call it a "library" because the code in the ffmpeg project is packaged up into shared object files (.so) which can be linked into other programs. A ".c" file is not a library. The "ffmpeg" executable is not a library. "libavcodec.so" is. So, you would say the ffmpeg project sourcecode builds 4 libraries and several executables. We refer to the libraries as "libav*" Now, do you mean that you want to build a new library and contribute it to the ffmpeg project? or do you want to add a few functions to one of the libraries in the ffmpeg project? > As a test, I copied ffmpeg.c, renamed to myffmepg.c ,and changed it's > "main" function to "mymain". I did also made a myffmpeg.h to have the > prototype of this function. > > Now, what should I do to be able to call this function in ffmpeg API? If you want to add your function to one of ffmpeg's existing libraries, the easiest way is to add it to an existing source file and header. If you have enough code that it needs its own file, you will need to look at "Makefile", learn how the 'make' command works, and add your filename to the makefile. Then, when you run "make" your new functions will get packaged up into the '.so' it generates. If you also add your functions to the right header, then you will be able to call them just like any other function in libav. -- Michael Conrad IntelliTree Solutions llc. 513-552-6362 [email protected] _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
