[Ffmpeg-devel] [PATCH] compile with demux only
Wed Nov 8 11:23:13 CET 2006
Lo?c Le Loarer wrote:
> Le Wednesday 08 November 2006 ? 08:58:47 +0100, Stefan Gehrer a ?crit:
>> Michael Niedermayer wrote:
>>> On Tue, Nov 07, 2006 at 06:02:37PM +0100, Loic wrote:
>>>> ff_cavs_find_frame_end function which is in cavs.c has been moved to
>>>> parser.c in the same block where it is used. As this function is only
>>>> used here, it can be removed for parser.h and declared static.
>>>> Note that some defines from cavsdata.h are needed by
>>>> ff_cavs_find_frame_end so I put them in a separate cavs.h file and
>>>> include it from cavs.c and parser.c (I don't include cavsdata.h directly
>>>> in parser.c because it contains many static const variable declaration
>>>> which use memory but wont be used).
>>> while i have no strong oppinion about this IMHO the cavs parser code should
>>> rather stay in cavs.c or be put in a seperate file alltogether, parser.c
>>> does not seem like the best place
>>> but iam not maintainer of cavs either ...
>> I agree, the parsing can be in cavs.c, I just put it into parser.c for
>> its similarity to the other code there. This could also avoid creating
>> that new cavs.h with almost no information in it (most of the defines
>> are duplicate from mpeg1/2 anyway). But sorry, I don't have time to
>> come up with a patch at the moment.
> The problem to put parsing stuf in cavs.c is that cavs.c in compiled
> only with CONFIG_CAVS_DECODER while the parsing stuff is compiled with
> CONFIG_CAVSVIDEO_PARSER. The solution is propose doesn't look really
> ugly to me as the parser.c file contains much bigger and unrelated stuf
> for AC3 parsing for example.
Well, correct ifdef and cavs.c in dependencies of cavs parser might be a
> Anyway, I agree that it isn't clean to put all this in parser.c file and
> so the best is probably to put cavs parsing stuf in a different file
> (cavs_parser.c ?). In this case, it is also the case for a big part of
> the parser.c file, each part inside #ifdef CONFIG_*_PARSER / #endif
> should be split in one file per codec, compiled using the same
> condition. But in this case, how do you share the mpeg4video_split
> function between CONFIG_CAVSVIDEO_PARSER and CONFIG_MPEG4VIDEO_PARSER
> and the ac3_parse function between CONFIG_AAC_PARSER and
> CONFIG_AC3_PARSER ? This is why, after all, I prefer the solution I
> propose, even with it drawbacks, a really clean solution requires too
> much modularity levels.
I would prefer having cavs related code in cavs.c, if mpeg4video and
cavs shares one function, put it in h263dec.c and add dependencies. I
have no strong opinion neither though. Im more in favor of cleaning parser.c
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel