Exemplo n.º 1
0
void FFMpegReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
	clipPreferences.setOutputFrameVarying( true );
	clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentRGBA );
	clipPreferences.setClipBitDepth( *_clipDst, OFX::eBitDepthUByte ); /// @todo tuttle: some video format may need other bit depth (how we can detect this ?)

	if( !ensureVideoIsOpen() )
		return;

	// options depending on input file
	clipPreferences.setPixelAspectRatio( *_clipDst, _reader.aspectRatio() );
	clipPreferences.setOutputFrameRate( _reader.fps() );

	// Setup fielding
	switch( _reader.interlacment() )
	{
		case  eInterlacmentNone:
		{
			clipPreferences.setOutputFielding( OFX::eFieldNone );
			break;
		}
		case  eInterlacmentUpper:
		{
			clipPreferences.setOutputFielding( OFX::eFieldUpper );
			break;
		}
		case  eInterlacmentLower:
		{
			clipPreferences.setOutputFielding( OFX::eFieldLower );
			break;
		}
	}
}
Exemplo n.º 2
0
void InputBufferPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
	OfxRangeD range;
	_paramTimeDomain->getValue( range.min, range.max );
	InputBufferProcessParams params = getProcessParams( range.min );
	
	clipPreferences.setOutputFrameVarying( params._mode == eParamInputModeCallbackPointer );
	clipPreferences.setClipComponents( *_clipDst, params._pixelComponents );
	clipPreferences.setClipBitDepth( *_clipDst, params._bitDepth );
	clipPreferences.setPixelAspectRatio( *_clipDst, params._pixelAspectRatio );
	clipPreferences.setOutputFrameRate( params._framerate );
	clipPreferences.setOutputFielding( params._field );
}