예제 #1
0
RTSPMediaDesc::~RTSPMediaDesc()
{
    delete m_pFileHeader;
    clearStreamList();
    delete m_streams;
    HX_RELEASE(m_pContext);
}
예제 #2
0
/*
	determine which tags should be saved to history database.
*/
void CInMemoryBuffer::buildStreamList()
{
	RTK_CURSOR hNode;
	RTK_CURSOR hGroup;
	RTK_CURSOR hTag;
	PCRTK_TAG  pTag;
	TAG_NAME tn;
	char nodeName[rtkm_node_key_length + 1];
	
	GetPrivateProfileString(
		"PMC",
		"ServerName",
		"LocalServer",
		nodeName,
		sizeof(nodeName),
		get_config_file()
		);
	CNodeName nodeKey(nodeName);

	//utils_debug("wlock 3\n");
	WriteLock();
	
	if(!lock_rtdb(__false, 100)){
		//utils_debug("release 6\n");
		Release();
		return;
	}
	
	// clear list
	clearStreamList();
	
	hNode = open_node(nodeKey);
	if(hNode){
		hGroup = cursor_open_first_subitem(hNode);
		while(!cursor_is_end(hGroup)){
			hTag = cursor_open_first_subitem(hGroup);
			while(!cursor_is_end(hTag)){
				pTag = (PCRTK_TAG)cursor_get_item(hTag);
				if(pTag->s.Flags & TF_SaveToHistory){
					tn.node = pTag->node;
					tn.sname.group = pTag->group;
					tn.sname.tag = pTag->key;
					addTag(&tn);
				}
				cursor_move_next(hTag);
			}
			close_handle(hTag);
			cursor_move_next(hGroup);
		}
		close_handle(hGroup);
	}

	unlock_rtdb();
	
	//utils_debug("release 7\n");
	Release();
}
예제 #3
0
CInMemoryBuffer::~CInMemoryBuffer()
{
	clearStreamList();
	delete theLock;
	theLock = 0;
}