Re: Compilation Issue
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image. Regards, Usman
Usman Bashir wrote:
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image.
Huh? Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library. 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
On Mon, Sep 26, 2005 at 12:48:02PM +0200, Martin Boehme wrote:
Usman Bashir wrote:
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image.
Huh?
Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library.
I get the feeling the original poster doesn't understand the C language much at all, and has little/no idea what static means. Rich
Rich Felker wrote:
On Mon, Sep 26, 2005 at 12:48:02PM +0200, Martin Boehme wrote:
Usman Bashir wrote:
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image.
Huh?
Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library.
I get the feeling the original poster doesn't understand the C language much at all, and has little/no idea what static means.
Well, that explanation would certainly be consistent with the data... ;-) 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
Martin Boehme <boehme at inb.uni-luebeck.de> writes:
Rich Felker wrote:
On Mon, Sep 26, 2005 at 12:48:02PM +0200, Martin Boehme wrote:
Usman Bashir wrote:
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image.
Huh?
Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library. I get the feeling the original poster doesn't understand the C language much at all, and has little/no idea what static means.
Well, that explanation would certainly be consistent with the data... ;-)
He's probably thinking of Java. -- M?ns Rullg?rd mru at inprovide.com
M?ns Rullg?rd wrote:
Martin Boehme <boehme at inb.uni-luebeck.de> writes:
Rich Felker wrote:
On Mon, Sep 26, 2005 at 12:48:02PM +0200, Martin Boehme wrote:
Usman Bashir wrote:
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image.
Huh?
Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library.
I get the feeling the original poster doesn't understand the C language much at all, and has little/no idea what static means.
Well, that explanation would certainly be consistent with the data... ;-)
He's probably thinking of Java.
Yeah, makes sense... though I still don't see why non-static member functions should be _smaller_ than static member functions -- is this the case for some obscure reason? (Have to admit I don't know a lot about Java's internals.) 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
Martin Boehme <boehme at inb.uni-luebeck.de> writes:
M?ns Rullg?rd wrote:
Martin Boehme <boehme at inb.uni-luebeck.de> writes:
Rich Felker wrote:
On Mon, Sep 26, 2005 at 12:48:02PM +0200, Martin Boehme wrote:
Usman Bashir wrote:
Hi! I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found almost all the functions "static", can I replace them with instance/normal functions. As I think so it will increase the size of run time image.
Huh?
Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library.
I get the feeling the original poster doesn't understand the C language much at all, and has little/no idea what static means.
Well, that explanation would certainly be consistent with the data... ;-) He's probably thinking of Java.
Yeah, makes sense... though I still don't see why non-static member functions should be _smaller_ than static member functions -- is this the case for some obscure reason? (Have to admit I don't know a lot about Java's internals.)
That's not the case. Behind the scenes, every non-static function gets passed a pointer to "this" along with the visible arguments. Apart from that, there is no difference between static and non-static functions. (My job involves work on a JVM, so I might know something about it.) -- M?ns Rullg?rd mru at inprovide.com
M?ns Rullg?rd wrote:
Martin Boehme <boehme at inb.uni-luebeck.de> writes:
M?ns Rullg?rd wrote:
Martin Boehme <boehme at inb.uni-luebeck.de> writes:
Rich Felker wrote:
On Mon, Sep 26, 2005 at 12:48:02PM +0200, Martin Boehme wrote:
Usman Bashir wrote:
>Hi! > I was seeing the file ("ffmpeg.c") in the ffmpeg source. I found >almost all the functions "static", can I replace them with >instance/normal functions. As I think so it will increase the size of >run time image.
Huh?
Don't understand what you're proposing here, but these functions are static because they are only needed in ffmpeg.c. This file is an executable, not part of the library.
I get the feeling the original poster doesn't understand the C language much at all, and has little/no idea what static means.
Well, that explanation would certainly be consistent with the data... ;-)
He's probably thinking of Java.
Yeah, makes sense... though I still don't see why non-static member functions should be _smaller_ than static member functions -- is this the case for some obscure reason? (Have to admit I don't know a lot about Java's internals.)
That's not the case. Behind the scenes, every non-static function gets passed a pointer to "this" along with the visible arguments. Apart from that, there is no difference between static and non-static functions.
So it's just the same as in C++ -- and a static member function should thus be slightly faster to call and generate less code at the call site than the non-static equivalent.
(My job involves work on a JVM, so I might know something about it.)
So I asked the right person... ;-) 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
participants (4)
-
boehme@inb.uni-luebeck.de -
dalias@aerifal.cx -
mru@inprovide.com -
usman.bashir@DIT24.COM.PK