// Copy basic properties between VideoStream void CopyGeneralProperties( const VideoStream& rSource, VideoStream& rTarget ) { rTarget.setVideoMode( rSource.getVideoMode() ); // assign basic properties rTarget.setProperty( ONI_STREAM_PROPERTY_VERTICAL_FOV, rSource.getVerticalFieldOfView() ); rTarget.setProperty( ONI_STREAM_PROPERTY_HORIZONTAL_FOV, rSource.getHorizontalFieldOfView() ); rTarget.setProperty( ONI_STREAM_PROPERTY_MIRRORING, rSource.getMirroringEnabled() ); // assign dpeth only properties rTarget.setProperty( ONI_STREAM_PROPERTY_MIN_VALUE, rSource.getMinPixelValue() ); rTarget.setProperty( ONI_STREAM_PROPERTY_MAX_VALUE, rSource.getMaxPixelValue() ); }
void WriteProperties( VideoStream& rStream ) { for_each( vProperties.begin(), vProperties.end(), [&rStream]( CProperty& rProp ){ int iSize = rProp.vData.size(); if( rStream.setProperty( rProp.iIdx, rProp.vData.data(), iSize ) != STATUS_OK ) { cerr << "Property " << rProp.sName << " write fail" << endl; } } ); }