-unsigned int codec_get_tag(const CodecTag *tags, int id)
-{
- while (tags->id != CODEC_ID_NONE) {
- if (tags->id == id)
- return tags->tag;
- tags++;
- }
- return 0;
-}
-
-unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id)
-{
- while (tags->id != CODEC_ID_NONE) {
- if (!tags->invalid_asf && tags->id == id)
- return tags->tag;
- tags++;
- }
- return 0;
-}
-
-enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag)
-{
- while (tags->id != CODEC_ID_NONE) {
- if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF)
- && toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF)
- && toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF)
- && toupper((tag >>24)&0xFF) == toupper((tags->tag >>24)&0xFF))
- return tags->id;
- tags++;
- }
- return CODEC_ID_NONE;
-}
-
-unsigned int codec_get_bmp_tag(int id)
-{
- return codec_get_tag(codec_bmp_tags, id);
-}
-
-unsigned int codec_get_wav_tag(int id)
-{
- return codec_get_tag(codec_wav_tags, id);
-}
-
-enum CodecID codec_get_bmp_id(unsigned int tag)
-{
- return codec_get_id(codec_bmp_tags, tag);
-}
-
-enum CodecID codec_get_wav_id(unsigned int tag)
-{
- return codec_get_id(codec_wav_tags, tag);
-}
-