Permalink
Browse files

Switched to another new codec list system. This should be siginifican…

…tly easier than past mechanisms

git-svn-id: https://svn.perian.org/trunk@1119 621663c8-3916-0410-8f58-edc14a8543d5
  • Loading branch information...
gbooker
gbooker committed Jul 30, 2009
1 parent a793d6a commit 719c3f9c606ce7b1bff99aa8031bff9c3dd34a8c
Showing with 220 additions and 811 deletions.
  1. +4 −0 CodecIDs.h
  2. +0 −105 FFissionCodec/FFissionCodec.r
  3. +14 −165 FFusionCodec.c
  4. +0 −335 FFusionCodec.r
  5. +45 −18 Perian.xcodeproj/project.pbxproj
  6. +0 −76 PerianResourceIDs.h
  7. +26 −0 PerianResourceIDs.h.m4
  8. +0 −59 TextSubCodec.r
  9. +0 −53 VobSubCodec.r
  10. +28 −0 codecID.c.m4
  11. +59 −0 codecList.m4
  12. +33 −0 codecResources.r.m4
  13. +8 −0 defines.m4
  14. +3 −0 scripts/generateCodecIDs.sh
View
@@ -103,4 +103,8 @@ enum {
kSubFormatVobSub = 'SPU ',
};
#ifndef REZ
int getCodecID(OSType componentType);
#endif
#endif

This file was deleted.

Oops, something went wrong.
View
@@ -42,6 +42,7 @@
#include "FrameBuffer.h"
#include "CommonUtils.h"
#include "pthread.h"
#include "CodecIDs.h"
void inline swapFrame(AVFrame * *a, AVFrame * *b)
{
@@ -560,175 +561,23 @@ pascal ComponentResult FFusionCodecPreflight(FFusionGlobals glob, CodecDecompres
if (!glob->avCodec)
{
enum CodecID codecID = CODEC_ID_MPEG4;
init_FFmpeg();
initFFusionParsers();
switch (glob->componentType)
{
case 'MPG4': // MS-MPEG4 v1
case 'mpg4':
case 'DIV1':
case 'div1':
codecID = CODEC_ID_MSMPEG4V1;
break;
case 'MP42': // MS-MPEG4 v2
case 'mp42':
case 'DIV2':
case 'div2':
codecID = CODEC_ID_MSMPEG4V2;
break;
case 'div6': // DivX 3
case 'DIV6':
case 'div5':
case 'DIV5':
case 'div4':
case 'DIV4':
case 'div3':
case 'DIV3':
case 'MP43':
case 'mp43':
case 'MPG3':
case 'mpg3':
case 'AP41':
case 'COL0':
case 'col0':
case 'COL1':
case 'col1':
case '3IVD': // 3ivx
case '3ivd':
codecID = CODEC_ID_MSMPEG4V3;
break;
case 'mp4v': // MPEG4 part 2 in mov/mp4
glob->packedType = PACKED_QUICKTIME_KNOWS_ORDER;
case 'divx': // DivX 4
case 'DIVX':
case 'mp4s':
case 'MP4S':
case 'm4s2':
case 'M4S2':
case 0x04000000:
case 'UMP4':
case 'DX50': // DivX 5
case 'XVID': // XVID
case 'xvid':
case 'XviD':
case 'XVIX':
case 'BLZ0':
case '3IV2': // 3ivx
case '3iv2':
case 'RMP4': // Miscellaneous
case 'SEDG':
case 'WV1F':
case 'FMP4':
case 'SMP4':
codecID = CODEC_ID_MPEG4;
break;
case 'avc1': // H.264 in mov/mp4/mkv
glob->packedType = PACKED_QUICKTIME_KNOWS_ORDER;
case 'H264': // H.264 in AVI
case 'h264':
case 'X264':
case 'x264':
case 'AVC1':
case 'DAVC':
case 'VSSH':
codecID = CODEC_ID_H264;
break;
case 'FLV1':
codecID = CODEC_ID_FLV1;
break;
case 'FSV1':
codecID = CODEC_ID_FLASHSV;
break;
case 'VP60':
case 'VP61':
case 'VP62':
codecID = CODEC_ID_VP6;
break;
case 'VP6F':
case 'FLV4':
codecID = CODEC_ID_VP6F;
break;
case 'I263':
case 'i263':
codecID = CODEC_ID_H263I;
break;
case 'VP30':
case 'VP31':
glob->shouldUseReturnedFrame = TRUE;
codecID = CODEC_ID_VP3;
break;
case 'HFYU':
codecID = CODEC_ID_HUFFYUV;
break;
case 'FFVH':
codecID = CODEC_ID_FFVHUFF;
break;
case 'MPEG':
case 'mpg1':
case 'mp1v':
codecID = CODEC_ID_MPEG1VIDEO;
break;
case 'MPG2':
case 'mpg2':
case 'mp2v':
codecID = CODEC_ID_MPEG2VIDEO;
break;
case 'FPS1':
codecID = CODEC_ID_FRAPS;
break;
case 'SNOW':
codecID = CODEC_ID_SNOW;
break;
OSType componentType = glob->componentType;
enum CodecID codecID = getCodecID(componentType);
if(componentType == 'mp4v' || componentType == 'avc1')
glob->packedType = PACKED_QUICKTIME_KNOWS_ORDER;
else if(componentType == 'VP30' || componentType == 'VP31')
glob->shouldUseReturnedFrame = TRUE;
case 'RJPG':
case 'NUV1':
codecID = CODEC_ID_NUV;
break;
case 'tscc':
codecID = CODEC_ID_TSCC;
break;
case 'ZMBV':
codecID = CODEC_ID_ZMBV;
break;
case 'VP6A':
codecID = CODEC_ID_VP6A;
break;
case 'RT21':
codecID = CODEC_ID_INDEO2;
break;
case 'IV31':
case 'IV32':
case 'iv31':
case 'iv32':
codecID = CODEC_ID_INDEO3;
break;
default:
Codecprintf(glob->fileLog, "Warning! Unknown codec type! Using MPEG4 by default.\n");
}
if(codecID == CODEC_ID_NONE)
{
Codecprintf(glob->fileLog, "Warning! Unknown codec type! Using MPEG4 by default.\n");
codecID = CODEC_ID_MPEG4;
}
glob->avCodec = avcodec_find_decoder(codecID);
// if(glob->packedType != PACKED_QUICKTIME_KNOWS_ORDER)
Oops, something went wrong.

0 comments on commit 719c3f9

Please sign in to comment.