static void ClearActiveD2Ds(void) { unsigned int i; LOG_I("%s: Enter.", __func__); for (i = 0; i < ARRAY_SIZE(u8540_d2ds); i++) { u8540_d2ds[i].active = false; } }
static int open_chardev(void) { LOG_I("Enter."); if (chardev_fd >= 0) { LOG_I("Char-dev already open!"); return 0; } chardev_fd = open("/dev/" CG2900_AUDIO_DEVICE_NAME, O_RDWR); if (chardev_fd < 0) { LOG_E("ERROR: Failed to open device (%s)!", strerror(errno)); return -1; } else { return 0; } }
/*!\fn openair0_device new_module (unsigned int id, dev_type_t type) * \brief this function * \param[in] * \param[out] * \return * \note * @ingroup _oai */ static rrh_module_t new_module (unsigned int id) { rrh_module_t rrh_mod; openair0_config_t openair0_cfg; rrh_mod.id=id; rrh_mod.loopback=loopback_flag; rrh_mod.measurements=measurements_flag; /* each module is associated with an ethernet device */ rrh_mod.eth_dev.type=ETH_IF; rrh_mod.eth_dev.func_type=RRH_FUNC; get_ip_address(if_name); openair0_cfg.my_ip=&rrh_ip[0]; openair0_cfg.my_port=rrh_port; /* ethernet device initialization */ if (openair0_dev_init_eth(&rrh_mod.eth_dev, &openair0_cfg)<0){ LOG_E(RRH,"Exiting, cannot initialize ethernet interface.\n"); exit(-1); } /* specify associated RF device */ openair0_device *oai_dv = (openair0_device *)malloc(sizeof(openair0_device)); memset(oai_dv,0, sizeof(openair0_device)); #ifdef EXMIMO rrh_mod.devs=oai_dv; rrh_mod.devs->type=EXMIMO_IF; LOG_I(RRH,"Setting RF device to EXMIMO\n"); #elif OAI_USRP rrh_mod.devs=oai_dv; rrh_mod.devs->type=USRP_IF; LOG_I(RRH,"Setting RF device to USRP\n"); #elif OAI_BLADERF rrh_mod.devs=oai_dv; rrh_mod.devs->type=BLADERF_IF; LOG_I(RRH,"Setting RF device to BLADERF\n"); #else rrh_mod.devs=oai_dv; rrh_mod.devs->type=NONE_IF; LOG_I(RRH,"Setting RF interface to NONE_IF... \n"); #endif return rrh_mod; }
int main() { ScUuid * uuid1 = NULL; ScUuid * uuid2 = NULL; ScUuid * uuid3 = NULL; //char p1[SC_UUID_LEN] = { 0 }; //char p2[SC_UUID_LEN] = { 0 }; //char p3[SC_UUID_LEN] = { 0 }; LOG_OPEN(NULL); uuid1 = ScUuid_New(); ScUuid_GenerateRandom(uuid1); LOG_I("test", "UUID 1: %s", ScUuid_ToString(uuid1, true)); uuid2 = ScUuid_New(); ScUuid_GenerateRandom(uuid2); LOG_I("test", "UUID 2: %s", ScUuid_ToString(uuid2, true)); LOG_I("test", "UUID 2: %s", ScUuid_ToString(uuid2, false)); LOG_I("test", "UUID1 and UUID2 is %s", ScUuid_Equal(uuid1, uuid2) ? "equal" : "not equal"); ScUuid_Clear(uuid1); LOG_I("test", "UUID1 clear, UUID1 : %s", ScUuid_IsNull(uuid1) ? "is NULL" : "is Not NULL"); LOG_I("test", "UUID1 and UUID2 is %s", ScUuid_Equal(uuid1, uuid2) ? "equal" : "not equal"); uuid3 = ScUuid_New(); ScUuid_Copy(uuid3, uuid2); LOG_I("test", "clone from UUID2, UUID3: %s", ScUuid_ToString(uuid3, true)); LOG_I("test", "UUID2 and UUID3 is %s", ScUuid_Equal(uuid2, uuid3) ? "equal" : "not equal"); test_uuid("4A5BFD77-D452-4492-B973-69198200339", false); test_uuid("84949cc5-4701-4a84-895b-354c584a981b", true); test_uuid("84949SC5-4701-4A84-895B-354C584A981B", true); test_uuid("84949cc5-4701-4a84-895b-354c584a981bc", false); test_uuid("84949cc5-4701-4a84-895b-354c584a981", false); test_uuid("84949cc5x4701-4a84-895b-354c584a981b", false); test_uuid("84949cc504701-4a84-895b-354c584a981b", false); test_uuid("84949cc5-470104a84-895b-354c584a981b", false); test_uuid("84949cc5-4701-4a840895b-354c584a981b", false); test_uuid("84949cc5-4701-4a84-895b0354c584a981b", false); test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", false); test_uuid("84949cc5-4701-4a84-895b-354c584a981g", false); ScUuid_Delete(uuid1); ScUuid_Delete(uuid2); ScUuid_Delete(uuid3); LOG_CLOSE(); return 0; }
//------------------------------------------------------------------------------ void MobiCoreDriverDaemon::run( void ) { LOG_I("Daemon starting up..."); LOG_I("Socket interface version is %u.%u", DAEMON_VERSION_MAJOR, DAEMON_VERSION_MINOR); #ifdef MOBICORE_COMPONENT_BUILD_TAG LOG_I("%s", MOBICORE_COMPONENT_BUILD_TAG); #else #warning "MOBICORE_COMPONENT_BUILD_TAG is not defined!" #endif LOG_I("Build timestamp is %s %s", __DATE__, __TIME__); int i; mobiCoreDevice = getDeviceInstance(); LOG_I("Daemon scheduler is %s", enableScheduler? "enabled" : "disabled"); if(!mobiCoreDevice->initDevice( MC_DRV_MOD_DEVNODE_FULLPATH, loadMobicore, mobicoreImage.c_str(), enableScheduler)) { LOG_E("%s: Failed to initialize MobiCore!", __FUNCTION__); return; } mobiCoreDevice->start(); checkMobiCoreVersion(mobiCoreDevice); if (donateRamSize > 0) { // Donate additional RAM to MC LOG_I("Donating %u Kbytes to Mobicore", donateRamSize / 1024); mobiCoreDevice->donateRam(donateRamSize); } // Load device driver if requested if (loadDriver) { loadDeviceDriver(driverPath); } LOG_I("Servers will be created!"); // Start listening for incoming TLC connections servers[0] = new NetlinkServer(this); servers[1] = new Server(this, SOCK_PATH); LOG_I("Servers created!"); // Start all the servers for (i = 0; i < MAX_SERVERS; i++) { servers[i]->start(); } // then wait for them to exit for (i = 0; i < MAX_SERVERS; i++) { servers[i]->join(); } }
static int start_stream(enum cg2900_audio_endpoint_id ep1, enum cg2900_audio_endpoint_id ep2) { LOG_I("Enter."); int error = 0; unsigned int data[2]; unsigned char *buf; size_t len; ssize_t r; if (stream_handle != 0xffffffff) { LOG_I("Tear down old stream."); /* tear down old stream first */ stop_stream(); } len = 4 + sizeof(ep1) + sizeof(ep2); buf = (unsigned char *)malloc(len); if (!buf) { LOG_E("Error: Out of memory!"); return -1; } memset(buf, 0, len); buf[0] = CHAR_DEV_OP_CODE_CONNECT_AND_START_STREAM; memcpy(buf + 4, &ep1, sizeof(ep1)); memcpy(buf + 4 + sizeof(ep1), &ep2, sizeof(ep2)); r = write(chardev_fd, buf, len); free(buf); if (r != (ssize_t)len) { LOG_E("ERROR: Start stream failed (%s)", (r < 0) ? strerror(errno) : "Internal error"); return -1; } r = read(chardev_fd, data, sizeof(data)); if ((unsigned int)r < sizeof(data)) { LOG_E("ERROR: Start stream failed (%s)!", (r < 0) ? strerror(errno) : "Internal error"); error = -1; } else { stream_handle = data[1]; } return error; }
Encode_Status VideoEncoderH263::renderSliceParams(EncodeTask *task) { VAStatus vaStatus = VA_STATUS_SUCCESS; uint32_t sliceHeight; uint32_t sliceHeightInMB; LOG_V("Begin\n\n"); sliceHeight = mComParams.resolution.height; sliceHeight += 15; sliceHeight &= (~15); sliceHeightInMB = sliceHeight / 16; vaStatus = vaCreateBuffer( mVADisplay, mVAContext, VAEncSliceParameterBufferType, sizeof(VAEncSliceParameterBuffer), 1, NULL, &mSliceParamBuf); CHECK_VA_STATUS_RETURN("vaCreateBuffer"); VAEncSliceParameterBuffer *sliceParams; vaStatus = vaMapBuffer(mVADisplay, mSliceParamBuf, (void **)&sliceParams); CHECK_VA_STATUS_RETURN("vaMapBuffer"); // starting MB row number for this slice sliceParams->start_row_number = 0; // slice height measured in MB sliceParams->slice_height = sliceHeightInMB; sliceParams->slice_flags.bits.is_intra = (task->type == FTYPE_I)?1:0; sliceParams->slice_flags.bits.disable_deblocking_filter_idc = 0; LOG_V("======h263 slice params======\n"); LOG_I("start_row_number = %d\n", (int) sliceParams->start_row_number); LOG_I("slice_height_in_mb = %d\n", (int) sliceParams->slice_height); LOG_I("slice.is_intra = %d\n", (int) sliceParams->slice_flags.bits.is_intra); vaStatus = vaUnmapBuffer(mVADisplay, mSliceParamBuf); CHECK_VA_STATUS_RETURN("vaUnmapBuffer"); vaStatus = vaRenderPicture(mVADisplay, mVAContext, &mSliceParamBuf, 1); CHECK_VA_STATUS_RETURN("vaRenderPicture"); LOG_V("end\n"); return ENCODE_SUCCESS; }
char* packet_gen_socket(int src, int dst, int state, int ctime){ int size; char *payload=NULL; set_ctime(ctime); LOG_I(OTG,"SOCKET :: num_nodes_tx:: %d , seed:: %d \n", g_otg->num_nodes, g_otg->seed); LOG_I(OTG,"SOCKET :: NODE_INFO (Source= %d, Destination= %d,State= %d) ctime %d \n", src, dst, state, otg_info->ctime); LOG_I(OTG,"SOCKET :: INFO_SIM (src=%d, dst=%d, state=%d) application=%d, idt dist =%d, pkts dist= %d\n", src, dst, state, g_otg->application_type[src][dst], g_otg->idt_dist[src][dst][state], g_otg->size_dist[src][dst][state]); LOG_I(OTG,"SOCKET :: Transmission info: idt=%d, simulation time=%d \n", otg_info->idt[src][dst], ctime); // do not generate packet for this pair of src, dst : no app type and/or idt are defined if ((g_otg->application_type[src][dst] == 0) && (g_otg->idt_dist[src][dst][0] == 0)){ LOG_I(OTG,"SOCKET :: Do not generate packet for this pair of src=%d, dst =%d: no app type and/or idt are defined\n", src, dst); return 0; } //pre-config for the standalone if (ctime<otg_info->ptime[src][dst][state]) //it happends when the emulation was finished otg_info->ptime[src][dst][state]=ctime; if (ctime==0) otg_info->idt[src][dst]=0; //for the standalone mode: the emulation is run several times, we need to initialise the idt to 0 when ctime=0 //end pre-config if ((otg_info->idt[src][dst]==(ctime-otg_info->ptime[src][dst][state])) || (otg_info->idt[src][dst]==0)) { LOG_I(OTG,"SOCKET :: Time To Transmit (Source= %d, Destination= %d,State= %d) , (IDT= %d ,simu time= %d, previous packet time= %d) \n", src, dst, state ,otg_info->idt[src][dst], ctime, otg_info->ptime[src][dst][state]); otg_info->ptime[src][dst][state]=ctime; otg_info->idt[src][dst]=time_dist(src, dst, state); // update the idt for the next otg_tx } else { LOG_I(OTG,"SOCKET :: It is not the time to transmit (ctime= %d, previous time=%d, packet idt=%d), node( %d,%d) \n", ctime,otg_info->ptime[src][dst][state], otg_info->idt[src][dst], src, dst); return 0; // do not generate the packet, and keep the idt } size=size_dist(src, dst, state); LOG_I(OTG,"SOCKET :: Generate Packet for (Source= %d, Destination= %d,State= %d) , pkt size dist= %d, simu time= %d ,packet size=%d \n", src, dst, state, g_otg->size_dist[src][dst][state], otg_info->ctime, size); if (size>(5* sizeof(int))) size=size-(5* sizeof(int)); else size=(5* sizeof(int))+10; payload=payload_pkts(size); return(payload); }
void rx_loss_rate_bytes(int src, int dst, int application){ if (otg_info->rx_num_pkt[src][dst][application]<otg_info->tx_num_pkt[src][dst][application]) otg_info->rx_loss_rate[src][dst][application]= 1 - ((double)otg_info->rx_num_bytes[src][dst][application]/otg_info->tx_num_bytes[src][dst][application]); else otg_info->rx_loss_rate[src][dst][application]=0; LOG_I(OTG, "loss rate (src=%d, dst=%d, appli %d ):: = %lf(bytes) \n",src, dst, application, otg_info->rx_loss_rate[src][dst][application]); }
OMX_BOOL AlsaSink::isPcmProbeEnabled(OMX_U32 portIdx) { LOG_I("Enter.\n"); if (portIdx > 1) return OMX_FALSE; return mPcmProbeEnabled[portIdx]; }
// ------------------------------------------------------------- mcResult_t minus(uint32_t *num1, uint32_t *num2, uint32_t *result) { mcResult_t ret; LOG_I("Foo perform minus (%d) - (%d)", *num2, *num1); ret = executeCmd(num1, num2, result, CMD_FOO_SUB); if (ret != RET_OK) { LOG_E("Unable to execute CMD_FOO_SUB command: %d", ret); goto exit; } LOG_I("The result is %d", *result); exit: return ret; }
// ------------------------------------------------------------- mcResult_t add(uint32_t *num1, uint32_t *num2, uint32_t *result) { mcResult_t ret; LOG_I("Foo perform addition (%d) + (%d)", *num1, *num2); ret = executeCmd(num1, num2, result, CMD_FOO_ADD); if (ret != RET_OK) { LOG_E("Unable to execute CMD_FOO_ADD command: %d", ret); goto exit; } LOG_I("The result is %d", *result); exit: return ret; }
void testUtf8(){ std::string chutf8 = "这是一个字符串"; auto s = XUtf8::utf8ToUnicode(chutf8); LOG_I(s.c_str()); std::string utf8 = XUtf8::unicodeToUtf8("0x8fd9"); LOG_I(utf8.c_str()); byte buffer[] = {0350, 0377, 0231}; bool isValid = XUtf8::isValidUtf8Buffer(buffer, 3); LOG_I(u8"🌸%d",isValid); for(byte b = 0 ; b< byte_max ; b++){ LOG_I(" %d len %d",b,XUtf8::getUtf8ByteLen(b)); } // // auto pre0 = XUtf8::findPrefixUtf8("你瞧�瞧"); // auto pre1 = XUtf8::findPrefixUtf8("你瞧瞧332"); // LOG_I(XUtf8::findPrefixUtf8("你瞧�瞧").c_str()); // LOG_I(XUtf8::findPrefixUtf8("你瞧瞧332").c_str()); }
bool FlyWebPublishedServerChild::RecvServerReady(const nsresult& aStatus) { LOG_I("FlyWebPublishedServerChild::RecvServerReady(%p)", this); MOZ_ASSERT(mActorExists); PublishedServerStarted(aStatus); return true; }
static bool cmdlineVerify(honggfuzz_t* hfuzz) { if (!cmdlineCheckBinaryType(hfuzz)) { LOG_E("Couldn't test binary for signatures"); return false; } if (!hfuzz->exe.fuzzStdin && !hfuzz->exe.persistent && !checkFor_FILE_PLACEHOLDER(hfuzz->exe.cmdline)) { LOG_E("You must specify '" _HF_FILE_PLACEHOLDER "' if the -s (stdin fuzzing) or --persistent options are not set"); return false; } if (hfuzz->exe.fuzzStdin && hfuzz->exe.persistent) { LOG_E( "Stdin fuzzing (-s) and persistent fuzzing (-P) cannot be specified at the same time"); return false; } if (hfuzz->threads.threadsMax >= _HF_THREAD_MAX) { LOG_E("Too many fuzzing threads specified %zu (>= _HF_THREAD_MAX (%u))", hfuzz->threads.threadsMax, _HF_THREAD_MAX); return false; } if (strchr(hfuzz->io.fileExtn, '/')) { LOG_E("The file extension contains the '/' character: '%s'", hfuzz->io.fileExtn); return false; } if (hfuzz->io.workDir == NULL) { hfuzz->io.workDir = "."; } if (mkdir(hfuzz->io.workDir, 0700) == -1 && errno != EEXIST) { PLOG_E("Couldn't create the workspace directory '%s'", hfuzz->io.workDir); return false; } if (hfuzz->io.crashDir == NULL) { hfuzz->io.crashDir = hfuzz->io.workDir; } if (mkdir(hfuzz->io.crashDir, 0700) && errno != EEXIST) { PLOG_E("Couldn't create the crash directory '%s'", hfuzz->io.crashDir); return false; } if (hfuzz->mutate.mutationsPerRun == 0U && hfuzz->cfg.useVerifier) { LOG_I("Verifier enabled with mutationsPerRun == 0, activating the dry run mode"); } if (hfuzz->mutate.maxFileSz > _HF_INPUT_MAX_SIZE) { LOG_E("Maximum file size '%zu' bigger than the maximum size '%zu'", hfuzz->mutate.maxFileSz, (size_t)_HF_INPUT_MAX_SIZE); return false; } return true; }
OMX_U32 AlsaSink::getPcmProbeId(OMX_U32 portIdx) { LOG_I("Enter.\n"); if (portIdx > 1) return OMX_ErrorBadPortIndex; return mPcmProbeId[portIdx]; }
/** * @brief Change operation mode dynamically. * @param[in] uint8_t target_mode: the target switched operation mode. * @retval None */ uint8_t wifi_set_opmode(uint8_t target_mode) { uint8_t origin_op_mode = 0; wifi_config_get_opmode(&origin_op_mode); if(target_mode == origin_op_mode) { LOG_I(wifi, "same opmode %d, do nothing", target_mode); return 0; } lwip_net_stop(origin_op_mode); if(wifi_config_set_opmode(target_mode) < 0) { return 1; } LOG_I(wifi, "set opmode to [%d]", target_mode); lwip_net_start(target_mode); return 0; }
//------------------------------------------------------------------------------ bool TrustZoneDevice::findContiguousWsm(uint32_t handle, addr_t *phys, uint32_t *len) { if (pMcKMod->findContiguousWsm(handle, phys, len)) { LOG_E("pMcKMod->findContiguousWsm failed"); return false; } LOG_I("Resolved buffer with handle %u to %p", handle, phys); return true; }
static __inline__ int32_t __ldl_src_probe(ldl_src *ls, media_uri *mrl, media_info *msi) { int32_t ch, level, err = -EPERM; media_info_t mi; if (!lso || !lso->probe) return err; err = __parse_mrl(mrl, &ch, &level); if (err) { LOG_W( "__ldl_src_probe()->__parse_mrl(%s) failed, err:'%d'.", __str(mrl), err ); return err; } memset(&mi, 0, sizeof(mi)); LOG_I( "__ldl_src_probe(): mrl '%s'.", __str(mrl->mrl) ); err = (*lso->probe)(ch, level, &mi); if (err) { LOG_W( "__ldl_src_probe()->(*lso->probe)(%s) failed, err:'%d'.", __str(mrl->mrl), err ); return -ENOENT; } else { LOG_I( "__ldl_src_probe(): mrl '%s' ok.", __str(mrl->mrl) ); } __fill_media_info((ld_src*)ls, msi, &mi); return 0; }
//------------------------------------------------------------------------------ TEEC_Result TEEC_InvokeCommand( TEEC_Session *session, uint32_t commandID, TEEC_Operation *operation, uint32_t *returnOrigin) { TEEC_Result teecRes; uint32_t returnOrigin_local = TEEC_ORIGIN_API; LOG_I("== %s() ==============", __func__); // ------------------------------------------------------------- if (session == NULL) { LOG_E("session is NULL"); if (returnOrigin != NULL) *returnOrigin = TEEC_ORIGIN_API; return TEEC_ERROR_BAD_PARAMETERS; } if (!session->imp.active) { LOG_E("session is inactive"); if (returnOrigin != NULL) *returnOrigin = TEEC_ORIGIN_API; return TEEC_ERROR_BAD_STATE; } // ------------------------------------------------------------- if (operation) operation->imp.session = &session->imp; pthread_mutex_lock(&session->imp.mutex_tci); // Call TA ((_TEEC_TCI *)session->imp.tci)->operation.commandId = commandID; ((_TEEC_TCI *)session->imp.tci)->operation.type = _TA_OPERATION_INVOKE_COMMAND; teecRes = _TEEC_CallTA(session, operation, &returnOrigin_local); if (teecRes != TEEC_SUCCESS ) { LOG_E("_TEEC_CallTA failed(%08x)", teecRes); if (returnOrigin != NULL) *returnOrigin = returnOrigin_local; } else { if (returnOrigin != NULL) *returnOrigin = ((_TEEC_TCI *)session->imp.tci)->returnOrigin; teecRes = ((_TEEC_TCI *)session->imp.tci)->returnStatus; } pthread_mutex_unlock(&session->imp.mutex_tci); LOG_I(" %s() = 0x%x", __func__, teecRes); return teecRes; }
//------------------------------------------------------------------------------ bool Session::removeBulkBuf( addr_t virtAddr ) { bool ret = true; BulkBufferDescriptor *pBlkBufDescr = NULL; LOG_I("removeBulkBuf(): Virtual Address = 0x%X", (unsigned int) virtAddr); // Search and remove bulk buffer descriptor for ( bulkBufferDescrIterator_t iterator = bulkBufferDescriptors.begin(); iterator != bulkBufferDescriptors.end(); ++iterator ) { if ((*iterator)->virtAddr == virtAddr) { pBlkBufDescr = *iterator; iterator = bulkBufferDescriptors.erase(iterator); break; } } if (NULL == pBlkBufDescr) { LOG_E("removeBulkBuf - Virtual Address not found"); ret = false; } else { LOG_I("removeBulkBuf(): WsmL2 phys=0x%X, handle=%d", (unsigned int)pBlkBufDescr->physAddrWsmL2, pBlkBufDescr->handle); // ignore any error, as we cannot do anything int ret = mcKMod->unregisterWsmL2(pBlkBufDescr->handle); if (0 != ret) { LOG_E("removeBulkBuf(): mcKModUnregisterWsmL2 failed: %d",ret); } delete (pBlkBufDescr); } return ret; }
static int32_t __ldl_src_open(ldl_src *ldl, media_uri *mrl) { int32_t err = -EPERM, ch, level; if (!lso || !lso->open) return err; if (ldl->state != INIT) return err; err = __parse_mrl(mrl, &ch, &level); if (err) { LOG_W( "__ldl_src_open()->__parse_mrl(%s) failed, err:'%d'.", __str(mrl), err ); return err; } LOG_I( "__ldl_src_open(): mrl '%s'.", __str(mrl->mrl) ); err = (*lso->open)((avs_media*)ldl, ch, level); if (err) { LOG_W( "__ldl_src_open()->(*lso->open)() failed, err:'%d'.", err ); return err; } else { LOG_I( "__ldl_src_open(): mrl '%s' ok.", __str(mrl->mrl) ); } ldl->state = OPENED; return 0; }
//------------------------------------------------------------------------------ static void checkMobiCoreVersion( MobiCoreDevice* mobiCoreDevice ) { bool failed = false; // Get MobiCore version info. mcDrvRspGetMobiCoreVersionPayload_t versionPayload; mobiCoreDevice->getMobiCoreVersion(&versionPayload); if (versionPayload.mcResult != MC_MCP_RET_OK) { LOG_E("Failed to obtain MobiCore version info. MCP return code: %u", versionPayload.mcResult); failed = true; } else { LOG_I("Product ID is %s", versionPayload.versionInfo.productId); // Check MobiCore version info. char* msg; if (!checkVersionOkMCI(versionPayload.versionInfo.versionMci, &msg)) { LOG_E("%s", msg); failed = true; } LOG_I("%s", msg); if (!checkVersionOkSO(versionPayload.versionInfo.versionSo, &msg)) { LOG_E("%s", msg); failed = true; } LOG_I("%s", msg); if (!checkVersionOkMCLF(versionPayload.versionInfo.versionMclf, &msg)) { LOG_E("%s", msg); failed = true; } LOG_I("%s", msg); if (!checkVersionOkCONTAINER(versionPayload.versionInfo.versionContainer, &msg)) { LOG_E("%s", msg); failed = true; } LOG_I("%s", msg); } if (failed) { exit(1); } }
void EnvFBO::RecreateBuffers(const GLsizei width, const GLsizei height) { /* width /= 2 * 2; height /= 2 * 2; */ LOG_I("create env fbo"); m_size = width; /* m_envMap = CubeMapTexture::Load(m_size); Texture::SetActiveTextureUnit(m_targetTextureUnit); m_envMap->Bind(); { m_envMap->SetMagMinFilters(GL_LINEAR); m_envMap->SetTextureClamping(); } m_envMap->Unbind(); */ Bind(); { m_envMap = CubeMapTexture::Load(m_size); Texture::SetActiveTextureUnit(m_targetTextureUnit); m_envMap->Bind(); { m_envMap->SetTextureClamping(); m_envMap->GenerateMipmap(); m_envMap->SetMagMinFilters(GL_LINEAR); } m_envMap->Unbind(); // next we create a depth buffer, and attach it to the FBO. m_depthBuffer = new RenderBuffer(); m_depthBuffer->Bind(); { m_depthBuffer->RenderbufferStorage(GL_DEPTH_COMPONENT, m_size, m_size); // attach the depth buffer to the FBO. glFramebufferRenderbuffer(m_target, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER,m_depthBuffer->GetHandle()); } m_depthBuffer->Unbind(); CheckFramebufferStatus(); } // switch to default frame buffer. Unbind(); }
OMX_ERRORTYPE AlsaSourceNmfHost::instantiateMain(void) { t_nmf_error nmf_error; LOG_I("Enter.\n"); mNmfil = alsasource_nmfil_host_composite_alsasourceCreate(); if (mNmfil == NULL) { LOG_E("\talsasource_nmfil_host_composite_alsasourceCreate failed!\n"); return OMX_ErrorInsufficientResources; } if (mNmfil->construct() != NMF_OK) { LOG_E("\tmNmfil->construct failed!\n"); return OMX_ErrorInsufficientResources; } nmf_error = mNmfil->bindFromUser("configure", FIFO_SIZE, &mIAlgoConfig); if (nmf_error != NMF_OK) { LOG_E("\tError: unable to bind il configure! [%d]\n", nmf_error); return OMX_ErrorInsufficientResources; } mNmfMain = alsasource_nmfil_host_composite_wrapperCreate(); if (mNmfMain == NULL) { LOG_E("\tError: alsasource_nmfil_host_composite_wrapperCreate failed!\n"); return OMX_ErrorInsufficientResources; } if (mNmfMain->construct() != NMF_OK) { LOG_E("\tError: mNmfMain->construct failed!\n"); return OMX_ErrorInsufficientResources; } nmf_error = mNmfMain->bindFromUser("configure", FIFO_SIZE, &mIMainConfig); if (nmf_error != NMF_OK) { LOG_E("\tError: unable to bind main configure! [%d]\n", nmf_error); return OMX_ErrorInsufficientResources; } nmf_error = mNmfMain->bindFromUser("process", FIFO_SIZE, &mIProcess); if (nmf_error != NMF_OK) { LOG_E("\tError: unable to bind main process! [%d]\n", nmf_error); return OMX_ErrorInsufficientResources; } mIAlgoConfig.setProcessCB(&mIProcess); nmf_error = mNmfMain->bindComponent("source", mNmfil, "source"); if (nmf_error != NMF_OK) { LOG_E("\tError: unable to bind main source! [%d]\n", nmf_error); return OMX_ErrorInsufficientResources; } return OMX_ErrorNone; }
//------------------------------------------------------------------------------ mcResult_t CMcKMod::unlockWsmL2(uint32_t handle) { int ret = 0; LOG_I(" Unlocking World Shared Memory with handle %d", handle); if (!isOpen()) { LOG_E("no connection to kmod"); return MC_DRV_ERR_KMOD_NOT_OPEN; } ret = ioctl(fdKMod, MC_IO_UNLOCK_WSM, handle); // Failure here is not really important if (ret != 0) { LOG_I("ret = %d", ret); } return ret; }
nsresult MulticastDNSDeviceProvider::OnDiscoveryTimeoutChanged(uint32_t aTimeoutMs) { LOG_I("OnDiscoveryTimeoutChanged = %d\n", aTimeoutMs); MOZ_ASSERT(NS_IsMainThread()); mDiscveryTimeoutMs = aTimeoutMs; return NS_OK; }
bool FlyWebPublishedServerChild::RecvServerClose() { LOG_I("FlyWebPublishedServerChild::RecvServerClose(%p)", this); MOZ_ASSERT(mActorExists); Close(); return true; }
void cleanup_pdcp_thread(void) { void *status_p = NULL; LOG_I(PDCP,"Scheduling PDCP thread to exit\n"); pdcp_instance_cnt = 0; if (pthread_cond_signal(&pdcp_cond) != 0) { LOG_I(PDCP,"ERROR pthread_cond_signal\n"); } else { LOG_I(PDCP,"Signalled PDCP thread to exit\n"); } pthread_join(pdcp_thread,&status_p); LOG_I(PDCP,"PDCP thread exited\n"); pthread_cond_destroy(&pdcp_cond); pthread_mutex_destroy(&pdcp_mutex); }
FlyWebPublishedServerImpl::FlyWebPublishedServerImpl(nsPIDOMWindowInner* aOwner, const nsAString& aName, const FlyWebPublishOptions& aOptions) : FlyWebPublishedServer(aOwner, aName, aOptions) , mHttpServer(new HttpServer()) { LOG_I("FlyWebPublishedServerImpl::FlyWebPublishedServerImpl(%p)", this); mHttpServer->Init(-1, Preferences::GetBool("flyweb.use-tls", false), this); }