Esempio n. 1
0
CCamera::CCamera(QObject *parent) : QObject(parent)
{
    if(!parent)
        LOG_MODEL_ERROR("Video", "CCaptureVideoFrame::CCaptureVideoFrame parent is null");

    CFrmVideo* pFrmVideo = (CFrmVideo*)parent;
    if(pFrmVideo)
        m_CaptureFrameProcess.moveToThread(pFrmVideo->GetVideoThread());

    m_pCamera = NULL;

    SetDefaultCamera();

    bool check = true;
    check = connect(&m_CaptureVideoFrame,
                    SIGNAL(sigRawCaptureFrame(const QVideoFrame&)),
                    &m_CaptureFrameProcess,
                    SLOT(slotCaptureFrame(const QVideoFrame&)));
    Q_ASSERT(check);

    check = connect(&m_CaptureFrameProcess,
                    SIGNAL(sigCaptureFrame(const QVideoFrame&)),
                    this,
                    SIGNAL(sigCaptureFrame(const QVideoFrame&)));
    Q_ASSERT(check);

    //捕获的帧转换成了YUV4:2:0格式  
    check = connect(&m_CaptureFrameProcess,
                    SIGNAL(sigConvertedToYUYVFrame(const QXmppVideoFrame&)),
                    this,
                    SIGNAL(sigConvertedToYUYVFrame(const QXmppVideoFrame&)));
    Q_ASSERT(check);
}
Esempio n. 2
0
int TestScene::InitializeScene()
{
	m_spCamera = new sunCamera;
	assert(m_spCamera);

	m_spCamera->SetName(L"DefaultCamera");
	AppendScene( SmartPointerCast(sunNode, m_spCamera) );
	SetDefaultCamera(m_spCamera);


	m_pGrid = new Grid3D;
	assert(m_pGrid);
	m_pGrid->SetName(L"Grid");
	m_pGrid->CreateNewGrid();
	AppendScene( m_pGrid );

	//m_pTriangle = new Triangle;
	//assert(m_pTriangle);
	//m_pTriangle->CreateTriangle();
	//AppendScene( m_pTriangle);

	sunParserXMLPtr spParserXML = new sunParserXML;
		
	spParserXML->Load(L"boxbody_ani.xml");

	AppendScene( SmartPointerCast(sunNode, spParserXML->GetLoadedEntity()) );

	spParserXML->Destory();
	spParserXML = NULL;
	return true;

}