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:
@@ -13,10 +13,11 @@
|
|||||||
namespace BPrivate { namespace media {
|
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_client_kinds;
|
||||||
typedef uint64 media_connection_kinds;
|
typedef uint64 media_connection_kinds;
|
||||||
typedef uint64 media_connection_id;
|
|
||||||
|
|
||||||
|
|
||||||
enum media_client_kind {
|
enum media_client_kind {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
BMediaClient::BMediaClient(const char* name,
|
BMediaClient::BMediaClient(const char* name,
|
||||||
media_type type, media_client_kinds kinds)
|
media_type type, media_client_kinds kinds)
|
||||||
:
|
:
|
||||||
fLastID(0)
|
fLastID(-1)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ BMediaConnection::BMediaConnection(media_connection_kinds kinds)
|
|||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
fConnection.kinds = kinds;
|
fConnection.kinds = kinds;
|
||||||
fConnection.id = 0;
|
fConnection.id = -1;
|
||||||
//fConnection.client = media_client::null;
|
//fConnection.client = media_client::null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user