Changeset 819
- Timestamp:
- 02/29/08 13:44:10 (9 months ago)
- Files:
-
- trunk/FFissionCodec/FFissionCodec.cpp (modified) (1 diff)
- trunk/FFusionCodec.c (modified) (16 diffs)
- trunk/VobSubCodec.c (modified) (1 diff)
- trunk/ff_MovieImport.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/FFissionCodec/FFissionCodec.cpp
r525 r819 25 25 #include "FFissionCodec.h" 26 26 27 extern "C" void init Lib();27 extern "C" void init_FFmpeg(); 28 28 29 29 FFissionCodec::FFissionCodec(UInt32 inInputBufferByteSize) : ACSimpleCodec(inInputBufferByteSize) 30 30 { 31 init Lib();31 init_FFmpeg(); 32 32 33 33 avContext = avcodec_alloc_context(); trunk/FFusionCodec.c
r816 r819 143 143 void ChangeHintText(int value, ControlRef staticTextField); 144 144 145 extern void init Lib();145 extern void init_FFmpeg(); 146 146 extern CFMutableStringRef GetHomeDirectory(); 147 147 148 #define FF Codecprintf(x...) if (glob->fileLog) Codecprintf(glob->fileLog, x);148 #define FFusionDebugPrint(x...) if (glob->fileLog) Codecprintf(glob->fileLog, x); 149 149 #define not(x) ((x) ? "" : "not ") 150 150 … … 305 305 } 306 306 307 FF Codecprintf("%p opened for '%s'\n", glob, FourCCString(glob->componentType));307 FFusionDebugPrint("%p opened for '%s'\n", glob, FourCCString(glob->componentType)); 308 308 return err; 309 309 } … … 315 315 pascal ComponentResult FFusionCodecClose(FFusionGlobals glob, ComponentInstance self) 316 316 { 317 FF Codecprintf("%p closed.\n", glob);317 FFusionDebugPrint("%p closed.\n", glob); 318 318 319 319 // Make sure to close the base component and deallocate our storage … … 470 470 // to the fourCC if it has not been done before 471 471 472 FF Codecprintf("%p Preflight called.\n", glob);472 FFusionDebugPrint("%p Preflight called.\n", glob); 473 473 474 474 if (!glob->avCodec) … … 476 476 enum CodecID codecID = CODEC_ID_MPEG4; 477 477 478 init Lib();478 init_FFmpeg(); 479 479 initFFusionParsers(); 480 480 … … 690 690 } 691 691 692 FF Codecprintf("%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); 693 693 694 694 if(glob->avContext->extradata_size != 0 && glob->begin.parser != NULL) … … 792 792 capabilities->flags |= codecCanAsync | codecCanAsyncWhen; 793 793 794 FF Codecprintf("%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); 795 795 796 796 return err; … … 858 858 myDrp->buffer = NULL; 859 859 860 FF Codecprintf("%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); 861 861 862 862 if (!glob->avContext) { … … 1023 1023 myDrp->GOPStartFrameNumber = glob->begin.lastIFrame; 1024 1024 1025 FF Codecprintf("%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)); 1026 1026 return noErr; 1027 1027 } … … 1029 1029 static OSErr PrereqDecompress(FFusionGlobals glob, FrameData *prereq, AVCodecContext *context, ICMDataProcRecordPtr dataProc, long width, long height, AVFrame *picture) 1030 1030 { 1031 FF Codecprintf("%p prereq-decompressing frame #%d.\n", glob, prereq->frameNumber);1031 FFusionDebugPrint("%p prereq-decompressing frame #%d.\n", glob, prereq->frameNumber); 1032 1032 1033 1033 FrameData *preprereq = FrameDataCheckPrereq(prereq); … … 1050 1050 FFusionDecompressRecord *myDrp = (FFusionDecompressRecord *)drp->userDecompressRecord; 1051 1051 1052 FF Codecprintf("%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); 1053 1053 1054 1054 avcodec_get_frame_defaults(&tempFrame); … … 1059 1059 { 1060 1060 /* Skipped some frames in here */ 1061 FF Codecprintf("%p - frames skipped.\n", glob);1061 FFusionDebugPrint("%p - frames skipped.\n", glob); 1062 1062 if(drp->frameType == kCodecFrameTypeKey || myDrp->GOPStartFrameNumber > glob->decode.lastFrame || myDrp->frameNumber < glob->decode.lastFrame) 1063 1063 { 1064 1064 /* 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) * 1065 1065 * then we are in a whole new GOP */ 1066 FF Codecprintf("%p - in a new GOP.\n", glob);1066 FFusionDebugPrint("%p - in a new GOP.\n", glob); 1067 1067 avcodec_flush_buffers(glob->avContext); 1068 1068 } … … 1145 1145 FFusionDataMarkRead(&(glob->data), frameData); 1146 1146 1147 FF Codecprintf("%p DecodeBand decoded #%d.\n", glob, glob->decode.lastFrame);1147 FFusionDebugPrint("%p DecodeBand decoded #%d.\n", glob, glob->decode.lastFrame); 1148 1148 1149 1149 return err; … … 1178 1178 int i, j; 1179 1179 1180 FF Codecprintf("%p DrawBand #%d. (%sdecoded)\n", glob, myDrp->frameNumber, not(myDrp->decoded));1180 FFusionDebugPrint("%p DrawBand #%d. (%sdecoded)\n", glob, myDrp->frameNumber, not(myDrp->decoded)); 1181 1181 1182 1182 if(!myDrp->decoded) … … 1271 1271 { 1272 1272 FFusionDecompressRecord *myDrp = (FFusionDecompressRecord *)drp->userDecompressRecord; 1273 FF Codecprintf("%p EndBand #%d.\n", glob, myDrp->frameNumber);1273 FFusionDebugPrint("%p EndBand #%d.\n", glob, myDrp->frameNumber); 1274 1274 return noErr; 1275 1275 } … … 1568 1568 long availableData = dataProc ? codecMinimumDataSize : kInfiniteDataSize; 1569 1569 1570 FF Codecprintf("%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); 1571 1571 picture->data[0] = 0; 1572 1572 trunk/VobSubCodec.c
r794 r819 216 216 217 217 if (!glob->avCodec) { 218 init Lib();218 init_FFmpeg(); 219 219 220 220 glob->avCodec = avcodec_find_decoder(CODEC_ID_DVD_SUBTITLE); trunk/ff_MovieImport.c
r806 r819 74 74 av_register_bitstream_filter(&x##_bsf); } 75 75 76 void init Lib()76 void init_FFmpeg() 77 77 { 78 78 /* This one is used because Global variables are initialized ONE time … … 354 354 require_noerr(result,bail); 355 355 356 init Lib();356 init_FFmpeg(); 357 357 storage->format = av_probe_input_format(pd, 1); 358 358 if(storage->format != NULL) {
