Changeset 819

Show
Ignore:
Timestamp:
02/29/08 13:44:10 (9 months ago)
Author:
astrange
Message:

Rename some functions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/FFissionCodec/FFissionCodec.cpp

    r525 r819  
    2525#include "FFissionCodec.h" 
    2626 
    27 extern "C" void initLib(); 
     27extern "C" void init_FFmpeg(); 
    2828 
    2929FFissionCodec::FFissionCodec(UInt32 inInputBufferByteSize) : ACSimpleCodec(inInputBufferByteSize) 
    3030{ 
    31         initLib(); 
     31        init_FFmpeg(); 
    3232         
    3333        avContext = avcodec_alloc_context(); 
  • trunk/FFusionCodec.c

    r816 r819  
    143143void ChangeHintText(int value, ControlRef staticTextField); 
    144144 
    145 extern void initLib(); 
     145extern void init_FFmpeg(); 
    146146extern CFMutableStringRef GetHomeDirectory(); 
    147147 
    148 #define FFCodecprintf(x...) if (glob->fileLog) Codecprintf(glob->fileLog, x); 
     148#define FFusionDebugPrint(x...) if (glob->fileLog) Codecprintf(glob->fileLog, x); 
    149149#define not(x) ((x) ? "" : "not ") 
    150150 
     
    305305    } 
    306306     
    307     FFCodecprintf("%p opened for '%s'\n", glob, FourCCString(glob->componentType)); 
     307    FFusionDebugPrint("%p opened for '%s'\n", glob, FourCCString(glob->componentType)); 
    308308    return err; 
    309309} 
     
    315315pascal ComponentResult FFusionCodecClose(FFusionGlobals glob, ComponentInstance self) 
    316316{ 
    317     FFCodecprintf("%p closed.\n", glob); 
     317    FFusionDebugPrint("%p closed.\n", glob); 
    318318 
    319319    // Make sure to close the base component and deallocate our storage 
     
    470470    // to the fourCC if it has not been done before 
    471471     
    472         FFCodecprintf("%p Preflight called.\n", glob); 
     472        FFusionDebugPrint("%p Preflight called.\n", glob); 
    473473         
    474474    if (!glob->avCodec) 
     
    476476                enum CodecID codecID = CODEC_ID_MPEG4; 
    477477                 
    478                 initLib(); 
     478                init_FFmpeg(); 
    479479                initFFusionParsers(); 
    480480                 
     
    690690                } 
    691691                 
    692                 FFCodecprintf("%p preflighted for %dx%d '%s'. (%d bytes of extradata)\n", glob, (**p->imageDescription).width, (**p->imageDescription).height, FourCCString(glob->componentType), glob->avContext->extradata_size); 
     692                FFusionDebugPrint("%p preflighted for %dx%d '%s'. (%d bytes of extradata)\n", glob, (**p->imageDescription).width, (**p->imageDescription).height, FourCCString(glob->componentType), glob->avContext->extradata_size); 
    693693         
    694694                if(glob->avContext->extradata_size != 0 && glob->begin.parser != NULL) 
     
    792792        capabilities->flags |= codecCanAsync | codecCanAsyncWhen; 
    793793         
    794         FFCodecprintf("%p Preflight requesting colorspace '%s'. (error %d)\n", glob, FourCCString(pos[0]), err); 
     794        FFusionDebugPrint("%p Preflight requesting colorspace '%s'. (error %d)\n", glob, FourCCString(pos[0]), err); 
    795795         
    796796    return err; 
     
    858858        myDrp->buffer = NULL; 
    859859         
    860         FFCodecprintf("%p BeginBand #%d. (%sdecoded, packed %d)\n", glob, p->frameNumber, not(myDrp->decoded), glob->packedType); 
     860        FFusionDebugPrint("%p BeginBand #%d. (%sdecoded, packed %d)\n", glob, p->frameNumber, not(myDrp->decoded), glob->packedType); 
    861861         
    862862        if (!glob->avContext) { 
     
    10231023        myDrp->GOPStartFrameNumber = glob->begin.lastIFrame; 
    10241024         
    1025         FFCodecprintf("%p BeginBand: frame #%d type %d. (%sskippable)\n", glob, myDrp->frameNumber, type, not(skippable)); 
     1025        FFusionDebugPrint("%p BeginBand: frame #%d type %d. (%sskippable)\n", glob, myDrp->frameNumber, type, not(skippable)); 
    10261026    return noErr; 
    10271027} 
     
    10291029static OSErr PrereqDecompress(FFusionGlobals glob, FrameData *prereq, AVCodecContext *context, ICMDataProcRecordPtr dataProc, long width, long height, AVFrame *picture) 
    10301030{ 
    1031         FFCodecprintf("%p prereq-decompressing frame #%d.\n", glob, prereq->frameNumber); 
     1031        FFusionDebugPrint("%p prereq-decompressing frame #%d.\n", glob, prereq->frameNumber); 
    10321032         
    10331033        FrameData *preprereq = FrameDataCheckPrereq(prereq); 
     
    10501050    FFusionDecompressRecord *myDrp = (FFusionDecompressRecord *)drp->userDecompressRecord; 
    10511051         
    1052         FFCodecprintf("%p DecodeBand #%d qtType %d. (packed %d)\n", glob, myDrp->frameNumber, drp->frameType, glob->packedType); 
     1052        FFusionDebugPrint("%p DecodeBand #%d qtType %d. (packed %d)\n", glob, myDrp->frameNumber, drp->frameType, glob->packedType); 
    10531053 
    10541054        avcodec_get_frame_defaults(&tempFrame); 
     
    10591059        { 
    10601060                /* Skipped some frames in here */ 
    1061                 FFCodecprintf("%p - frames skipped.\n", glob); 
     1061                FFusionDebugPrint("%p - frames skipped.\n", glob); 
    10621062                if(drp->frameType == kCodecFrameTypeKey || myDrp->GOPStartFrameNumber > glob->decode.lastFrame || myDrp->frameNumber < glob->decode.lastFrame) 
    10631063                { 
    10641064                        /* If this is a key frame or the P frame before us is after the last frame (skip ahead), or we are before the last decoded frame (skip back) * 
    10651065                         * then we are in a whole new GOP */ 
    1066                         FFCodecprintf("%p - in a new GOP.\n", glob); 
     1066                        FFusionDebugPrint("%p - in a new GOP.\n", glob); 
    10671067                        avcodec_flush_buffers(glob->avContext); 
    10681068                } 
     
    11451145        FFusionDataMarkRead(&(glob->data), frameData); 
    11461146         
    1147         FFCodecprintf("%p DecodeBand decoded #%d.\n", glob, glob->decode.lastFrame); 
     1147        FFusionDebugPrint("%p DecodeBand decoded #%d.\n", glob, glob->decode.lastFrame); 
    11481148 
    11491149        return err; 
     
    11781178        int i, j; 
    11791179         
    1180         FFCodecprintf("%p DrawBand #%d. (%sdecoded)\n", glob, myDrp->frameNumber, not(myDrp->decoded)); 
     1180        FFusionDebugPrint("%p DrawBand #%d. (%sdecoded)\n", glob, myDrp->frameNumber, not(myDrp->decoded)); 
    11811181         
    11821182        if(!myDrp->decoded) 
     
    12711271{ 
    12721272        FFusionDecompressRecord *myDrp = (FFusionDecompressRecord *)drp->userDecompressRecord; 
    1273         FFCodecprintf("%p EndBand #%d.\n", glob, myDrp->frameNumber); 
     1273        FFusionDebugPrint("%p EndBand #%d.\n", glob, myDrp->frameNumber); 
    12741274    return noErr; 
    12751275} 
     
    15681568    long availableData = dataProc ? codecMinimumDataSize : kInfiniteDataSize; 
    15691569         
    1570         FFCodecprintf("%p Decompress on frame #%d (%d bytes).\n", glob, glob->decode.lastFrame, length); 
     1570        FFusionDebugPrint("%p Decompress on frame #%d (%d bytes).\n", glob, glob->decode.lastFrame, length); 
    15711571    picture->data[0] = 0; 
    15721572         
  • trunk/VobSubCodec.c

    r794 r819  
    216216         
    217217        if (!glob->avCodec) { 
    218                 initLib(); 
     218                init_FFmpeg(); 
    219219                 
    220220                glob->avCodec = avcodec_find_decoder(CODEC_ID_DVD_SUBTITLE); 
  • trunk/ff_MovieImport.c

    r806 r819  
    7474                av_register_bitstream_filter(&x##_bsf); } 
    7575 
    76 void initLib() 
     76void init_FFmpeg() 
    7777{ 
    7878        /* This one is used because Global variables are initialized ONE time 
     
    354354        require_noerr(result,bail); 
    355355         
    356         initLib(); 
     356        init_FFmpeg(); 
    357357        storage->format = av_probe_input_format(pd, 1); 
    358358        if(storage->format != NULL) {