TuttleOFX
1
|
Class used to set the clip preferences of the effect. More...
#include <ofxsImageEffect.h>
Public Member Functions | |
ClipPreferencesSetter (OFX::PropertySet props, const StringStringMap &depthPropNames, const StringStringMap &componentPropNames, const StringStringMap &PARPropNames) | |
bool | didSomething (void) const |
void | setClipComponents (Clip &clip, EPixelComponent comps) |
, force the host to set a clip's mapped component type to be comps. | |
void | setClipBitDepth (Clip &clip, EBitDepth bitDepth) |
, force the host to set a clip's mapped bit depth be bitDepth | |
void | setPixelAspectRatio (Clip &clip, double PAR) |
, force the host to set a clip's mapped Pixel Aspect Ratio to be PAR | |
void | setOutputFrameRate (double v) |
Allows an effect to change the output frame rate. | |
void | setOutputPremultiplication (EPreMultiplication v) |
Set the premultiplication state of the output clip. | |
void | setOutputHasContinousSamples (bool v) |
Set whether the effect can be continously sampled. | |
void | setOutputFrameVarying (bool v) |
Sets whether the effect will produce different images in all frames, even if the no params or input images are varying (eg: a noise generator). | |
void | setOutputFielding (EField v) |
Sets the output fielding. | |
Data Fields | |
ImageEffectHostDescription * | _imageEffectHostDescription |
Private Types | |
typedef std::map< std::string, std::string > | StringStringMap |
Private Member Functions | |
const std::string & | extractValueForName (const StringStringMap &m, const std::string &name) |
Private Attributes | |
OFX::PropertySet | outArgs_ |
bool | doneSomething_ |
const StringStringMap & | clipDepthPropNames_ |
const StringStringMap & | clipComponentPropNames_ |
const StringStringMap & | clipPARPropNames_ |
Class used to set the clip preferences of the effect.
Definition at line 825 of file ofxsImageEffect.h.
typedef std::map<std::string, std::string> OFX::ClipPreferencesSetter::StringStringMap [private] |
Definition at line 829 of file ofxsImageEffect.h.
OFX::ClipPreferencesSetter::ClipPreferencesSetter | ( | OFX::PropertySet | props, |
const StringStringMap & | depthPropNames, | ||
const StringStringMap & | componentPropNames, | ||
const StringStringMap & | PARPropNames | ||
) | [inline] |
Definition at line 839 of file ofxsImageEffect.h.
References _imageEffectHostDescription, and OFX::getImageEffectHostDescription().
bool OFX::ClipPreferencesSetter::didSomething | ( | void | ) | const [inline] |
Definition at line 852 of file ofxsImageEffect.h.
References doneSomething_.
const std::string & OFX::ClipPreferencesSetter::extractValueForName | ( | const StringStringMap & | m, |
const std::string & | name | ||
) | [private] |
Definition at line 1558 of file ofxsImageEffect.cpp.
Referenced by setClipBitDepth(), setClipComponents(), and setPixelAspectRatio().
, force the host to set a clip's mapped bit depth be bitDepth
Only callable if the OFX::ImageEffectHostDescription::supportsMultipleClipDepths is true.
See the OFX API documentation for the default values of this.
Definition at line 1593 of file ofxsImageEffect.cpp.
References _imageEffectHostDescription, clipDepthPropNames_, doneSomething_, OFX::eBitDepthCustom, OFX::eBitDepthFloat, OFX::eBitDepthNone, OFX::eBitDepthUByte, OFX::eBitDepthUShort, extractValueForName(), OFX::ImageEffectHostDescription::getPixelDepth(), kOfxBitDepthByte, kOfxBitDepthFloat, kOfxBitDepthNone, kOfxBitDepthShort, OFX::mapBitDepthEnumToString(), OFX::Clip::name(), outArgs_, OFX::PropertySet::propSetString(), and OFX::ImageEffectHostDescription::supportsMultipleClipDepths.
Referenced by tuttle::plugin::bitDepth::BitDepthPlugin::getClipPreferences(), tuttle::plugin::GeneratorPlugin::getClipPreferences(), tuttle::plugin::ReaderPlugin::getClipPreferences(), tuttle::plugin::dpx::reader::DPXReaderPlugin::getClipPreferences(), tuttle::plugin::openImageIO::reader::OpenImageIOReaderPlugin::getClipPreferences(), tuttle::plugin::png::reader::PngReaderPlugin::getClipPreferences(), tuttle::plugin::imagemagick::reader::ImageMagickReaderPlugin::getClipPreferences(), tuttle::plugin::jpeg::reader::JpegReaderPlugin::getClipPreferences(), tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::getClipPreferences(), tuttle::plugin::turboJpeg::reader::TurboJpegReaderPlugin::getClipPreferences(), tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences(), and tuttle::plugin::raw::reader::RawReaderPlugin::getClipPreferences().
void OFX::ClipPreferencesSetter::setClipComponents | ( | Clip & | clip, |
EPixelComponent | comps | ||
) |
, force the host to set a clip's mapped component type to be comps.
Only callable on non optional clips in all contexts. Must set comps to be one of the types the effect says it supports on the given clip.
See the OFX API documentation for the default values of this.
Definition at line 1568 of file ofxsImageEffect.cpp.
References clipComponentPropNames_, doneSomething_, OFX::ePixelComponentAlpha, OFX::ePixelComponentCustom, OFX::ePixelComponentNone, OFX::ePixelComponentRGB, OFX::ePixelComponentRGBA, extractValueForName(), kOfxImageComponentAlpha, kOfxImageComponentNone, kOfxImageComponentRGB, kOfxImageComponentRGBA, OFX::Clip::name(), outArgs_, and OFX::PropertySet::propSetString().
Referenced by tuttle::plugin::GeneratorPlugin::getClipPreferences(), tuttle::plugin::ReaderPlugin::getClipPreferences(), tuttle::plugin::dpx::reader::DPXReaderPlugin::getClipPreferences(), tuttle::plugin::openImageIO::reader::OpenImageIOReaderPlugin::getClipPreferences(), tuttle::plugin::component::ComponentPlugin::getClipPreferences(), tuttle::plugin::jpeg::reader::JpegReaderPlugin::getClipPreferences(), tuttle::plugin::png::reader::PngReaderPlugin::getClipPreferences(), tuttle::plugin::imagemagick::reader::ImageMagickReaderPlugin::getClipPreferences(), tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::getClipPreferences(), tuttle::plugin::turboJpeg::reader::TurboJpegReaderPlugin::getClipPreferences(), tuttle::plugin::localmaxima::LocalMaximaPlugin::getClipPreferences(), tuttle::plugin::exr::reader::EXRReaderPlugin::getClipPreferences(), tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences(), tuttle::plugin::sobel::SobelPlugin::getClipPreferences(), and tuttle::plugin::raw::reader::RawReaderPlugin::getClipPreferences().
void OFX::ClipPreferencesSetter::setOutputFielding | ( | EField | v | ) |
Sets the output fielding.
Default is host dependent, must be one of
Definition at line 1684 of file ofxsImageEffect.cpp.
References doneSomething_, OFX::eFieldBoth, OFX::eFieldLower, OFX::eFieldNone, OFX::eFieldUpper, kOfxImageClipPropFieldOrder, kOfxImageFieldBoth, kOfxImageFieldLower, kOfxImageFieldNone, kOfxImageFieldUpper, outArgs_, and OFX::PropertySet::propSetString().
Referenced by tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), and tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences().
void OFX::ClipPreferencesSetter::setOutputFrameRate | ( | double | v | ) |
Allows an effect to change the output frame rate.
Only callable if OFX::ImageEffectHostDescription::supportsSetableFrameRate is true.
Default is controlled by the host, typically the framerate of the input clips.
Definition at line 1642 of file ofxsImageEffect.cpp.
References _imageEffectHostDescription, doneSomething_, kOfxImageEffectPropFrameRate, outArgs_, OFX::PropertySet::propSetDouble(), and OFX::ImageEffectHostDescription::supportsSetableFrameRate.
Referenced by tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), and tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences().
void OFX::ClipPreferencesSetter::setOutputFrameVarying | ( | bool | v | ) |
Sets whether the effect will produce different images in all frames, even if the no params or input images are varying (eg: a noise generator).
Defaults to false.
Definition at line 1678 of file ofxsImageEffect.cpp.
References doneSomething_, kOfxImageEffectFrameVarying, outArgs_, and OFX::PropertySet::propSetInt().
Referenced by tuttle::plugin::GeneratorPlugin::getClipPreferences(), tuttle::plugin::ReaderPlugin::getClipPreferences(), tuttle::plugin::WriterPlugin::getClipPreferences(), tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), tuttle::plugin::av::writer::AVWriterPlugin::getClipPreferences(), and tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences().
void OFX::ClipPreferencesSetter::setOutputHasContinousSamples | ( | bool | v | ) |
Set whether the effect can be continously sampled.
Defaults to false.
Definition at line 1671 of file ofxsImageEffect.cpp.
References doneSomething_, kOfxImageClipPropContinuousSamples, outArgs_, and OFX::PropertySet::propSetInt().
void OFX::ClipPreferencesSetter::setOutputPremultiplication | ( | EPreMultiplication | v | ) |
Set the premultiplication state of the output clip.
Defaults to the premultiplication state of ???
Definition at line 1653 of file ofxsImageEffect.cpp.
References doneSomething_, OFX::eImageOpaque, OFX::eImagePreMultiplied, OFX::eImageUnPreMultiplied, kOfxImageEffectPropPreMultiplication, kOfxImageOpaque, kOfxImagePreMultiplied, kOfxImageUnPreMultiplied, outArgs_, and OFX::PropertySet::propSetString().
void OFX::ClipPreferencesSetter::setPixelAspectRatio | ( | Clip & | clip, |
double | PAR | ||
) |
, force the host to set a clip's mapped Pixel Aspect Ratio to be PAR
Only callable if the OFX::ImageEffectHostDescription::supportsMultipleClipPARs is true.
Default is up to the host, generally based on the input clips.
Not supported by most host applications.
Definition at line 1630 of file ofxsImageEffect.cpp.
References _imageEffectHostDescription, clipPARPropNames_, doneSomething_, extractValueForName(), OFX::Clip::name(), outArgs_, OFX::PropertySet::propSetDouble(), and OFX::ImageEffectHostDescription::supportsMultipleClipPARs.
Referenced by tuttle::plugin::GeneratorPlugin::getClipPreferences(), tuttle::plugin::ReaderPlugin::getClipPreferences(), tuttle::plugin::dpx::reader::DPXReaderPlugin::getClipPreferences(), tuttle::plugin::openImageIO::reader::OpenImageIOReaderPlugin::getClipPreferences(), tuttle::plugin::png::reader::PngReaderPlugin::getClipPreferences(), tuttle::plugin::imagemagick::reader::ImageMagickReaderPlugin::getClipPreferences(), tuttle::plugin::jpeg::reader::JpegReaderPlugin::getClipPreferences(), tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::getClipPreferences(), tuttle::plugin::turboJpeg::reader::TurboJpegReaderPlugin::getClipPreferences(), tuttle::plugin::exr::reader::EXRReaderPlugin::getClipPreferences(), tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences(), and tuttle::plugin::raw::reader::RawReaderPlugin::getClipPreferences().
Definition at line 836 of file ofxsImageEffect.h.
Referenced by ClipPreferencesSetter(), setClipBitDepth(), setOutputFrameRate(), and setPixelAspectRatio().
const StringStringMap& OFX::ClipPreferencesSetter::clipComponentPropNames_ [private] |
Definition at line 831 of file ofxsImageEffect.h.
Referenced by setClipComponents().
const StringStringMap& OFX::ClipPreferencesSetter::clipDepthPropNames_ [private] |
Definition at line 830 of file ofxsImageEffect.h.
Referenced by setClipBitDepth().
const StringStringMap& OFX::ClipPreferencesSetter::clipPARPropNames_ [private] |
Definition at line 832 of file ofxsImageEffect.h.
Referenced by setPixelAspectRatio().
bool OFX::ClipPreferencesSetter::doneSomething_ [private] |
Definition at line 828 of file ofxsImageEffect.h.
Referenced by didSomething(), setClipBitDepth(), setClipComponents(), setOutputFielding(), setOutputFrameRate(), setOutputFrameVarying(), setOutputHasContinousSamples(), setOutputPremultiplication(), and setPixelAspectRatio().
Definition at line 827 of file ofxsImageEffect.h.
Referenced by setClipBitDepth(), setClipComponents(), setOutputFielding(), setOutputFrameRate(), setOutputFrameVarying(), setOutputHasContinousSamples(), setOutputPremultiplication(), and setPixelAspectRatio().