/****************************************************************************** * uiSetup ******************************************************************************/ static UI_Handle uiSetup(Args *argsp) { UI_Attrs uiAttrs; UI_Handle hUI; /* Create the user interface */ uiAttrs.osd = argsp->osd; uiAttrs.videoStd = argsp->videoStd; uiAttrs.displayOutput = argsp->displayOutput; hUI = UI_create(&uiAttrs); if (hUI == NULL) { ERR("Failed to create UI\n"); return NULL; } /* Initialize values */ UI_updateValue(hUI, UI_Value_DemoName, "Encode"); UI_updateValue(hUI, UI_Value_DisplayType, argsp->videoStdString); if (argsp->videoEncoder) { UI_updateValue(hUI, UI_Value_VideoCodec, argsp->videoEncoder->uiString); } else { UI_updateValue(hUI, UI_Value_VideoCodec, "N/A"); } if (argsp->speechEncoder) { UI_updateValue(hUI, UI_Value_SoundCodec,argsp->speechEncoder->uiString); } else { UI_updateValue(hUI, UI_Value_SoundCodec, "N/A"); } UI_updateValue(hUI, UI_Value_ImageResolution, "N/A"); UI_updateValue(hUI, UI_Value_SoundFrequency, "N/A"); /* Initialize the user interface */ UI_init(hUI); return hUI; }
bool DTV_Entry() { QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK")); UI_init_styleSheet(); QString* pStyleSheet = UI_styleSheet_get(UI_STYLESHEET_COMMON); if (pStyleSheet) { g_qAPP->setStyleSheet(*pStyleSheet); } UI_init_pos(); bool rtn = UI_create(); if(!rtn) { qDebug("create MenuRoot failed"); return FALSE; } UI_menu_entry(UI_ID_ROOT); return TRUE; }