Hello. As far as I understand live555 keep track the created 'objects' in internal containers so my guess was it is possible to iterate over that containers.
What I need is to enumerate all rtspclients. According to this comment // A data structure for looking up a Medium by its string name. // (It is used only to implement "Medium", but we make it visible here, in case developers want to use it to iterate over // the whole set of "Medium" objects that we've created.) I used MediaLookupTable and my 'environment' pointer: MediaLookupTable* ptable = MediaLookupTable::ourMedia(*pliveenvironment); HashTable const& objects = ptable->getTable(); HashTable::Iterator* piterator = HashTable::Iterator::create(objects); MediaSession* pmediasession; vector<MediaSession*> clients; // put here all found clients char const* key; while ( (pmediasession = (MediaSession*)piterator->next(key)) != NULL ) if (pmediasession->isRTSPClient()) clients.push_back(pmediasession); // if it is RTSPClient put it to vector delete piterator; This works, but later I noticed a memory leak in MediaLookupTable::ourMedia: MediaLookupTable* MediaLookupTable::ourMedia(UsageEnvironment& env) { _Tables* ourTables = _Tables::getOurTables(env); if (ourTables->mediaTable == NULL) { // Create a new table to record the media that are to be created in // this environment: ourTables->mediaTable = new MediaLookupTable(env); } return ourTables->mediaTable; } My ptable pointer allocated in MediaLookupTable::ourMedia but never deleted, and I can't delete it myself - the destructor is protected. So, I think I am doing something wrong. Maybe another way exists to enumerate all specific objects? WBR
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel