[jitsi-dev] How are codec id's determined in the libjitsi FFmpeg.class?


#1

I need to add support for AAC in my project that uses libjitsi and I'm
getting lost trying to figure out how
the org.jitsi.impl.neomedia.codec.FFmpeg.class determines the codec id's
that it has internally. For instance FFmpeg.CODEC_ID_MP3 exists with the
value of 86017; how is that int determined? I am not a C / C++ guy, so even
though I looked through the avcodec.h file, I don't understand why the
majority of enums don't have values associated; even the CODEC_ID_MP3 is
blank there. So i n summary how would I add CODEC_ID_AAC and
CODEC_ID_AAC_LATM to my extension of the FFmpeg class?

Regards,
Paul


#2

I don't know what the exact rules for assigning integer values for enumerations in c++ is, but MP3 seems to be 86017 because it is defined right after MP2 which is 0x15000 = 86016. So I would expect AAC to be 86018.

Regards,
Boris

···

On 16/12/15 11:08, Mondain wrote:

I need to add support for AAC in my project that uses libjitsi and I'm
getting lost trying to figure out how
the org.jitsi.impl.neomedia.codec.FFmpeg.class determines the codec id's
that it has internally. For instance FFmpeg.CODEC_ID_MP3 exists with the
value of 86017; how is that int determined? I am not a C / C++ guy, so
even though I looked through the avcodec.h file, I don't understand why
the majority of enums don't have values associated; even the
CODEC_ID_MP3 is blank there. So i n summary how would I add CODEC_ID_AAC
and CODEC_ID_AAC_LATM to my extension of the FFmpeg class?


#3

Thanks Boris, I'll give that a shot.

···

On Wed, Dec 16, 2015 at 12:31 PM Boris Grozev <boris@jitsi.org> wrote:

On 16/12/15 11:08, Mondain wrote:
> I need to add support for AAC in my project that uses libjitsi and I'm
> getting lost trying to figure out how
> the org.jitsi.impl.neomedia.codec.FFmpeg.class determines the codec id's
> that it has internally. For instance FFmpeg.CODEC_ID_MP3 exists with the
> value of 86017; how is that int determined? I am not a C / C++ guy, so
> even though I looked through the avcodec.h file, I don't understand why
> the majority of enums don't have values associated; even the
> CODEC_ID_MP3 is blank there. So i n summary how would I add CODEC_ID_AAC
> and CODEC_ID_AAC_LATM to my extension of the FFmpeg class?

I don't know what the exact rules for assigning integer values for
enumerations in c++ is, but MP3 seems to be 86017 because it is defined
right after MP2 which is 0x15000 = 86016. So I would expect AAC to be
86018.

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev