您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DEBUGLOG函数代码示例

51自学网 2021-06-01 20:19:27
  C++
这篇教程C++ DEBUGLOG函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DEBUGLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUGLOG函数的具体用法?C++ DEBUGLOG怎么用?C++ DEBUGLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DEBUGLOG函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: DEBUGLOG

void HostCOOMatrix<ValueType>::ReadFile(const std::string filename) {    DEBUGLOG(this, "HostCOOMatrix::ReadFile()", "filename = " << filename, 2);    BaseMatrix<ValueType>::ReadFile(filename);    //Allocate matrix after reading the size from the file    this->Allocate(this->mNRows, this->mNCols, this->mNnz);    // Re open file    std::ifstream mFile;    mFile.exceptions ( std::ifstream::failbit | std::ifstream::badbit );    mFile.open(filename);    // Go to line 3 where the data begins    GoToLine(mFile, 3);    std::string line;    std::getline(mFile, line);    // Only check syntax on first line for performance issues    // Checking regex in each iteration very slow    if (!regex_match (line, std::regex("^((?:(?:[0-9][0-9]*//s+?){2})"                                "-?[0-9//.]+e(?://+|//-)[0-9]+)")))    {        std::cerr << "Bad syntax in line: 3" << std::endl;    }    GoToLine(mFile, 3);    std::istringstream linestream;    for (int index=0; index<this->mNnz; index++)    {        std::getline(mFile, line);        linestream.str(line);         int rowInd, colInd;        linestream >> rowInd >> colInd >> mData[index];        mRowInd[index] = rowInd - 1;        mColInd[index] = colInd - 1;        linestream.clear();            }    mFile.close();    DEBUGEND();}
开发者ID:Msegade,项目名称:pssolver,代码行数:40,


示例2: FspFileNodeSetFileInfo

VOID FspFileNodeSetFileInfo(FSP_FILE_NODE *FileNode, PFILE_OBJECT CcFileObject,    const FSP_FSCTL_FILE_INFO *FileInfo){    PAGED_CODE();    FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension =        FspFsvolDeviceExtension(FileNode->FsvolDeviceObject);    UINT64 AllocationSize = FileInfo->AllocationSize > FileInfo->FileSize ?        FileInfo->AllocationSize : FileInfo->FileSize;    UINT64 AllocationUnit;    AllocationUnit = FsvolDeviceExtension->VolumeParams.SectorSize *        FsvolDeviceExtension->VolumeParams.SectorsPerAllocationUnit;    AllocationSize = (AllocationSize + AllocationUnit - 1) / AllocationUnit * AllocationUnit;    FileNode->Header.AllocationSize.QuadPart = AllocationSize;    FileNode->Header.FileSize.QuadPart = FileInfo->FileSize;    FileNode->FileAttributes = FileInfo->FileAttributes;    FileNode->ReparseTag = FileInfo->ReparseTag;    FileNode->CreationTime = FileInfo->CreationTime;    FileNode->LastAccessTime = FileInfo->LastAccessTime;    FileNode->LastWriteTime = FileInfo->LastWriteTime;    FileNode->ChangeTime = FileInfo->ChangeTime;    FileNode->InfoExpirationTime = FspExpirationTimeFromMillis(        FsvolDeviceExtension->VolumeParams.FileInfoTimeout);    FileNode->InfoChangeNumber++;    if (0 != CcFileObject)    {        NTSTATUS Result = FspCcSetFileSizes(            CcFileObject, (PCC_FILE_SIZES)&FileNode->Header.AllocationSize);        if (!NT_SUCCESS(Result))        {            DEBUGLOG("FspCcSetFileSizes error: %s", NtStatusSym(Result));            DEBUGBREAK_CRIT();            CcUninitializeCacheMap(CcFileObject, 0, 0);        }    }}
开发者ID:LucaBongiorni,项目名称:winfsp,代码行数:40,


示例3: s

wxSize MutIconShapeClass<T>::DoGetBestSize() const {	//  wxSize s(GetWindowBorderSize()/2);	wxSize s(0,0);	wxSize s1(0,0);	DEBUGLOG (other, _T("best size: %dx%d"),s.x,s.y);//	return s;			if (staticText) s += staticText->GetBestSize();	DEBUGLOG (other, _T("staticText %p best size: %dx%d"),(void*)&staticText,s.x,s.y);	if (GetIcon().IsOk()) {		s.x = std::max (Icon.GetWidth(), s.x);		int h = Icon.GetHeight();		s.y += h;	}	if (this->GetSizer()) {		s1 = this->GetSizer()->CalcMin();		DEBUGLOG (other, _T("our %p sizer best size: %dx%d"),(void*)this,s1.x,s1.y);		s.x = std::max(s.x,s1.x);		s.y += std::max(s1.y,0);	}#ifdef DEBUG	wxSize s2 = this->GetSize() - this->GetClientSize();	s2.IncTo(wxSize(0,0));	DEBUGLOG(gui,_T("s1: (%d,%d), maxBorderSize: (%d,%d)"),		 s2.x,s2.y,2*maxBorderSize.x,2*maxBorderSize.y);	mutASSERT(!maxBorderSize.x || s2.x <= 2*maxBorderSize.x);	mutASSERT(!maxBorderSize.y || s2.y <= 2*maxBorderSize.y);#endif	s += maxBorderSize + maxBorderSize;		// s1 = MutPanel::DoGetBestSize();        // call to base class not needed.	DEBUGLOG (other, _T("our %p parent best size: %dx%d"),(void*)this,s1.x,s1.y);		s1.IncTo(s);	DEBUGLOG (other, _T("our %p best size: %dx%d"),(void*)this,s.x,s.y);	wxConstCast(this,MutIconShapeClass<T>)->SetMinSize(s1);	this->CacheBestSize(s1);	return s1;}
开发者ID:BackupTheBerlios,项目名称:mutabor,代码行数:47,


示例4: DEBUGLOG

void SCDEVICE::LateInit(void){  DEBUGLOG("%s", __FUNCTION__);  int n = CardIndex();  if (DeviceNumber() != n)    ERRORLOG("CardIndex - DeviceNumber mismatch! Put DVBAPI plugin first on VDR commandline!");  softcsa = (fd_ca < 0);  if (softcsa)  {    if (HasDecoder())      INFOLOG("Card %s is a full-featured card but no ca device found!", devId);  }  else if (cScDevices::ForceBudget(n))  {    INFOLOG("Budget mode forced on card %s", devId);    softcsa = true;  }  if (softcsa)  {    INFOLOG("Using software decryption on card %s", devId);  }}
开发者ID:macmenot,项目名称:vdr-plugin-dvbapi,代码行数:22,


示例5: add_env_variable

static void add_env_variable( lua_State* L,  const char* key, const char* env ) {    char* envdata;        DEBUGLOG( "Registering env variable: %s", env );    // Put the key onto the stack    lua_pushstring( L, key );    // Put the environment data onto the stack    envdata = getenv( env );    if ( envdata == NULL )     {        lua_pushstring( L, "" );    }    else     {        lua_pushstring( L, envdata );    }    lua_settable( L, -3 );}
开发者ID:jakobwesthoff,项目名称:lucie,代码行数:22,


示例6: DEBUGLOG

Vector<ValueType> Vector<ValueType>::operator+(                                const Vector<ValueType>& otherVector){    DEBUGLOG( this, "Vector::operator+", "Vec =" << &otherVector, 1);    assert(GetSize() == otherVector.GetSize());    assert(( IsHost() && otherVector.IsHost() )||             (IsDevice() && otherVector.IsDevice()) );    Vector<ValueType> result(GetSize());    if (pImpl == pImplHost)        result.pImpl->Add(*(otherVector.pImpl), *pImpl);    else if (pImpl == pImplDevice)    {        result.MoveToDevice();        result.pImpl->Add(*(otherVector.pImpl), *pImpl);    }    DEBUGEND();    return result;        }
开发者ID:Msegade,项目名称:pssolver,代码行数:22,


示例7: DEBUGLOG

App::~App(){  DEBUGLOG("~App;");  delete debugger;  delete player;  delete app_settings;  delete midi;  delete audio;  delete file_system;  if (screen)    SDL_FreeSurface(screen);  if (sdlTexture)    SDL_DestroyTexture(sdlTexture);  if (sdlRenderer)    SDL_DestroyRenderer(sdlRenderer);  if(sdlWindow)    SDL_DestroyWindow(sdlWindow);}
开发者ID:MisterZeus,项目名称:SNES-Tracker,代码行数:22,


示例8: init_comms

/* Called by init_cluster() to open up the listening socket */int init_comms(unsigned short port){    struct sockaddr_in6 addr;    sock_hash = dm_hash_create(100);    tcp_port = port ? : DEFAULT_TCP_PORT;    listen_fd = socket(AF_INET6, SOCK_STREAM, 0);    if (listen_fd < 0)    {	return -1;    }    else    {	int one = 1;	setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(int));	setsockopt(listen_fd, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof(int));    }    memset(&addr, 0, sizeof(addr)); // Bind to INADDR_ANY    addr.sin6_family = AF_INET6;    addr.sin6_port = htons(tcp_port);    if (bind(listen_fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)    {	DEBUGLOG("Can't bind to port: %s/n", strerror(errno));	syslog(LOG_ERR, "Can't bind to port %d, is clvmd already running ?", tcp_port);	close(listen_fd);	return -1;    }    listen(listen_fd, 5);    /* Set Close-on-exec */    fcntl(listen_fd, F_SETFD, 1);    return 0;}
开发者ID:SteamMOD,项目名称:android_bootable_steam_device-mapper,代码行数:40,


示例9: _cluster_do_node_callback

/* Call a callback for each node, so the caller knows whether it's up or down */static int _cluster_do_node_callback(struct local_client *master_client,				     void (*callback)(struct local_client *,						      const char *csid, int node_up)){	struct dm_hash_node *hn;	struct node_info *ninfo;	int somedown = 0;	dm_hash_iterate(hn, node_hash)	{		char csid[COROSYNC_CSID_LEN];		ninfo = dm_hash_get_data(node_hash, hn);		memcpy(csid, dm_hash_get_key(node_hash, hn), COROSYNC_CSID_LEN);		DEBUGLOG("down_callback. node %d, state = %d/n", ninfo->nodeid,			 ninfo->state);		if (ninfo->state != NODE_DOWN)			callback(master_client, csid, ninfo->state == NODE_CLVMD);		if (ninfo->state != NODE_CLVMD)			somedown = -1;	}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:24,


示例10: DEBUGLOG

SCCIAdapter::~SCCIAdapter(){  DEBUGLOG("%s", __FUNCTION__);  Cancel(3);  for (int i = 0; i < MAX_SOCKETS; i++)  {    if (sockets[i] > 0)      close(sockets[i]);    sockets[i] = 0;  }  ciMutex.Lock();  delete rb;  rb = 0;  ciMutex.Unlock();  if (decsa)    delete decsa;  if (capmt != 0)    delete capmt;  capmt = 0;}
开发者ID:Yuri666,项目名称:vdr-plugin-dvbapi,代码行数:23,


示例11: lock

bool cLiveQueue::Add(MsgPacket* p){  cMutexLock lock(&m_lock);  // in timeshift mode ?  if(m_pause || (!m_pause && m_writefd != -1))  {    // write packet    if(!p->write(m_writefd, 1000))    {      DEBUGLOG("Unable to write packet into timeshift ringbuffer !");      return false;    }    // ring-buffer overrun ?    off_t length = lseek(m_writefd, 0, SEEK_CUR);    if(length >= (off_t)BufferSize)    {      // truncate to current position      if(ftruncate(m_writefd, length) == 0)        lseek(m_writefd, 0, SEEK_SET);    }    return true;  }  // queue too long ?  if (size() > 100) {    delete p;    return false;  }  // add packet to queue  push(p);  m_cond.Signal();  return true;}
开发者ID:axmhari,项目名称:vdr-plugin-xvdr,代码行数:37,


示例12: switch

	void OpenGLGraphicSystem::ProcessShader( BohgeEngine::ShaderProperty::ShaderCode sc, eastl::string& code )	{		Utility::RemoveTargetString( code, "precision highp float;" );		Utility::RemoveTargetString( code, "precision mediump float;" );		Utility::RemoveTargetString( code, "precision lowp float;" );		Utility::RemoveTargetString( code, "highp " );		Utility::RemoveTargetString( code, "mediump " );		Utility::RemoveTargetString( code, "lowp " );		code.insert(0, "#define	MAXJOINTS	128/n" );		code.insert(0, "#define	MAXARRAYSIZE	256/n" );		code.insert(0, "#define	_WINDOWS_/n" );		glslopt_shader_type type;		switch( sc )		{		case ShaderProperty::SC_VERTEX: type = kGlslOptShaderVertex; break;		case ShaderProperty::SC_FRAGMENT: type = kGlslOptShaderFragment; break;		default:ASSERT(false);		}		glslopt_shader* shader = glslopt_optimize( m_pGlslopt_ctx, type, code.c_str(), 0 );		if ( glslopt_get_status(shader) )		{			code = glslopt_get_output( shader );		}		else		{			const char* log = glslopt_get_log( shader );			DEBUGLOG("Can't optimize shader, caz %s/n", log );		}		if ( ShaderProperty::SC_VERTEX == sc )		{			size_t mainbegin = _FindMainFunction(code);			_FixAttributeIndexingType( code, mainbegin );		}		glslopt_shader_delete( shader );	}
开发者ID:bohge,项目名称:Bohge_Engine,代码行数:36,


示例13: DEBUGLOG

bool cLiveStreamer::IsReady(){  if(m_ready)    return true;  bool bAllParsed = true;  for (std::list<cTSDemuxer*>::iterator i = m_Demuxers.begin(); i != m_Demuxers.end(); i++)  {    /*if((*i)->IsParsed() && (*i)->GetContent() == cStreamInfo::scVIDEO) {      bAllParsed = true;      break;    }*/    if (!(*i)->IsParsed()) {      DEBUGLOG("Stream with PID %i not parsed", (*i)->GetPID());      bAllParsed = false;      break;    }  }  m_ready = bAllParsed;  return bAllParsed;}
开发者ID:magdaw736,项目名称:vdr-plugin-xvdr,代码行数:24,


示例14: DEBUGLOG

cLiveStreamer::~cLiveStreamer(){  DEBUGLOG("Started to delete live streamer");  cTimeMs t;  DEBUGLOG("Stopping streamer thread ...");  Cancel(5);  DEBUGLOG("Done.");  cMutexLock lock(&m_FilterMutex);  DEBUGLOG("Detaching");  if(m_PatFilter != NULL && m_Device != NULL) {    m_Device->Detach(m_PatFilter);    delete m_PatFilter;    m_PatFilter = NULL;  }  if (IsAttached()) {    Detach();  }  for (std::list<cTSDemuxer*>::iterator i = m_Demuxers.begin(); i != m_Demuxers.end(); i++) {    if ((*i) != NULL) {      DEBUGLOG("Deleting stream demuxer for pid=%i and type=%i", (*i)->GetPID(), (*i)->GetType());      delete (*i);    }  }  m_Demuxers.clear();  delete m_Queue;  m_uid = 0;  {    cMutexLock lock(&m_DeviceMutex);    m_Device = NULL;  }  DEBUGLOG("Finished to delete live streamer (took %llu ms)", t.Elapsed());}
开发者ID:giga91,项目名称:vdr-plugin-xvdr,代码行数:43,


示例15: _init_cluster

static int _init_cluster(void){	cs_error_t err;#ifdef QUORUM_SET	/* corosync/quorum.h */	uint32_t quorum_type;#endif	node_hash = dm_hash_create(100);	err = cpg_initialize(&cpg_handle,			     &corosync_cpg_callbacks);	if (err != CS_OK) {		syslog(LOG_ERR, "Cannot initialise Corosync CPG service: %d",		       err);		DEBUGLOG("Cannot initialise Corosync CPG service: %d", err);		return cs_to_errno(err);	}#ifdef QUORUM_SET	err = quorum_initialize(&quorum_handle,				&quorum_callbacks,				&quorum_type);	if (quorum_type != QUORUM_SET) {		syslog(LOG_ERR, "Corosync quorum service is not configured");		DEBUGLOG("Corosync quorum service is not configured");		return EINVAL;	}#else	err = quorum_initialize(&quorum_handle,				&quorum_callbacks);#endif	if (err != CS_OK) {		syslog(LOG_ERR, "Cannot initialise Corosync quorum service: %d",		       err);		DEBUGLOG("Cannot initialise Corosync quorum service: %d", err);		return cs_to_errno(err);	}	/* Create a lockspace for LV & VG locks to live in */	lockspace = dlm_open_lockspace(LOCKSPACE_NAME);	if (!lockspace) {		lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);		if (!lockspace) {			syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m");			return -1;		}		DEBUGLOG("Created DLM lockspace for CLVMD./n");	} else		DEBUGLOG("Opened existing DLM lockspace for CLVMD./n");	dlm_ls_pthread_init(lockspace);	DEBUGLOG("DLM initialisation complete/n");	/* Connect to the clvmd group */	strcpy((char *)cpg_group_name.value, "clvmd");	cpg_group_name.length = strlen((char *)cpg_group_name.value);	err = cpg_join(cpg_handle, &cpg_group_name);	if (err != CS_OK) {		cpg_finalize(cpg_handle);		quorum_finalize(quorum_handle);		dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);		syslog(LOG_ERR, "Cannot join clvmd process group");		DEBUGLOG("Cannot join clvmd process group: %d/n", err);		return cs_to_errno(err);	}	err = cpg_local_get(cpg_handle,			    &our_nodeid);	if (err != CS_OK) {		cpg_finalize(cpg_handle);		quorum_finalize(quorum_handle);		dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);		syslog(LOG_ERR, "Cannot get local node id/n");		return cs_to_errno(err);	}	DEBUGLOG("Our local node id is %d/n", our_nodeid);	DEBUGLOG("Connected to Corosync/n");	return 0;}
开发者ID:Find7s,项目名称:Lvm_for_Android,代码行数:84,


示例16: DEBUGLOG

	//-------------------------------------------------------------------	void StateManager::SwitchState(Engine& engine)	{		engine.GetActionManager()->SetResponse(false);//状态切换停止保存案件buffer		DEBUGLOG("State Change to %d!/n", static_cast<int>(m_eNextState));		if( ! m_lStateList.empty() )		{			m_lStateList.begin()->m_pStatePtr->OnLeave(engine);//通知久的状态机需要推出了			m_ePreviousState = m_lStateList.begin()->m_eStateName;		}		//新建新状态		bool isExist = false;		StateList::iterator it;		if( !m_lStateList.empty() )		{			if ( m_eNextState != m_lStateList.begin()->m_eStateName )//切换自身被认为是重置			{				for(it = ++(m_lStateList.begin());					it != m_lStateList.end();					it++)				{					if( it->m_eStateName == m_eNextState )					{						isExist = true;						break;					}				}			}		}		//如果更换状态,删除旧的状态		if( true == m_isReplace )		{			if( ! m_lStateList.empty() )			{				for ( StateList::iterator it = m_lStateList.begin();					it != m_lStateList.end() ;				 )				{					if( m_ClearOtherState )					{						if ( m_eNextState != it->m_eStateName )						{							it->m_pStatePtr->ReleaseResource(engine);							SAFE_DELETE( it->m_pStatePtr );							it = m_lStateList.erase( it );						}						else						{							it ++;						}					}					else					{						if( m_ePreviousState == it->m_eStateName )//删除需要替换掉的状态机						{							it->m_pStatePtr->ReleaseResource(engine);							SAFE_DELETE( it->m_pStatePtr );							it = m_lStateList.erase( it );							break;						}						it ++;					}				}			}		}		//设置新的		IGameState* state;		if( isExist )		{			m_isLoadResouce = false; //状态如果在堆栈中这里不需要再次读取,所以为false			state = it->m_pStatePtr;			state->OnEnter(engine, m_ePreviousState );			//一下执行从新放到栈首的操作			StateInfo newInfo(state, it->m_eStateName );			m_lStateList.erase(it);			m_lStateList.push_front(newInfo);		}		else		{			switch(m_eNextState)			{			case State_None:				{					ASSERT(false);				}break;			case State_Logo:				{					state = NEW StateLogo();				}break;			case State_Main_Menu:				{					state = NEW StateMainMenu();				}break;			}			StateInfo newInfo(state, m_eNextState);			//新状态压住栈首			//newState->LoadResource(engine);			if( m_isShowLoading )			{//.........这里部分代码省略.........
开发者ID:ServerGame,项目名称:Bohge_Engine,代码行数:101,


示例17: printGLString

static void printGLString(const char *name, GLenum s){    const char *v = (const char *)glGetString( s );    DEBUGLOG( "GL %s = %s/n", name, v );}
开发者ID:playir,项目名称:SocialPoetry,代码行数:5,


示例18: DEBUGLOG

SoundLibrarySaveDialog::~SoundLibrarySaveDialog(){	DEBUGLOG( "DESTROY" );}
开发者ID:lxlxlo,项目名称:composite-devel,代码行数:5,


示例19: DEBUGLOG

void cVnsiOsd::Cmd(int cmd, int wnd, int color, int x0, int y0, int x1, int y1, const void *data, int size){  DEBUGLOG("OSD: cmd: %d, wnd: %d, color: %d, x0: %d, y0: %d, x1: %d, y1: %d",      cmd, wnd, color, x0, y0, x1, y1);  cVnsiOsdProvider::SendOsdPacket(cmd, wnd, color, x0, y0, x1, y1, data, size);}
开发者ID:AlwinEsch,项目名称:vdr-plugin-vnsiserver,代码行数:6,


示例20: handle_fragment

static void handle_fragment(server *srv, connection *con, void *plugindata){	int err;	plugin_data *p = plugindata;	off_t range_start, range_end;		if (copy_bits_session_id_or_set_error(srv, con))		return;	err = get_range(srv, con, con->range_offset, &range_start, &range_end);	if (range_start > p->state.abs_off || range_end < p->state.abs_off) {		//BITS requests must be contiguious - a Transient error may have occured		DEBUGLOG("sooo", "The fragment range is greater than abs_off", range_start, p->state.abs_off, range_end);		con->http_status = 416;		err = -EINVAL;		goto done;	}	if (((con->range_offset + range_start) < p->state.abs_off) && (range_end > p->state.abs_off)){		DEBUGLOG("sooo", "Fragment Overlaps Abs_off:", con->range_offset + range_start, p->state.abs_off, range_end);		//Discard bytes we already have:		//discard_bytes(srv, con->request_content_queue, p->state.abs_off - (con->range_offset + range_start)+1);		//DEBUGLOG("sos", "Discarded", p->state.abs_off -(range_start + con->range_offset), "bytes");		//con->range_offset = p->state.abs_off - range_start;		//DEBUGLOG("so", "Setting range offset - ", con->range_offset);		p->state.abs_off = con->range_offset + range_start;		DEBUGLOG("so", "Re-adjust abs_off", p->state.abs_off);	}		/* *PREVIOUS IMPLEMENTATION OF 416 - Discards already written data*	if ( range_end < p->state.abs_off ) {		DEBUGLOG("soo", "The requests range has already been dealt with", range_start, range_end);		//Set the range_offset to be the content_length, to return with a healthy 200 http_status		con->range_offset = con->request.content_length;		goto done;		}*/	DEBUGLOG("so", "Range Offset", con->range_offset);	DEBUGLOG("soo","Handling Fragment (start/end)", range_start, range_end);	if (err)		goto done;	while (1) {		if (chunkqueue_avail(con->request_content_queue) >		    range_end - range_start + 1 - con->range_offset) {			LOG("sdo", "More data than we want!",			    chunkqueue_avail(con->request_content_queue),			    range_end - range_start + 1 - con->range_offset);			err = -EINVAL;			goto done;		}		err = process_data(srv, con, p, con->physical.path,				   con->request_content_queue, range_start);		if (err)			goto done;		if (con->range_offset >= range_end - range_start + 1 || 		     chunkqueue_avail(con->request_content_queue) == 0){			DEBUGLOG("sd", "Leaving for more data", chunkqueue_avail(con->request_content_queue));			break;		}	}done:	/*	if (con->range_offset == range_end - range_start + 1) {		buffer_reset(p->tmpbuf);		if (err)			buffer_append_off_t(p->tmpbuf, range_start);		else			buffer_append_off_t(p->tmpbuf, range_end + 1);		DEBUGLOG("sdb", "BITS-Received-Content-Range header length",				p->tmpbuf->used, p->tmpbuf);		response_header_insert(srv, con,				CONST_STR_LEN("BITS-Received-Content-Range"),				CONST_BUF_LEN(p->tmpbuf));	} 	*/	DEBUGLOG("so", "Abs_off", p->state.abs_off);	if (!err) {		DEBUGLOG("s", "Resetting HTTP Status");		con->http_status = 0;		return;	}	if (con->http_status != 416 && con->http_status != 400)		con->http_status = 400;       	if (con->http_status = 416) {		buffer_reset(p->tmpbuf);		buffer_append_off_t(p->tmpbuf, p->state.abs_off);		response_header_insert(srv, con,				       CONST_STR_LEN("BITS-Received-Content-Range"),//.........这里部分代码省略.........
开发者ID:2xyo,项目名称:transfervm,代码行数:101,


示例21: process_data

static int process_data(server *srv, connection *con, plugin_data *p,			buffer *filename, chunkqueue *cq, off_t range_start){	int err;	size_t len;	//off_t *abs_off;	vhd_state_t *state;	vhd_context_t *vhd;	err = 0;	state = &p->state;	vhd = &state->vhd;	//abs_off = range_start + con->range_offset;	//abs_off = state->abs_off;	DEBUGLOG("so", "Absolute Offset", state->abs_off);	DEBUGLOG("sd", "Current Virtual Block = ", state->curr_virt_blk);	if (state->curr_virt_blk != -1) {		DEBUGLOG("s", "Process Block");		err = process_block(srv, cq, state, &(state->abs_off));		goto done;	}	if (state->abs_off < 0 + sizeof(vhd_footer_t)) {		err = get_footer(srv, cq, state, &(state->abs_off));		goto done;	}	if (((off_t)state->abs_off) < vhd->footer.data_offset + sizeof(vhd_header_t)) {		err = get_header(srv, cq, state, &(state->abs_off));		goto done;	}	if (((off_t)state->abs_off) < vhd->header.table_offset + state->bat_buf_size) {		err = get_bat(srv, cq, state, &(state->abs_off));		if (err)			goto done;		if (state->vhd_ready)			err = prepare_for_write(srv, state, filename, state->abs_off);		goto done;	}	if (state->blocks_written < state->blocks_allocated) {		LOG("sdd", "BUG!", state->blocks_written,				state->blocks_allocated);		err = -EINVAL;		goto done;	}	// TODO: we could actually validate the primary footer at the end	len = chunkqueue_avail(cq);	DEBUGLOG("sd", "Discarding the remainder", len);	discard_bytes(srv, cq, len);	state->abs_off += len;	if (state->zero_unalloc) {		err = zero_unallocated(srv, state);		state->zero_unalloc = 0;	}done:	con->range_offset = state->abs_off - range_start;	return err;}
开发者ID:2xyo,项目名称:transfervm,代码行数:63,


示例22: switch

MRESULT IntrospectBase::DlgProc(ULONG msg, MPARAM mp1, MPARAM mp2){  switch (msg)  {case WM_INITDLG:    { MRESULT ret = DialogBase::DlgProc(msg, mp1, mp2);      do_warpsans(GetHwnd());      // Populate MRU list      ComboBox cb(GetCtrl(CB_SERVER));      if (Configuration.SinkServer)        cb.InsertItem(Configuration.SinkServer);      char key[] = "Server1";      do      { xstring url;        ini_query(key, url);        if (!url)          break;        cb.InsertItem(url);      } while (++key[sizeof key -2] <= '9');      return ret;    }   case WM_COMMAND:    DEBUGLOG(("IntrospectBase::DlgProc:WM_COMMAND(%i,%i, %p)/n", SHORT1FROMMP(mp1), SHORT2FROMMP(mp1), mp2));    switch (SHORT1FROMMP(mp1))    {case PB_UPDATE:      PostMsg(UM_CONNECT, 0,0);      return 0;     case DID_OK:      { ComboBox cb(GetCtrl(CB_SERVER));        const xstring& server = cb.Text();        // update MRU list        if (server.length())        { char key[] = "Server1";          int i = 0;          int len = 0;          xstring url;          do          { if (len >= 0)            {skip:              url.reset();              len = (SHORT)SHORT1FROMMR(WinSendMsg(cb.Hwnd, LM_QUERYITEMTEXTLENGTH, MPFROMSHORT(i), 0));              if (len >= 0)              { WinSendMsg(cb.Hwnd, LM_QUERYITEMTEXT, MPFROM2SHORT(i, len+1), MPFROMP(url.allocate(len)));                DEBUGLOG(("IntrospectBase::DlgProc: save MRU %i: (%i) %s/n", i, len, url.cdata()));                ++i;                if (url == server)                  goto skip;              }            }            ini_write(key, url);          } while (++key[sizeof key -2] <= '9');        }        Configuration.Save();      }      break;    }    break;   case WM_CONTROL:    switch (SHORT1FROMMP(mp1))    {case CB_SERVER:      switch (SHORT2FROMMP(mp1))      {case CBN_ENTER:        PostMsg(UM_CONNECT, 0,0);        break;      }      break;     case CB_SINKSRC:      switch (SHORT2FROMMP(mp1))      {case CBN_ENTER:        PostMsg(UM_UPDATE_PORT, 0,0);        break;      }    }    break;   case UM_CONNECT:    { DEBUGLOG(("IntrospectBase::DlgProc:UM_CONNECT/n"));      // destroy any old connection      Cleanup();      const xstring& server = WinQueryDlgItemXText(GetHwnd(), CB_SERVER);      if (!server.length())      { WinSetDlgItemText(GetHwnd(), ST_STATUS, "enter server name above");        return 0;      }      // open new connection      try      { Context.Connect("PM123", server);      } catch (const PAException& ex)      { WinSetDlgItemText(GetHwnd(), ST_STATUS, ex.GetMessage());      }      return 0;    }   case UM_STATE_CHANGE:    { pa_context_state_t state = (pa_context_state_t)LONGFROMMP(mp1);      DEBUGLOG(("IntrospectBase::DlgProc:UM_STATE_CHANGE %u/n", state));      const char* text = "";      switch (state)      {case PA_CONTEXT_CONNECTING://.........这里部分代码省略.........
开发者ID:OS2World,项目名称:MM-SOUND-PM123,代码行数:101,


示例23: DEBUGLOG

void IntrospectBase::StateChangeHandler(const pa_context_state_t& args){ DEBUGLOG(("IntrospectBase(%p)::StateChangeHandler(%i)/n", this, args));  PostMsg(UM_STATE_CHANGE, MPFROMLONG(args), 0);}
开发者ID:OS2World,项目名称:MM-SOUND-PM123,代码行数:4,


示例24: glCreateProgram

bool CCDeviceRenderer::loadShader(CCShader *shader){	GLuint vertShader, fragShader;		CCText shaderPath = shader->name;	shaderPath += ".fx";	    // Create shader program	shader->program = glCreateProgram();		if( !compileShader( &vertShader, GL_VERTEX_SHADER, shaderPath.buffer ) )	{		DEBUGLOG( "Failed to compile vertex shader." );		glDeleteProgram( shader->program );		shader->program = 0;		return false;	}		if( !compileShader( &fragShader, GL_FRAGMENT_SHADER, shaderPath.buffer ) )	{		DEBUGLOG( "Failed to compile fragment shader." );		glDeleteProgram( shader->program );		shader->program = 0;		return false;	}		DEBUG_OPENGL();		// Attach shaders to program	glAttachShader( shader->program, vertShader );    DEBUG_OPENGL();    	glAttachShader( shader->program, fragShader );    DEBUG_OPENGL();	    // Bind attribute locations - this needs to be done prior to linking	glBindAttribLocation( shader->program, ATTRIB_VERTEX, "vs_position" );	glBindAttribLocation( shader->program, ATTRIB_TEXCOORD, "vs_texCoord" );	glBindAttribLocation( shader->program, ATTRIB_COLOUR, "vs_colour" );	glBindAttribLocation( shader->program, ATTRIB_NORMAL, "vs_normal" );    DEBUG_OPENGL();		if( !linkProgram( shader->program ) )	{		DEBUGLOG( "Failed to link program." );		if( vertShader )		{			glDeleteShader( vertShader );			vertShader = 0;		}				if( fragShader )		{			glDeleteShader( fragShader );			fragShader = 0;		}				if( shader->program )		{			glDeleteProgram( shader->program );			shader->program = 0;		}				return false;	}        // Release vertex and fragment shaders    if( vertShader )	{		glDeleteShader( vertShader );	}		if( fragShader )	{		glDeleteShader( fragShader );	}	    return true;}
开发者ID:Geek365,项目名称:PhoneWarsDemo,代码行数:79,


示例25: _get_num_nodes

static int _get_num_nodes(){	DEBUGLOG("num_nodes = %d/n", num_nodes);	return num_nodes;}
开发者ID:Find7s,项目名称:Lvm_for_Android,代码行数:5,


示例26: bs

bool cParserH264::Parse_SPS(uint8_t *buf, int len){  cBitstream bs(buf, len*8);  unsigned int tmp, frame_mbs_only;  int cbpsize = -1;  int profile_idc = bs.readBits(8);  /* constraint_set0_flag = bs.readBits1();    */  /* constraint_set1_flag = bs.readBits1();    */  /* constraint_set2_flag = bs.readBits1();    */  /* constraint_set3_flag = bs.readBits1();    */  /* reserved             = bs.readBits(4);    */  bs.skipBits(8);  int level_idc = bs.readBits(8);  unsigned int seq_parameter_set_id = bs.readGolombUE(9);  unsigned int i = 0;  while (h264_lev2cpbsize[i][0] != -1)  {    if (h264_lev2cpbsize[i][0] >= level_idc)    {      cbpsize = h264_lev2cpbsize[i][1];      break;    }    i++;  }  if (cbpsize < 0)    return false;  memset(&m_streamData.sps[seq_parameter_set_id], 0, sizeof(h264_private::SPS));  m_streamData.sps[seq_parameter_set_id].cbpsize = cbpsize * 125; /* Convert from kbit to bytes */  if( profile_idc == 100 || profile_idc == 110 ||      profile_idc == 122 || profile_idc == 244 || profile_idc == 44 ||      profile_idc == 83 || profile_idc == 86 || profile_idc == 118 ||      profile_idc == 128 )  {    int chroma_format_idc = bs.readGolombUE(9); /* chroma_format_idc              */    if(chroma_format_idc == 3)      bs.skipBits(1);           /* residual_colour_transform_flag */    bs.readGolombUE();          /* bit_depth_luma - 8             */    bs.readGolombUE();          /* bit_depth_chroma - 8           */    bs.skipBits(1);             /* transform_bypass               */    if (bs.readBits1())         /* seq_scaling_matrix_present     */    {      for (int i = 0; i < ((chroma_format_idc != 3) ? 8 : 12); i++)      {        if (bs.readBits1())     /* seq_scaling_list_present       */        {          int last = 8, next = 8, size = (i<6) ? 16 : 64;          for (int j = 0; j < size; j++)          {            if (next)              next = (last + bs.readGolombSE()) & 0xff;            last = !next ? last: next;          }        }      }    }  }  int log2_max_frame_num_minus4 = bs.readGolombUE();           /* log2_max_frame_num - 4 */  m_streamData.sps[seq_parameter_set_id].log2_max_frame_num = log2_max_frame_num_minus4 + 4;  int pic_order_cnt_type = bs.readGolombUE(9);  m_streamData.sps[seq_parameter_set_id].pic_order_cnt_type = pic_order_cnt_type;  if (pic_order_cnt_type == 0)  {    int log2_max_pic_order_cnt_lsb_minus4 = bs.readGolombUE();         /* log2_max_poc_lsb - 4 */    m_streamData.sps[seq_parameter_set_id].log2_max_pic_order_cnt_lsb = log2_max_pic_order_cnt_lsb_minus4 + 4;  }  else if (pic_order_cnt_type == 1)  {    m_streamData.sps[seq_parameter_set_id].delta_pic_order_always_zero_flag = bs.readBits1();    bs.readGolombSE();         /* offset_for_non_ref_pic          */    bs.readGolombSE();         /* offset_for_top_to_bottom_field  */    tmp = bs.readGolombUE();   /* num_ref_frames_in_pic_order_cnt_cycle */    for (unsigned int i = 0; i < tmp; i++)      bs.readGolombSE();       /* offset_for_ref_frame[i]         */  }  else if(pic_order_cnt_type != 2)  {    /* Illegal poc */    return false;  }  bs.readGolombUE(9);          /* ref_frames                      */  bs.skipBits(1);             /* gaps_in_frame_num_allowed       */  m_Width  /* mbs */ = bs.readGolombUE() + 1;  m_Height /* mbs */ = bs.readGolombUE() + 1;  frame_mbs_only     = bs.readBits1();  m_streamData.sps[seq_parameter_set_id].frame_mbs_only_flag = frame_mbs_only;  DEBUGLOG("H.264 SPS: pic_width:  %u mbs", (unsigned) m_Width);  DEBUGLOG("H.264 SPS: pic_height: %u mbs", (unsigned) m_Height);  DEBUGLOG("H.264 SPS: frame only flag: %d", frame_mbs_only);  m_Width  *= 16;  m_Height *= 16 * (2-frame_mbs_only);  if (!frame_mbs_only)  {//.........这里部分代码省略.........
开发者ID:MichaelAnders,项目名称:vdr-plugin-vnsiserver,代码行数:101,


示例27: DEBUGLOG

cLiveReceiver::~cLiveReceiver(){  DEBUGLOG("Killing live receiver");}
开发者ID:7floor,项目名称:xbmc-pvr-addons,代码行数:4,



注:本文中的DEBUGLOG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DEBUGLVL函数代码示例
C++ DEBUGFUNC函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。