1/* 2 * Copyright 2002 Marcus Overhagen. All Rights Reserved. 3 * This file may be used under the terms of the MIT License. 4 */ 5#ifndef TIME_SOURCE_OBJECT_MANAGER_H 6#define TIME_SOURCE_OBJECT_MANAGER_H 7 8 9#include <map> 10 11#include <Locker.h> 12#include <MediaDefs.h> 13 14 15class BTimeSource; 16 17 18namespace BPrivate { 19namespace media { 20 21 22class TimeSourceObjectManager : BLocker { 23public: 24 TimeSourceObjectManager(); 25 ~TimeSourceObjectManager(); 26 27 BTimeSource* GetTimeSource(const media_node& node); 28 void ObjectDeleted(BTimeSource* timeSource); 29 30private: 31 typedef std::map<media_node_id, BTimeSource*> NodeMap; 32 33 NodeMap fMap; 34}; 35 36 37extern TimeSourceObjectManager* gTimeSourceObjectManager; 38 39 40} // namespace media 41} // namespace BPrivate 42 43 44using BPrivate::media::gTimeSourceObjectManager; 45 46 47#endif // _TIME_SOURCE_OBJECT_MANAGER_H_ 48