本文整理汇总了C++中ofx::ImageEffectDescriptor::getParamDescriptor方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageEffectDescriptor::getParamDescriptor方法的具体用法?C++ ImageEffectDescriptor::getParamDescriptor怎么用?C++ ImageEffectDescriptor::getParamDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::ImageEffectDescriptor
的用法示例。
在下文中一共展示了ImageEffectDescriptor::getParamDescriptor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void Jpeg2000WriterPluginFactory::describeInContext( OFX::ImageEffectDescriptor &desc,
OFX::EContext context )
{
OFX::ClipDescriptor *srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
OFX::ClipDescriptor *dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
describeWriterParamsInContext( desc, context );
OFX::ChoiceParamDescriptor* bitDepth = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginBitDepth ) );
bitDepth->resetOptions();
bitDepth->appendOption( kTuttlePluginBitDepth8 );
bitDepth->appendOption( kTuttlePluginBitDepth12 );
bitDepth->appendOption( kTuttlePluginBitDepth16 );
#ifndef TUTTLE_PRODUCTION
bitDepth->appendOption( kTuttlePluginBitDepth32 );
#endif
bitDepth->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
bitDepth->setDefault( eTuttlePluginBitDepth8 );
OFX::BooleanParamDescriptor* lossless = desc.defineBooleanParam( kParamLossless );
lossless->setLabel( "lossless" );
lossless->setHint("When no cinema profile is selected, set compression to lossless.");
lossless->setDefault( false );
OFX::ChoiceParamDescriptor* cineProfil = desc.defineChoiceParam( kParamCinemaProfil );
cineProfil->appendOption( kParamCinemaProfilNoDigit );
cineProfil->appendOption( kParamCinemaProfil2k24fps );
cineProfil->appendOption( kParamCinemaProfil2k48fps );
cineProfil->appendOption( kParamCinemaProfil4k24fps );
cineProfil->setDefault( 0 );
}
示例2: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void DPXWriterPluginFactory::describeInContext(OFX::ImageEffectDescriptor& desc, OFX::EContext context)
{
OFX::ClipDescriptor* srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
srcClip->addSupportedComponent(OFX::ePixelComponentRGBA);
srcClip->addSupportedComponent(OFX::ePixelComponentRGB);
srcClip->addSupportedComponent(OFX::ePixelComponentAlpha);
srcClip->setSupportsTiles(kSupportTiles);
OFX::ClipDescriptor* dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
dstClip->addSupportedComponent(OFX::ePixelComponentRGBA);
dstClip->addSupportedComponent(OFX::ePixelComponentRGB);
dstClip->addSupportedComponent(OFX::ePixelComponentAlpha);
dstClip->setSupportsTiles(kSupportTiles);
// Controls
describeWriterParamsInContext(desc, context);
OFX::ChoiceParamDescriptor* bitDepth =
static_cast<OFX::ChoiceParamDescriptor*>(desc.getParamDescriptor(kTuttlePluginBitDepth));
bitDepth->resetOptions();
bitDepth->appendOption(kTuttlePluginBitDepth8);
bitDepth->appendOption(kTuttlePluginBitDepth10);
bitDepth->appendOption(kTuttlePluginBitDepth12);
bitDepth->appendOption(kTuttlePluginBitDepth16);
bitDepth->appendOption(kTuttlePluginBitDepth32);
bitDepth->appendOption(kTuttlePluginBitDepth64);
bitDepth->setDefault(eTuttlePluginBitDepth10);
OFX::ChoiceParamDescriptor* descriptor =
static_cast<OFX::ChoiceParamDescriptor*>(desc.getParamDescriptor(kTuttlePluginChannel));
descriptor->resetOptions();
descriptor->appendOption(kParamDescriptorUserDefinedDescriptor);
descriptor->appendOption(kParamDescriptorRed);
descriptor->appendOption(kParamDescriptorGreen);
descriptor->appendOption(kParamDescriptorBlue);
descriptor->appendOption(kParamDescriptorAlpha);
descriptor->appendOption(kParamDescriptorLuma);
descriptor->appendOption(kParamDescriptorColorDifference);
descriptor->appendOption(kParamDescriptorDepth);
descriptor->appendOption(kParamDescriptorCompositeVideo);
descriptor->appendOption(kParamDescriptorRGB);
descriptor->appendOption(kParamDescriptorRGBA);
descriptor->appendOption(kParamDescriptorABGR);
descriptor->appendOption(kParamDescriptorCbYCrY);
descriptor->appendOption(kParamDescriptorCbYACrYA);
descriptor->appendOption(kParamDescriptorCbYCr);
descriptor->appendOption(kParamDescriptorCbYCrA);
descriptor->appendOption(kParamDescriptorUserDefined2Comp);
descriptor->appendOption(kParamDescriptorUserDefined3Comp);
descriptor->appendOption(kParamDescriptorUserDefined4Comp);
descriptor->appendOption(kParamDescriptorUserDefined5Comp);
descriptor->appendOption(kParamDescriptorUserDefined6Comp);
descriptor->appendOption(kParamDescriptorUserDefined7Comp);
descriptor->appendOption(kParamDescriptorUserDefined8Comp);
descriptor->appendOption(kParamDescriptorUndefinedDescriptor);
descriptor->appendOption(kParamDescriptorAuto);
descriptor->setDefault(9); // rgb
OFX::ChoiceParamDescriptor* transfer = desc.defineChoiceParam(kParamTransfer);
transfer->setLabel(kParamTransferLabel);
transfer->setHint(kParamTransferHint);
transfer->appendOption(kParamCharacteristicUserDefined);
transfer->appendOption(kParamCharacteristicPrintingDensity);
transfer->appendOption(kParamCharacteristicLinear);
transfer->appendOption(kParamCharacteristicLogarithmic);
transfer->appendOption(kParamCharacteristicUnspecifiedVideo);
transfer->appendOption(kParamCharacteristicSMPTE274M);
transfer->appendOption(kParamCharacteristicITUR709);
transfer->appendOption(kParamCharacteristicITUR601);
transfer->appendOption(kParamCharacteristicITUR602);
transfer->appendOption(kParamCharacteristicNTSCCompositeVideo);
transfer->appendOption(kParamCharacteristicPALCompositeVideo);
transfer->appendOption(kParamCharacteristicZLinear);
transfer->appendOption(kParamCharacteristicZHomogeneous);
transfer->appendOption(kParamCharacteristicUndefinedCharacteristic);
transfer->setDefault(2); // Linear
OFX::ChoiceParamDescriptor* colorimetric = desc.defineChoiceParam(kParamColorimetric);
colorimetric->setLabel(kParamColorimetricLabel);
colorimetric->setHint(kParamColorimetricHint);
colorimetric->appendOption(kParamCharacteristicUserDefined);
colorimetric->appendOption(kParamCharacteristicPrintingDensity);
colorimetric->appendOption(kParamCharacteristicLinear);
colorimetric->appendOption(kParamCharacteristicLogarithmic);
colorimetric->appendOption(kParamCharacteristicUnspecifiedVideo);
colorimetric->appendOption(kParamCharacteristicSMPTE274M);
colorimetric->appendOption(kParamCharacteristicITUR709);
colorimetric->appendOption(kParamCharacteristicITUR601);
colorimetric->appendOption(kParamCharacteristicITUR602);
colorimetric->appendOption(kParamCharacteristicNTSCCompositeVideo);
colorimetric->appendOption(kParamCharacteristicPALCompositeVideo);
colorimetric->appendOption(kParamCharacteristicZLinear);
colorimetric->appendOption(kParamCharacteristicZHomogeneous);
colorimetric->appendOption(kParamCharacteristicUndefinedCharacteristic);
//.........这里部分代码省略.........
示例3: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void TurboJpegWriterPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
// Controls
describeWriterParamsInContext( desc, context );
OFX::ChoiceParamDescriptor* channel = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginChannel ) );
channel->resetOptions();
channel->appendOption( kTuttlePluginChannelRGB );
channel->setDefault( 0 );
channel->setEnabled( false );
OFX::ChoiceParamDescriptor* bitDepth = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginBitDepth ) );
bitDepth->resetOptions();
bitDepth->appendOption( kTuttlePluginBitDepth8 );
bitDepth->setDefault( eTuttlePluginBitDepth8 );
bitDepth->setEnabled( false );
OFX::BooleanParamDescriptor* premult = static_cast<OFX::BooleanParamDescriptor*>( desc.getParamDescriptor( kParamPremultiplied ) );
premult->setDefault( true );
OFX::IntParamDescriptor* quality = desc.defineIntParam( kParamQuality );
quality->setLabel( "Quality" );
quality->setRange( 0, 100 );
quality->setDisplayRange( 0, 100 );
quality->setDefault( 80 );
OFX::ChoiceParamDescriptor* subsampling = desc.defineChoiceParam( kParamSubsampling );
subsampling->setLabel( kParamSubsamplingLabel );
subsampling->setHint( kParamSubsamplingHint );
subsampling->appendOption( kTurboJpegSubsampling444 );
subsampling->appendOption( kTurboJpegSubsampling422 );
subsampling->appendOption( kTurboJpegSubsampling420 );
subsampling->appendOption( kTurboJpegSubsamplingGray );
subsampling->appendOption( kTurboJpegSubsampling440 );
subsampling->setDefault( eTurboJpegSubsampling420 );
OFX::ChoiceParamDescriptor* optimization = desc.defineChoiceParam( kParamOptimization );
optimization->setLabel( kParamOptimizationLabel );
optimization->setHint( kParamOptimizationHint );
optimization->appendOption( kTurboJpegOptimizationNone );
optimization->appendOption( kTurboJpegOptimizationMMX );
optimization->appendOption( kTurboJpegOptimizationSSE );
optimization->appendOption( kTurboJpegOptimizationSSE2 );
optimization->appendOption( kTurboJpegOptimizationSSE3 );
optimization->setDefault( eTurboJpegOptimizationSSE3 );
}