TuttleOFX
1
|
AudioVideo plugin. More...
#include <AVReaderPlugin.hpp>
Public Member Functions | |
AVReaderPlugin (OfxImageEffectHandle handle) | |
bool | ensureVideoIsOpen () |
Open the video if not already opened. | |
AVReaderParams | getProcessParams () const |
void | updateVisibleTools () |
void | changedParam (const OFX::InstanceChangedArgs &args, const std::string ¶mName) |
called when a param has just had its value changed | |
bool | getRegionOfDefinition (const OFX::RegionOfDefinitionArguments &args, OfxRectD &rod) |
The get RoD action. | |
void | getClipPreferences (OFX::ClipPreferencesSetter &clipPreferences) |
get the clip preferences | |
bool | getTimeDomain (OfxRangeD &range) |
what is the time domain of this effect, valid only in the general context | |
void | beginSequenceRender (const OFX::BeginSequenceRenderArguments &args) |
client begin sequence render function | |
void | render (const OFX::RenderArguments &args) |
The overridden render function. | |
void | endSequenceRender (const OFX::EndSequenceRenderArguments &args) |
client end sequence render function | |
Data Fields | |
OFX::Clip * | _clipDst |
Destination image clip. | |
OFX::StringParam * | _paramFilepath |
video filepath | |
OFX::BooleanParam * | _paramUseCustomSAR |
Keep sample aspect ratio. | |
OFX::DoubleParam * | _paramCustomSAR |
Custom SAR to use. | |
bool | _errorInFile |
bool | _initReader |
LibAVVideoReader | _reader |
AudioVideo plugin.
Definition at line 25 of file AVReaderPlugin.hpp.
tuttle::plugin::av::reader::AVReaderPlugin::AVReaderPlugin | ( | OfxImageEffectHandle | handle | ) |
Definition at line 18 of file AVReaderPlugin.cpp.
References _clipDst, tuttle::plugin::ReaderPlugin::_paramBitDepth, _paramCustomSAR, _paramFilepath, _paramUseCustomSAR, OFX::ParamSet::fetchBooleanParam(), OFX::ParamSet::fetchChoiceParam(), OFX::ImageEffect::fetchClip(), OFX::ParamSet::fetchDoubleParam(), OFX::ParamSet::fetchStringParam(), kOfxImageEffectOutputClipName, tuttle::plugin::av::reader::kParamCustomSAR, tuttle::plugin::av::reader::kParamUseCustomSAR, tuttle::plugin::kTuttlePluginBitDepth, tuttle::plugin::kTuttlePluginFilename, OFX::ImageEffect::setSequentialRender(), and updateVisibleTools().
void tuttle::plugin::av::reader::AVReaderPlugin::beginSequenceRender | ( | const OFX::BeginSequenceRenderArguments & | args | ) | [virtual] |
client begin sequence render function
Reimplemented from OFX::ImageEffect.
Definition at line 160 of file AVReaderPlugin.cpp.
References ensureVideoIsOpen().
void tuttle::plugin::av::reader::AVReaderPlugin::changedParam | ( | const OFX::InstanceChangedArgs & | args, |
const std::string & | paramName | ||
) | [virtual] |
called when a param has just had its value changed
Reimplemented from tuttle::plugin::ReaderPlugin.
Definition at line 67 of file AVReaderPlugin.cpp.
References _errorInFile, _paramCustomSAR, _paramUseCustomSAR, OFX::BooleanParam::getValue(), tuttle::plugin::av::reader::kParamCustomSAR, tuttle::plugin::av::reader::kParamUseCustomSAR, tuttle::plugin::kTuttlePluginFilename, OFX::Param::setIsSecretAndDisabled(), and OFX::BooleanParam::setValue().
Referenced by updateVisibleTools().
void tuttle::plugin::av::reader::AVReaderPlugin::endSequenceRender | ( | const OFX::EndSequenceRenderArguments & | args | ) | [virtual] |
client end sequence render function
client end sequence render function, this is one of the few that must be set
Reimplemented from OFX::ImageEffect.
Definition at line 201 of file AVReaderPlugin.cpp.
References _reader, and tuttle::plugin::av::LibAVVideoReader::close().
bool tuttle::plugin::av::reader::AVReaderPlugin::ensureVideoIsOpen | ( | ) |
Open the video if not already opened.
Definition at line 54 of file AVReaderPlugin.cpp.
References _errorInFile, _paramFilepath, _reader, OFX::StringParam::getValue(), tuttle::plugin::av::LibAVVideoReader::isOpen(), and tuttle::plugin::av::LibAVVideoReader::open().
Referenced by beginSequenceRender(), getClipPreferences(), getRegionOfDefinition(), getTimeDomain(), and render().
void tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences | ( | OFX::ClipPreferencesSetter & | clipPreferences | ) | [virtual] |
get the clip preferences
Reimplemented from tuttle::plugin::ReaderPlugin.
Definition at line 92 of file AVReaderPlugin.cpp.
References _clipDst, _paramCustomSAR, _paramUseCustomSAR, _reader, tuttle::plugin::av::LibAVVideoReader::aspectRatio(), OFX::eBitDepthUByte, OFX::eFieldLower, OFX::eFieldNone, OFX::eFieldUpper, tuttle::plugin::av::eInterlacmentLower, tuttle::plugin::av::eInterlacmentNone, tuttle::plugin::av::eInterlacmentUpper, ensureVideoIsOpen(), tuttle::plugin::eParamReaderBitDepthAuto, OFX::ePixelComponentRGBA, tuttle::plugin::av::LibAVVideoReader::fps(), tuttle::plugin::ReaderPlugin::getExplicitBitDepthConversion(), OFX::DoubleParam::getValue(), OFX::BooleanParam::getValue(), tuttle::plugin::av::LibAVVideoReader::interlacment(), OFX::ClipPreferencesSetter::setClipBitDepth(), OFX::ClipPreferencesSetter::setClipComponents(), OFX::ClipPreferencesSetter::setOutputFielding(), OFX::ClipPreferencesSetter::setOutputFrameRate(), OFX::ClipPreferencesSetter::setOutputFrameVarying(), and OFX::ClipPreferencesSetter::setPixelAspectRatio().
AVReaderParams tuttle::plugin::av::reader::AVReaderPlugin::getProcessParams | ( | ) | const |
Definition at line 41 of file AVReaderPlugin.cpp.
References tuttle::plugin::av::reader::AVReaderParams::_filepath, _paramFilepath, and OFX::StringParam::getValue().
bool tuttle::plugin::av::reader::AVReaderPlugin::getRegionOfDefinition | ( | const OFX::RegionOfDefinitionArguments & | args, |
OfxRectD & | rod | ||
) | [virtual] |
The get RoD action.
If the effect wants change the rod from the default value (which is the union of RoD's of all input clips) it should set the rod argument and return true.
This is all in cannonical coordinates.
Implements tuttle::plugin::ReaderPlugin.
Definition at line 145 of file AVReaderPlugin.cpp.
References _paramCustomSAR, _paramUseCustomSAR, _reader, tuttle::plugin::av::LibAVVideoReader::aspectRatio(), ensureVideoIsOpen(), OFX::DoubleParam::getValue(), OFX::BooleanParam::getValue(), tuttle::plugin::av::LibAVVideoReader::height(), tuttle::plugin::av::LibAVVideoReader::width(), OfxRectD::x1, OfxRectD::x2, OfxRectD::y1, and OfxRectD::y2.
bool tuttle::plugin::av::reader::AVReaderPlugin::getTimeDomain | ( | OfxRangeD & | range | ) | [virtual] |
what is the time domain of this effect, valid only in the general context
get the time domain
return true if range was set, otherwise the default (the union of the time domain of all input clips) is used
Reimplemented from tuttle::plugin::ReaderPlugin.
Definition at line 132 of file AVReaderPlugin.cpp.
References _reader, ensureVideoIsOpen(), OfxRangeD::max, OfxRangeD::min, and tuttle::plugin::av::LibAVVideoReader::nbFrames().
void tuttle::plugin::av::reader::AVReaderPlugin::render | ( | const OFX::RenderArguments & | args | ) | [virtual] |
The overridden render function.
[in] | args | Rendering parameters |
Reimplemented from tuttle::plugin::ReaderPlugin.
Definition at line 169 of file AVReaderPlugin.cpp.
References _initReader, _reader, tuttle::plugin::av::eAVParamFormat, tuttle::plugin::av::eAVParamVideo, ensureVideoIsOpen(), and tuttle::plugin::av::AVOptionPlugin< ReaderPlugin >::setParameters().
void tuttle::plugin::av::reader::AVReaderPlugin::updateVisibleTools | ( | ) |
Definition at line 35 of file AVReaderPlugin.cpp.
References changedParam(), tuttle::plugin::av::reader::kParamUseCustomSAR, and OFX::ImageEffect::timeLineGetTime().
Referenced by AVReaderPlugin().
Destination image clip.
Reimplemented from tuttle::plugin::ReaderPlugin.
Definition at line 47 of file AVReaderPlugin.hpp.
Referenced by AVReaderPlugin(), and getClipPreferences().
Definition at line 53 of file AVReaderPlugin.hpp.
Referenced by changedParam(), and ensureVideoIsOpen().
Definition at line 54 of file AVReaderPlugin.hpp.
Referenced by render().
Custom SAR to use.
Definition at line 51 of file AVReaderPlugin.hpp.
Referenced by AVReaderPlugin(), changedParam(), getClipPreferences(), and getRegionOfDefinition().
video filepath
Reimplemented from tuttle::plugin::ReaderPlugin.
Definition at line 49 of file AVReaderPlugin.hpp.
Referenced by AVReaderPlugin(), ensureVideoIsOpen(), and getProcessParams().
Keep sample aspect ratio.
Definition at line 50 of file AVReaderPlugin.hpp.
Referenced by AVReaderPlugin(), changedParam(), getClipPreferences(), and getRegionOfDefinition().
Definition at line 55 of file AVReaderPlugin.hpp.
Referenced by endSequenceRender(), ensureVideoIsOpen(), getClipPreferences(), getRegionOfDefinition(), getTimeDomain(), and render().