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 15 class BTimeSource; 16 17 18 namespace BPrivate { 19 namespace media { 20 21 22 class TimeSourceObjectManager : BLocker { 23 public: 24 TimeSourceObjectManager(); 25 ~TimeSourceObjectManager(); 26 27 BTimeSource* GetTimeSource(const media_node& node); 28 void ObjectDeleted(BTimeSource* timeSource); 29 30 private: 31 typedef std::map<media_node_id, BTimeSource*> NodeMap; 32 33 NodeMap fMap; 34 }; 35 36 37 extern TimeSourceObjectManager* gTimeSourceObjectManager; 38 39 40 } // namespace media 41 } // namespace BPrivate 42 43 44 using BPrivate::media::gTimeSourceObjectManager; 45 46 47 #endif // _TIME_SOURCE_OBJECT_MANAGER_H_ 48