Beispiel #1
0
// Init
bool v4l2Camera::init()
{
	// locate the /dev/event* path for this device
	mFD = open(mDevicePath.c_str(), O_RDWR | O_NONBLOCK, 0 );

	if( mFD < 0 )
	{
		printf( "v4l2 -- failed to open %s\n", mDevicePath.c_str());
		return false;
	}

	// initialize
	if( !initCaps() )
		return false;

	if( !initFormats() )
		return false;

	if( !initStream() )
		return false;

	return true;
}
Beispiel #2
0
Highlighter::Highlighter(QTextDocument *parent)
    : TextEditor::SyntaxHighlighter(parent)
{
    if (m_formats.empty())
        initFormats(m_formats);
}
void CfgExternalToolModel::init() {
    initTypes();
    initFormats();
}