1 /*********************************************************************** 2 * Copyright (c) 2002 Marcus Overhagen. All Rights Reserved. 3 * This file may be used under the terms of the OpenBeOS License. 4 * 5 * The object returned by BMediaRoster's 6 * BTimeSource * MakeTimeSourceFor(const media_node & for_node); 7 * 8 ***********************************************************************/ 9 #ifndef _TIME_SOURCE_OBJECT_H_ 10 #define _TIME_SOURCE_OBJECT_H_ 11 12 #include <TimeSource.h> 13 14 namespace BPrivate { namespace media { 15 16 class TimeSourceObject : public BTimeSource 17 { 18 public: 19 TimeSourceObject(media_node_id id); 20 21 virtual status_t SnoozeUntil( 22 bigtime_t performance_time, 23 bigtime_t with_latency = 0, 24 bool retry_signals = false); 25 26 protected: 27 virtual status_t TimeSourceOp( 28 const time_source_op_info & op, 29 void * _reserved); 30 31 virtual BMediaAddOn* AddOn( 32 int32 * internal_id) const; 33 34 // override from BMediaNode 35 virtual status_t DeleteHook(BMediaNode * node); 36 }; 37 38 class SystemTimeSourceObject : public TimeSourceObject 39 { 40 public: 41 SystemTimeSourceObject(media_node_id id); 42 43 virtual status_t SnoozeUntil( 44 bigtime_t performance_time, 45 bigtime_t with_latency = 0, 46 bool retry_signals = false); 47 48 protected: 49 // override from BMediaNode 50 virtual status_t DeleteHook(BMediaNode * node); 51 52 }; 53 54 } } using namespace BPrivate::media; 55 56 #endif 57