1287f7492Sbeveloper /*********************************************************************** 2287f7492Sbeveloper * Copyright (c) 2002 Marcus Overhagen. All Rights Reserved. 3287f7492Sbeveloper * This file may be used under the terms of the OpenBeOS License. 4287f7492Sbeveloper * 5287f7492Sbeveloper * The object returned by BMediaRoster's 6287f7492Sbeveloper * BTimeSource * MakeTimeSourceFor(const media_node & for_node); 7287f7492Sbeveloper * 8287f7492Sbeveloper ***********************************************************************/ 9287f7492Sbeveloper #ifndef _TIME_SOURCE_OBJECT_H_ 10287f7492Sbeveloper #define _TIME_SOURCE_OBJECT_H_ 11287f7492Sbeveloper 12287f7492Sbeveloper #include <TimeSource.h> 13287f7492Sbeveloper 14287f7492Sbeveloper namespace BPrivate { namespace media { 15287f7492Sbeveloper 16287f7492Sbeveloper class TimeSourceObject : public BTimeSource 17287f7492Sbeveloper { 18287f7492Sbeveloper public: 19*835140c8Sbeveloper TimeSourceObject(media_node_id id); 20287f7492Sbeveloper 21287f7492Sbeveloper virtual status_t SnoozeUntil( 22287f7492Sbeveloper bigtime_t performance_time, 23287f7492Sbeveloper bigtime_t with_latency = 0, 24287f7492Sbeveloper bool retry_signals = false); 25*835140c8Sbeveloper 26287f7492Sbeveloper protected: 27287f7492Sbeveloper virtual status_t TimeSourceOp( 28287f7492Sbeveloper const time_source_op_info & op, 29287f7492Sbeveloper void * _reserved); 30287f7492Sbeveloper 31287f7492Sbeveloper virtual BMediaAddOn* AddOn( 32287f7492Sbeveloper int32 * internal_id) const; 33287f7492Sbeveloper 34*835140c8Sbeveloper // override from BMediaNode 35*835140c8Sbeveloper virtual status_t DeleteHook(BMediaNode * node); 36*835140c8Sbeveloper }; 37*835140c8Sbeveloper 38*835140c8Sbeveloper class SystemTimeSourceObject : public TimeSourceObject 39*835140c8Sbeveloper { 40*835140c8Sbeveloper public: 41*835140c8Sbeveloper SystemTimeSourceObject(media_node_id id); 42*835140c8Sbeveloper 43*835140c8Sbeveloper virtual status_t SnoozeUntil( 44*835140c8Sbeveloper bigtime_t performance_time, 45*835140c8Sbeveloper bigtime_t with_latency = 0, 46*835140c8Sbeveloper bool retry_signals = false); 47*835140c8Sbeveloper 48*835140c8Sbeveloper protected: 49*835140c8Sbeveloper // override from BMediaNode 50*835140c8Sbeveloper virtual status_t DeleteHook(BMediaNode * node); 51*835140c8Sbeveloper 52287f7492Sbeveloper }; 53287f7492Sbeveloper 54287f7492Sbeveloper } } using namespace BPrivate::media; 55287f7492Sbeveloper 56287f7492Sbeveloper #endif 57