2003-03-12 02:19:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2003 Marcus Overhagen.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* This file may be used under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MEDIA_MISC_H_
|
|
|
|
#define _MEDIA_MISC_H_
|
|
|
|
|
|
|
|
#define IS_INVALID_NODE(_node) ((_node).node <= 0 || (_node).port <= 0)
|
|
|
|
#define IS_INVALID_NODEID(_id) ((_id) <= 0)
|
|
|
|
#define IS_INVALID_SOURCE(_src) ((_src).port <= 0)
|
|
|
|
#define IS_INVALID_DESTINATION(_dest) ((_dest).port <= 0)
|
|
|
|
|
2003-03-14 14:10:11 +00:00
|
|
|
#define NODE_UNREGISTERED_ID -2
|
|
|
|
|
2003-05-25 23:59:16 +00:00
|
|
|
#define BAD_MEDIA_SERVER_PORT -222
|
|
|
|
#define BAD_MEDIA_ADDON_SERVER_PORT -444
|
|
|
|
|
2003-03-15 01:59:10 +00:00
|
|
|
#define SHADOW_TIMESOURCE_CONTROL_PORT -333
|
2003-03-23 01:11:33 +00:00
|
|
|
#define IS_SHADOW_TIMESOURCE(_node) ((_node).node > 0 && (_node).port == SHADOW_TIMESOURCE_CONTROL_PORT)
|
|
|
|
|
|
|
|
#define SYSTEM_TIMESOURCE_CONTROL_PORT -666
|
|
|
|
#define IS_SYSTEM_TIMESOURCE(_node) ((_node).node > 0 && (_node).port == SYSTEM_TIMESOURCE_CONTROL_PORT)
|
2003-03-15 01:59:10 +00:00
|
|
|
|
2003-05-25 21:16:53 +00:00
|
|
|
#define NODE_KIND_USER_MASK 0x00000000FFFFFFFFLL
|
|
|
|
#define NODE_KIND_COMPARE_MASK 0x000000007FFFFFFFLL
|
|
|
|
#define NODE_KIND_NO_REFCOUNTING 0x0000000080000000LL
|
|
|
|
#define NODE_KIND_SHADOW_TIMESOURCE 0x0000000100000000LL
|
|
|
|
#define NODE_KIND_SYSTEM_TIMESOURCE 0x0000000200000000LL
|
2003-03-15 01:59:10 +00:00
|
|
|
|
2003-03-12 02:34:06 +00:00
|
|
|
#define ROUND_UP_TO_PAGE(size) (((size) + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1))
|
|
|
|
|
2003-03-14 14:10:11 +00:00
|
|
|
namespace BPrivate { namespace media {
|
|
|
|
extern team_id team;
|
|
|
|
} } // BPrivate::media
|
|
|
|
|
|
|
|
using namespace BPrivate::media;
|
|
|
|
|
2003-03-12 02:19:34 +00:00
|
|
|
#endif
|