xref: /haiku/src/kits/media/TimeSourceObjectManager.h (revision e6b30aee0fd7a23d6a6baab9f3718945a0cd838a)
1 /*
2  * Copyright (c) 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 "TMap.h"
10 
11 class BLocker;
12 
13 
14 namespace BPrivate {
15 namespace media {
16 
17 class TimeSourceObjectManager {
18 public:
19 	TimeSourceObjectManager();
20 	~TimeSourceObjectManager();
21 
22 	BTimeSource *GetTimeSource(const media_node &node);
23 	void ObjectDeleted(BTimeSource *timesource);
24 
25 private:
26 	Map<media_node_id, BTimeSource *> *fMap;
27 	BLocker *fLock;
28 };
29 
30 } // namespace media
31 } // namespace BPrivate
32 
33 extern BPrivate::media::TimeSourceObjectManager *_TimeSourceObjectManager;
34 
35 #endif	// _TIME_SOURCE_OBJECT_MANAGER_H_
36