media: fix 64-bit debug build
Change-Id: Ie8c19fc5f067da9973cc52ec4c787a4ad36e390c Reviewed-on: https://review.haiku-os.org/c/haiku/+/2044 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
0749734769
commit
b073975e18
@@ -174,7 +174,7 @@ BMediaNode::Release()
|
||||
// Only addons needs the configuration to be saved.
|
||||
int32 id;
|
||||
if (AddOn(&id) != NULL) {
|
||||
TRACE("BMediaNode::Release() saving node %ld"
|
||||
TRACE("BMediaNode::Release() saving node %" B_PRId32
|
||||
" configuration\n", fNodeID);
|
||||
MediaRosterEx(roster)->SaveNodeConfiguration(this);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ BMediaNode::TimeSource() const
|
||||
if (fTimeSource != 0)
|
||||
return fTimeSource;
|
||||
|
||||
TRACE("BMediaNode::TimeSource node %ld enter\n", ID());
|
||||
TRACE("BMediaNode::TimeSource node %" B_PRId32 " enter\n", ID());
|
||||
|
||||
// If the node doesn't have a time source object, we need to create one.
|
||||
// If the node is still unregistered, we can't call MakeTimeSourceFor(),
|
||||
@@ -266,7 +266,7 @@ BMediaNode::TimeSource() const
|
||||
fTimeSource->AddMe(self);
|
||||
}
|
||||
|
||||
TRACE("BMediaNode::TimeSource node %ld leave\n", ID());
|
||||
TRACE("BMediaNode::TimeSource node %" B_PRId32 " leave\n", ID());
|
||||
|
||||
return fTimeSource;
|
||||
}
|
||||
@@ -335,8 +335,8 @@ BMediaNode::TimerExpired(bigtime_t notifyPoint, int32 cookie, status_t error)
|
||||
{
|
||||
CALLED();
|
||||
if (write_port((port_id)cookie, 0, &error, sizeof(error)) < 0) {
|
||||
TRACE("BMediaNode::TimerExpired: error writing port" B_PRId32
|
||||
", at notifyPoint" B_PRId64 "\n", cookie, notifyPoint);
|
||||
TRACE("BMediaNode::TimerExpired: error writing port %" B_PRId32
|
||||
", at notifyPoint %" B_PRId64 "\n", cookie, notifyPoint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,8 +381,8 @@ BMediaNode::WaitForMessage(bigtime_t waitUntil, uint32 flags,
|
||||
return error;
|
||||
}
|
||||
|
||||
TRACE("BMediaNode::WaitForMessage request is: %#lx, node %ld, this %p\n",
|
||||
message, fNodeID, this);
|
||||
TRACE("BMediaNode::WaitForMessage request is: %#" B_PRIx32 ", node %"
|
||||
B_PRId32 ", this %p\n", message, fNodeID, this);
|
||||
|
||||
if (message == GENERAL_PURPOSE_WAKEUP)
|
||||
return B_OK;
|
||||
@@ -567,7 +567,8 @@ BMediaNode::SetTimeSource(BTimeSource* time_source)
|
||||
status_t
|
||||
BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
{
|
||||
TRACE("BMediaNode::HandleMessage %#lx, node %ld\n", message, fNodeID);
|
||||
TRACE("BMediaNode::HandleMessage %#" B_PRIx32", node %" B_PRId32 "\n",
|
||||
message, fNodeID);
|
||||
switch (message) {
|
||||
case NODE_FINAL_RELEASE:
|
||||
{
|
||||
@@ -591,7 +592,8 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
{
|
||||
const node_start_command* command
|
||||
= static_cast<const node_start_command*>(data);
|
||||
TRACE("BMediaNode::HandleMessage NODE_START, node %ld\n", fNodeID);
|
||||
TRACE("BMediaNode::HandleMessage NODE_START, node %" B_PRId32 "\n",
|
||||
fNodeID);
|
||||
Start(command->performance_time);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -600,7 +602,8 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
{
|
||||
const node_stop_command* command
|
||||
= static_cast<const node_stop_command*>(data);
|
||||
TRACE("BMediaNode::HandleMessage NODE_STOP, node %ld\n", fNodeID);
|
||||
TRACE("BMediaNode::HandleMessage NODE_STOP, node %" B_PRId32 "\n",
|
||||
fNodeID);
|
||||
Stop(command->performance_time, command->immediate);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -609,7 +612,8 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
{
|
||||
const node_seek_command* command
|
||||
= static_cast<const node_seek_command*>(data);
|
||||
TRACE("BMediaNode::HandleMessage NODE_SEEK, node %ld\n", fNodeID);
|
||||
TRACE("BMediaNode::HandleMessage NODE_SEEK, node %" B_PRId32 "\n",
|
||||
fNodeID);
|
||||
Seek(command->media_time, command->performance_time);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -619,7 +623,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
const node_set_run_mode_command* command
|
||||
= static_cast<const node_set_run_mode_command*>(data);
|
||||
TRACE("BMediaNode::HandleMessage NODE_SET_RUN_MODE,"
|
||||
" node %ld\n", fNodeID);
|
||||
" node %" B_PRId32 "\n", fNodeID);
|
||||
// Need to change PRODUCER_SET_RUN_MODE_DELAY
|
||||
fRunMode = command->mode;
|
||||
SetRunMode(fRunMode);
|
||||
@@ -631,7 +635,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
const node_time_warp_command* command
|
||||
= static_cast<const node_time_warp_command*>(data);
|
||||
TRACE("BMediaNode::HandleMessage NODE_TIME_WARP,"
|
||||
" node %ld\n", fNodeID);
|
||||
" node %" B_PRId32 "\n", fNodeID);
|
||||
TimeWarp(command->at_real_time, command->to_performance_time);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -639,7 +643,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
case NODE_PREROLL:
|
||||
{
|
||||
TRACE("BMediaNode::HandleMessage NODE_PREROLL, "
|
||||
" node %ld\n", fNodeID);
|
||||
" node %" B_PRId32 "\n", fNodeID);
|
||||
Preroll();
|
||||
return B_OK;
|
||||
}
|
||||
@@ -649,7 +653,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
const node_roll_command* command
|
||||
= static_cast<const node_roll_command*>(data);
|
||||
|
||||
TRACE("BMediaNode::HandleMessage NODE_ROLL, node %ld\n",
|
||||
TRACE("BMediaNode::HandleMessage NODE_ROLL, node %" B_PRId32 "\n",
|
||||
fNodeID);
|
||||
|
||||
if (command->seek_media_time != B_INFINITE_TIMEOUT)
|
||||
@@ -667,8 +671,8 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
= static_cast<const node_sync_to_request*>(data);
|
||||
node_sync_to_reply reply;
|
||||
|
||||
TRACE("BMediaNode::HandleMessage NODE_SYNC_TO, node %ld\n",
|
||||
fNodeID);
|
||||
TRACE("BMediaNode::HandleMessage NODE_SYNC_TO, node %" B_PRId32
|
||||
"\n", fNodeID);
|
||||
|
||||
// If AddTimer return an error the caller will know that the node
|
||||
// doesn't support this feature or there was a problem when adding
|
||||
@@ -687,7 +691,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
= static_cast<const node_set_timesource_command*>(data);
|
||||
|
||||
TRACE("BMediaNode::HandleMessage NODE_SET_TIMESOURCE,"
|
||||
" node %ld, timesource %ld enter\n",
|
||||
" node %" B_PRId32 ", timesource %" B_PRId32 " enter\n",
|
||||
fNodeID, command->timesource_id);
|
||||
|
||||
fTimeSourceID = command->timesource_id;
|
||||
@@ -707,8 +711,9 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
fTimeSource = TimeSource();
|
||||
SetTimeSource(fTimeSource);
|
||||
|
||||
TRACE("BMediaNode::HandleMessage NODE_SET_TIMESOURCE, node %ld,"
|
||||
"timesource %ld leave\n", fNodeID, command->timesource_id);
|
||||
TRACE("BMediaNode::HandleMessage NODE_SET_TIMESOURCE, node %"
|
||||
B_PRId32 ", timesource %" B_PRId32 " leave\n", fNodeID,
|
||||
command->timesource_id);
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
@@ -719,7 +724,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
= static_cast<const node_get_timesource_request*>(data);
|
||||
|
||||
TRACE("BMediaNode::HandleMessage NODE_GET_TIMESOURCE,"
|
||||
" node %ld\n", fNodeID);
|
||||
" node %" B_PRId32 "\n", fNodeID);
|
||||
|
||||
node_get_timesource_reply reply;
|
||||
reply.timesource_id = fTimeSourceID;
|
||||
@@ -733,7 +738,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
(const node_get_attributes_for_request*) data;
|
||||
|
||||
TRACE("BMediaNode::HandleMessage NODE_GET_ATTRIBUTES_FOR,"
|
||||
"node %ld\n", fNodeID);
|
||||
"node %" B_PRId32 "\n", fNodeID);
|
||||
|
||||
node_get_attributes_for_reply reply;
|
||||
|
||||
@@ -768,7 +773,7 @@ BMediaNode::HandleMessage(int32 message, const void* data, size_t size)
|
||||
const node_request_completed_command* command
|
||||
= static_cast<const node_request_completed_command*>(data);
|
||||
TRACE("BMediaNode::HandleMessage NODE_REQUEST_COMPLETED,"
|
||||
" node %ld\n", fNodeID);
|
||||
" node %" B_PRId32 "\n", fNodeID);
|
||||
RequestCompleted(command->info);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -786,8 +791,8 @@ BMediaNode::HandleBadMessage(int32 code, const void* buffer, size_t size)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
TRACE("BMediaNode::HandleBadMessage: code %#08lx, buffer %p, size %ld\n",
|
||||
code, buffer, size);
|
||||
TRACE("BMediaNode::HandleBadMessage: code %#08" B_PRIx32 ", buffer %p, size %"
|
||||
B_PRIuSIZE "\n", code, buffer, size);
|
||||
if (code < NODE_MESSAGE_START || code > TIMESOURCE_MESSAGE_END) {
|
||||
ERROR("BMediaNode::HandleBadMessage: unknown code!\n");
|
||||
} else {
|
||||
@@ -804,7 +809,8 @@ BMediaNode::HandleBadMessage(int32 code, const void* buffer, size_t size)
|
||||
void
|
||||
BMediaNode::AddNodeKind(uint64 kind)
|
||||
{
|
||||
TRACE("BMediaNode::AddNodeKind: node %ld, this %p\n", fNodeID, this);
|
||||
TRACE("BMediaNode::AddNodeKind: node %" B_PRId32 ", this %p\n", fNodeID,
|
||||
this);
|
||||
fKinds |= kind;
|
||||
}
|
||||
|
||||
@@ -927,7 +933,8 @@ BMediaNode &BMediaNode::operator=(const BMediaNode &clone)
|
||||
void
|
||||
BMediaNode::_InitObject(const char* name, media_node_id id, uint64 kinds)
|
||||
{
|
||||
TRACE("BMediaNode::_InitObject: nodeid %ld, this %p\n", id, this);
|
||||
TRACE("BMediaNode::_InitObject: nodeid %" B_PRId32 ", this %p\n", id,
|
||||
this);
|
||||
|
||||
fNodeID = id;
|
||||
fRefCount = 1;
|
||||
@@ -957,8 +964,8 @@ BMediaNode::_InitObject(const char* name, media_node_id id, uint64 kinds)
|
||||
|
||||
BMediaNode::BMediaNode(const char* name, media_node_id id, uint32 kinds)
|
||||
{
|
||||
TRACE("BMediaNode::BMediaNode: name '%s', nodeid %ld, kinds %#lx\n",
|
||||
name, id, kinds);
|
||||
TRACE("BMediaNode::BMediaNode: name '%s', nodeid %" B_PRId32 ", kinds %#"
|
||||
B_PRIx32 "\n", name, id, kinds);
|
||||
_InitObject(name, id, kinds);
|
||||
}
|
||||
|
||||
|
||||
@@ -2247,14 +2247,14 @@ BMediaRoster::UnregisterNode(BMediaNode* node)
|
||||
return B_OK;
|
||||
}
|
||||
if (node->ID() == NODE_UNREGISTERED_ID) {
|
||||
PRINT(1, "Warning: BMediaRoster::UnregisterNode: node id %ld, name "
|
||||
"'%s' already unregistered\n", node->ID(), node->Name());
|
||||
PRINT(1, "Warning: BMediaRoster::UnregisterNode: node id %" B_PRId32
|
||||
", name '%s' already unregistered\n", node->ID(), node->Name());
|
||||
return B_OK;
|
||||
}
|
||||
if (node->fRefCount != 0) {
|
||||
PRINT(1, "Warning: BMediaRoster::UnregisterNode: node id %ld, name "
|
||||
"'%s' has local reference count of %ld\n", node->ID(), node->Name(),
|
||||
node->fRefCount);
|
||||
PRINT(1, "Warning: BMediaRoster::UnregisterNode: node id %" B_PRId32
|
||||
", name '%s' has local reference count of %" B_PRId32 "\n",
|
||||
node->ID(), node->Name(), node->fRefCount);
|
||||
// no return here, we continue and unregister!
|
||||
}
|
||||
|
||||
|
||||
@@ -187,9 +187,9 @@ NodeManager::RegisterNode(media_addon_id addOnID, int32 flavorID,
|
||||
fNextNodeID++;
|
||||
|
||||
TRACE("NodeManager::RegisterNode: node %" B_PRId32 ", addon_id %" B_PRId32
|
||||
", flavor_id %" B_PRId32 ", name \"%s\", kinds %#Lx, port %" B_PRId32
|
||||
", team %" B_PRId32 "\n", *_nodeID, addOnID, flavorID, name, kinds,
|
||||
port, team);
|
||||
", flavor_id %" B_PRId32 ", name \"%s\", kinds %#" B_PRIx64", port %"
|
||||
B_PRId32 ", team %" B_PRId32 "\n", *_nodeID, addOnID, flavorID, name,
|
||||
kinds, port, team);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,8 @@ NodeManager::GetClone(node_type type, team_id team, media_node* node,
|
||||
ASSERT(id == node->node);
|
||||
|
||||
TRACE("NodeManager::GetClone leave: node id %" B_PRId32 ", node port %"
|
||||
B_PRId32 ", node kind %#lx\n", node->node, node->port, node->kind);
|
||||
B_PRId32 ", node kind %#" B_PRIx64 "\n", node->node, node->port,
|
||||
node->kind);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -143,13 +143,13 @@ DumpFlavorInfo(const flavor_info* info)
|
||||
{
|
||||
printf(" name = %s\n", info->name);
|
||||
printf(" info = %s\n", info->info);
|
||||
printf(" internal_id = %ld\n", info->internal_id);
|
||||
printf(" possible_count = %ld\n", info->possible_count);
|
||||
printf(" flavor_flags = 0x%lx", info->flavor_flags);
|
||||
printf(" internal_id = %" B_PRId32 "\n", info->internal_id);
|
||||
printf(" possible_count = %" B_PRId32 "\n", info->possible_count);
|
||||
printf(" flavor_flags = 0x%" B_PRIx32, info->flavor_flags);
|
||||
if (info->flavor_flags & B_FLAVOR_IS_GLOBAL) printf(" B_FLAVOR_IS_GLOBAL");
|
||||
if (info->flavor_flags & B_FLAVOR_IS_LOCAL) printf(" B_FLAVOR_IS_LOCAL");
|
||||
printf("\n");
|
||||
printf(" kinds = 0x%Lx", info->kinds);
|
||||
printf(" kinds = 0x%" B_PRIx64, info->kinds);
|
||||
if (info->kinds & B_BUFFER_PRODUCER) printf(" B_BUFFER_PRODUCER");
|
||||
if (info->kinds & B_BUFFER_CONSUMER) printf(" B_BUFFER_CONSUMER");
|
||||
if (info->kinds & B_TIME_SOURCE) printf(" B_TIME_SOURCE");
|
||||
@@ -160,8 +160,8 @@ DumpFlavorInfo(const flavor_info* info)
|
||||
if (info->kinds & B_PHYSICAL_OUTPUT) printf(" B_PHYSICAL_OUTPUT");
|
||||
if (info->kinds & B_SYSTEM_MIXER) printf(" B_SYSTEM_MIXER");
|
||||
printf("\n");
|
||||
printf(" in_format_count = %ld\n", info->in_format_count);
|
||||
printf(" out_format_count = %ld\n", info->out_format_count);
|
||||
printf(" in_format_count = %" B_PRId32 "\n", info->in_format_count);
|
||||
printf(" out_format_count = %" B_PRId32 "\n", info->out_format_count);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -441,7 +441,8 @@ MediaAddonServer::_ScanAddOnFlavors(BMediaAddOn* addon)
|
||||
{
|
||||
ASSERT(addon->AddonID() > 0);
|
||||
|
||||
TRACE("MediaAddonServer::_ScanAddOnFlavors: id %ld\n", addon->AddonID());
|
||||
TRACE("MediaAddonServer::_ScanAddOnFlavors: id %" B_PRId32 "\n",
|
||||
addon->AddonID());
|
||||
|
||||
// cache the media_addon_id in a local variable to avoid
|
||||
// calling BMediaAddOn::AddonID() too often
|
||||
@@ -457,7 +458,8 @@ MediaAddonServer::_ScanAddOnFlavors(BMediaAddOn* addon)
|
||||
int32 newFlavorCount = addon->CountFlavors();
|
||||
info.flavor_count = newFlavorCount;
|
||||
|
||||
TRACE("%ld old flavors, %ld new flavors\n", oldFlavorCount, newFlavorCount);
|
||||
TRACE("%" B_PRId32 " old flavors, %" B_PRId32 " new flavors\n",
|
||||
oldFlavorCount, newFlavorCount);
|
||||
|
||||
// during the first update (i == 0), the server removes old dormant_flavor_infos
|
||||
for (int i = 0; i < newFlavorCount; i++) {
|
||||
@@ -526,16 +528,19 @@ MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode)
|
||||
return;
|
||||
}
|
||||
|
||||
TRACE("MediaAddonServer::_AddOnAdded: loading addon %ld now...\n", id);
|
||||
TRACE("MediaAddonServer::_AddOnAdded: loading addon %" B_PRId32 " now..."
|
||||
"\n", id);
|
||||
|
||||
BMediaAddOn* addon = gDormantNodeManager->GetAddOn(id);
|
||||
if (addon == NULL) {
|
||||
ERROR("MediaAddonServer::_AddOnAdded: failed to get add-on %s\n", path);
|
||||
ERROR("MediaAddonServer::_AddOnAdded: failed to get add-on %s\n",
|
||||
path);
|
||||
gDormantNodeManager->UnregisterAddOn(id);
|
||||
return;
|
||||
}
|
||||
|
||||
TRACE("MediaAddonServer::_AddOnAdded: loading finished, id %ld\n", id);
|
||||
TRACE("MediaAddonServer::_AddOnAdded: loading finished, id %" B_PRId32
|
||||
"\n", id);
|
||||
|
||||
try {
|
||||
// put file's inode and addon's id into map
|
||||
@@ -565,7 +570,7 @@ MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode)
|
||||
info.wants_autostart = addon->WantsAutoStart();
|
||||
|
||||
if (info.wants_autostart)
|
||||
TRACE("add-on %ld WantsAutoStart!\n", id);
|
||||
TRACE("add-on %" B_PRId32 " WantsAutoStart!\n", id);
|
||||
|
||||
// During startup, first all add-ons are loaded, then all
|
||||
// nodes (flavors) representing physical inputs and outputs
|
||||
@@ -739,7 +744,8 @@ MediaAddonServer::_InstantiateAutostartFlavors(AddOnInfo& info)
|
||||
return;
|
||||
|
||||
for (int32 index = 0;; index++) {
|
||||
TRACE("trying autostart of node %ld, index %ld\n", info.id, index);
|
||||
TRACE("trying autostart of node %" B_PRId32 ", index %" B_PRId32 "\n",
|
||||
info.id, index);
|
||||
|
||||
BMediaNode* node;
|
||||
int32 internalID;
|
||||
|
||||
Reference in New Issue
Block a user