MediaClient: IDs should be signed integers

* It's very important to use a negative value to identify
non valid or uninitialized connections. Additionally, it's preferred
to don't interfere with media_kit types as long as the framework use
it in the backend.
This commit is contained in:
Dario Casalinuovo
2017-04-14 17:28:35 +02:00
parent 3431d8f20e
commit 0cc5ecb8ca
3 changed files with 5 additions and 4 deletions
@@ -13,10 +13,11 @@
namespace BPrivate { namespace media {
typedef uint64 media_client_id;
typedef int64 media_client_id;
typedef int64 media_connection_id;
typedef uint64 media_client_kinds;
typedef uint64 media_connection_kinds;
typedef uint64 media_connection_id;
enum media_client_kind {
+1 -1
View File
@@ -78,7 +78,7 @@ public:
BMediaClient::BMediaClient(const char* name,
media_type type, media_client_kinds kinds)
:
fLastID(0)
fLastID(-1)
{
CALLED();
@@ -21,7 +21,7 @@ BMediaConnection::BMediaConnection(media_connection_kinds kinds)
CALLED();
fConnection.kinds = kinds;
fConnection.id = 0;
fConnection.id = -1;
//fConnection.client = media_client::null;
}