Example #1
0
void RegisterWineDataHandler( void )
{
    ComponentRoutineUPP MyComponentRoutineUPP;

    MyComponentRoutineUPP = NewComponentRoutineUPP(&myComponentRoutineProc);
    RegisterComponent( &myType , MyComponentRoutineUPP, 0, NULL, NULL, NULL);
}
void DelegateOnly_CodecRegister(void)
{
	ComponentDescription td;

	ComponentRoutineUPP componentEntryPoint = NewComponentRoutineUPP((ComponentRoutineProcPtr)DelegateOnly_ImageCodecComponentDispatch);

	td.componentType = decompressorComponentType;
	td.componentSubType = FOUR_CHAR_CODE('DelO');		// remember to change the subType and manufacturer
	td.componentManufacturer = FOUR_CHAR_CODE('DTS ');  // for your application - Apple reserves all lowercase types
	td.componentFlags = codecInfoDoes32;
	td.componentFlagsMask = 0;

	RegisterComponent(&td, componentEntryPoint, 0, NULL, NULL, NULL);
}
void MyQTImage2MovDirectRegister(void)
{   ComponentDescription	theComponentDescription;
    Handle					nameHdl;
#if !TARGET_API_MAC_CARBON
    ComponentRoutineUPP componentEntryPoint = NewComponentRoutineProc(QTImage2MovImportDirect_ComponentDispatch);
#else
    ComponentRoutineUPP componentEntryPoint = NewComponentRoutineUPP((ComponentRoutineProcPtr)QTImage2MovImportDirect_ComponentDispatch);
#endif

    PtrToHand("\pQI2MSource", &nameHdl, 8);
    theComponentDescription.componentType = MovieImportType;
    theComponentDescription.componentSubType = FOUR_CHAR_CODE('VOD ');
    theComponentDescription.componentManufacturer = kAppleManufacturer;
    theComponentDescription.componentFlags = canMovieImportFiles | canMovieImportInPlace | hasMovieImportMIMEList | canMovieImportDataReferences;
    theComponentDescription.componentFlagsMask = 0;

    RegisterComponent(&theComponentDescription, componentEntryPoint, 0, nameHdl, 0, 0);
}
Example #4
0
VolumeCatcherImpl::VolumeCatcherImpl()
{
	mVolume = 1.0;	// default to full volume
	mPan = 0.0;		// and center pan
		
	ComponentDescription desc;
	desc.componentType = kAudioUnitType_Output;
	desc.componentSubType = kAudioUnitSubType_DefaultOutput;
	desc.componentManufacturer = kAudioUnitManufacturer_Apple;
	desc.componentFlags = 0;
	desc.componentFlagsMask = 0;
	
	// Find the original default output component
	mOriginalDefaultOutput = FindNextComponent(NULL, &desc);

	// Register our own output component with the same parameters
	mVolumeAdjuster = RegisterComponent(&desc, NewComponentRoutineUPP(volume_catcher_component_entry), 0, NULL, NULL, NULL);

	// Capture the original component, so we always get found instead.
	CaptureComponent(mOriginalDefaultOutput, mVolumeAdjuster);

}