void View::init() { // All contributors to the same view must share the same Deflect ID for // streaming to the same target. if (!getenv("DEFLECT_ID") && getSAttribute(View::SATTR_DEFLECT_ID).empty()) { setSAttribute(View::SATTR_DEFLECT_ID, getName().empty() ? "View " + getID().getShortString() : getName()); } }
void Channel::output( std::ostream& os ) const { bool attrPrinted = false; for( IAttribute i = static_cast<IAttribute>( 0 ); i < IATTR_LAST; i = static_cast<IAttribute>( static_cast<uint32_t>(i)+1 )) { const int value = getIAttribute( i ); if( value == Global::instance()->getChannelIAttribute( i )) continue; if( !attrPrinted ) { os << std::endl << "attributes" << std::endl << "{" << std::endl << lunchbox::indent; attrPrinted = true; } os << ( i==IATTR_HINT_STATISTICS ? "hint_statistics " : i==IATTR_HINT_SENDTOKEN ? "hint_sendtoken " : "ERROR " ) << static_cast< fabric::IAttribute >( value ) << std::endl; } for( SAttribute i = static_cast<SAttribute>( 0 ); i < SATTR_LAST; i = static_cast<SAttribute>( static_cast<uint32_t>(i)+1 )) { const std::string& value = getSAttribute( i ); if( value == Global::instance()->getChannelSAttribute( i )) continue; if( !attrPrinted ) { os << std::endl << "attributes" << std::endl << "{" << std::endl << lunchbox::indent; attrPrinted = true; } os << ( i == SATTR_DUMP_IMAGE ? "dump_image " : "ERROR " ) << "\"" << value << "\"" << std::endl; } if( attrPrinted ) os << lunchbox::exdent << "}" << std::endl << std::endl; }
View::View( Layout* parent ) : Super( parent ) , _private( 0 ) { const Global* global = Global::instance(); for( unsigned i = 0; i < SATTR_ALL; ++i ) { const SAttribute attr = static_cast< SAttribute >( i ); setSAttribute( attr, global->getViewSAttribute( attr )); } // All processes must share a common, unique pixelstream name if( getSAttribute( View::SATTR_PIXELSTREAM_NAME ).empty( )) { const std::string name = "Equalizer_" + lunchbox::make_UUID().getShortString(); setSAttribute( View::SATTR_PIXELSTREAM_NAME, name); } }