media_kit: Fix debug printf werrors
* When debugging was enabled in the media_kit those were causing the build to fail complaining about werrors.
This commit is contained in:
@@ -328,9 +328,9 @@ BBufferConsumer::SendLatencyChange(const media_source& source,
|
||||
command.latency = newLatency;
|
||||
command.flags = flags;
|
||||
|
||||
TRACE("###### BBufferConsumer::SendLatencyChange: latency from %ld/%ld to "
|
||||
"%ld/%ld changed to %Ld\n", source.port, source.id, destination.port,
|
||||
destination.id, newLatency);
|
||||
TRACE("###### BBufferConsumer::SendLatencyChange: latency from %d/%d to "
|
||||
"%d/%d changed to %" B_PRId64 "\n", source.port, source.id,
|
||||
destination.port, destination.id, newLatency);
|
||||
|
||||
return SendToPort(source.port, PRODUCER_LATENCY_CHANGED, &command,
|
||||
sizeof(command));
|
||||
|
||||
@@ -142,7 +142,10 @@ BBufferProducer::HandleMessage(int32 message, const void* data, size_t size)
|
||||
// when changing this, also change NODE_SET_RUN_MODE
|
||||
fDelay = command->delay;
|
||||
fRunMode = command->mode;
|
||||
TRACE("PRODUCER_SET_RUN_MODE_DELAY: fDelay now %Ld\n", fDelay);
|
||||
|
||||
TRACE("PRODUCER_SET_RUN_MODE_DELAY: fDelay now %" B_PRId64 "\n",
|
||||
fDelay);
|
||||
|
||||
SetRunMode(fRunMode);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ ContinuousMessageFilter::Filter(BMessage *message, BHandler **target)
|
||||
value[i] = (float)(slider->ValueFor(i) / 1000.0);
|
||||
}
|
||||
|
||||
TRACE("ContinuousMessageFilter::Filter: update view %s, %ld "
|
||||
TRACE("ContinuousMessageFilter::Filter: update view %s, %d "
|
||||
"channels\n", fControl->Name(), fParameter.CountChannels());
|
||||
|
||||
if (fParameter.SetValue((void *)value, sizeof(value),
|
||||
@@ -758,7 +758,7 @@ DiscreteMessageFilter::Filter(BMessage *message, BHandler **target)
|
||||
popUp->SelectedOption(NULL, &value);
|
||||
}
|
||||
|
||||
TRACE("DiscreteMessageFilter::Filter: update view %s, value = %ld\n", control->Name(), value);
|
||||
TRACE("DiscreteMessageFilter::Filter: update view %s, value = %d\n", control->Name(), value);
|
||||
|
||||
if (fParameter.SetValue((void *)&value, sizeof(value), -1) < B_OK) {
|
||||
ERROR("DiscreteMessageFilter::Filter: Could not set parameter value for %p\n", &fParameter);
|
||||
|
||||
@@ -214,7 +214,7 @@ BMediaFile::TrackAt(int32 index)
|
||||
return NULL;
|
||||
}
|
||||
if (fTrackList[index] == NULL) {
|
||||
TRACE("BMediaFile::TrackAt, creating new track for index %ld\n", index);
|
||||
TRACE("BMediaFile::TrackAt, creating new track for index %d\n", index);
|
||||
fTrackList[index] = new(std::nothrow) BMediaTrack(fExtractor, index);
|
||||
TRACE("BMediaFile::TrackAt, new track is %p\n", fTrackList[index]);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ BMediaFile::ReleaseTrack(BMediaTrack* track)
|
||||
for (int32 i = 0; i < fTrackNum; i++) {
|
||||
if (fTrackList[i] == track) {
|
||||
TRACE("BMediaFile::ReleaseTrack, releasing track %p with index "
|
||||
"%ld\n", track, i);
|
||||
"%d\n", track, i);
|
||||
delete track;
|
||||
fTrackList[i] = NULL;
|
||||
return B_OK;
|
||||
@@ -255,7 +255,7 @@ BMediaFile::ReleaseAllTracks()
|
||||
for (int32 i = 0; i < fTrackNum; i++) {
|
||||
if (fTrackList[i]) {
|
||||
TRACE("BMediaFile::ReleaseAllTracks, releasing track %p with "
|
||||
"index %ld\n", fTrackList[i], i);
|
||||
"index %d\n", fTrackList[i], i);
|
||||
delete fTrackList[i];
|
||||
fTrackList[i] = NULL;
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ BMediaFormats::GetFormatFor(const media_format_description& description,
|
||||
strerror(status));
|
||||
return status;
|
||||
}
|
||||
TRACE("search for description family = %d, a = 0x%lx, b = 0x%lx\n",
|
||||
TRACE("search for description family = %d, a = 0x%ux, b = 0x%ux\n",
|
||||
description.family, description.u.misc.file_format,
|
||||
description.u.misc.codec);
|
||||
|
||||
|
||||
@@ -2215,11 +2215,11 @@ BMediaRoster::UnregisterNode(BMediaNode* node)
|
||||
if (node == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
TRACE("BMediaRoster::UnregisterNode %ld (%p)\n", node->ID(), node);
|
||||
TRACE("BMediaRoster::UnregisterNode %d (%p)\n", node->ID(), node);
|
||||
|
||||
if ((node->fKinds & NODE_KIND_NO_REFCOUNTING) !=0) {
|
||||
TRACE("BMediaRoster::UnregisterNode, trying to unregister reference "
|
||||
"counting disabled timesource, node %ld, port %ld, team %ld\n",
|
||||
"counting disabled timesource, node %d, port %d, team %d\n",
|
||||
node->ID(), node->ControlPort(), BPrivate::current_team());
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ BParameterWeb::ParameterAt(int32 index)
|
||||
groups.AddList(group->fGroups);
|
||||
}
|
||||
|
||||
TRACE("*** could not find parameter at %ld (count = %ld)\n", index,
|
||||
TRACE("*** could not find parameter at %d (count = %d)\n", index,
|
||||
CountParameters());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ PluginManager::CreateReader(Reader** reader, int32* streamCount,
|
||||
|
||||
if ((*reader)->Sniff(streamCount) == B_OK) {
|
||||
TRACE("PluginManager::CreateReader: Sniff success "
|
||||
"(%ld stream(s))\n", *streamCount);
|
||||
"(%d stream(s))\n", *streamCount);
|
||||
(*reader)->GetFileFormatInfo(mff);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -735,7 +735,7 @@ PluginManager::PutPlugin(MediaPlugin* plugin)
|
||||
if (pinfo->usecount == 0) {
|
||||
TRACE(" deleting %p\n", pinfo->plugin);
|
||||
delete pinfo->plugin;
|
||||
TRACE(" unloading add-on: %ld\n\n", pinfo->image);
|
||||
TRACE(" unloading add-on: %d\n\n", pinfo->image);
|
||||
unload_add_on(pinfo->image);
|
||||
fPluginList.RemoveCurrent();
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ SoundPlayNode::PrepareToConnect(const media_source& what,
|
||||
channel_count = *(uint32 *)&format->user_data[4];
|
||||
frame_rate = *(float *)&format->user_data[20];
|
||||
TRACE("SoundPlayNode::PrepareToConnect: found mixer info: "
|
||||
"channel_count %ld, frame_rate %.1f\n", channel_count, frame_rate);
|
||||
"channel_count %d, frame_rate %.1f\n", channel_count, frame_rate);
|
||||
}
|
||||
|
||||
media_format default_format;
|
||||
@@ -419,7 +419,8 @@ SoundPlayNode::Connect(status_t error, const media_source& source,
|
||||
// Do so, then make sure we get our events early enough.
|
||||
media_node_id id;
|
||||
FindLatencyFor(fOutput.destination, &fLatency, &id);
|
||||
TRACE("SoundPlayNode::Connect: downstream latency = %Ld\n", fLatency);
|
||||
TRACE("SoundPlayNode::Connect: downstream latency = %" B_PRId64 "\n",
|
||||
fLatency);
|
||||
|
||||
// reset our buffer duration, etc. to avoid later calculations
|
||||
bigtime_t duration = ((fOutput.format.u.raw_audio.buffer_size * 1000000LL)
|
||||
@@ -428,10 +429,11 @@ SoundPlayNode::Connect(status_t error, const media_source& source,
|
||||
* fOutput.format.u.raw_audio.channel_count))
|
||||
/ (int32)fOutput.format.u.raw_audio.frame_rate;
|
||||
SetBufferDuration(duration);
|
||||
TRACE("SoundPlayNode::Connect: buffer duration is %Ld\n", duration);
|
||||
TRACE("SoundPlayNode::Connect: buffer duration is %" B_PRId64 "\n",
|
||||
duration);
|
||||
|
||||
fInternalLatency = (3 * BufferDuration()) / 4;
|
||||
TRACE("SoundPlayNode::Connect: using %Ld as internal latency\n",
|
||||
TRACE("SoundPlayNode::Connect: using %" B_PRId64 " as internal latency\n",
|
||||
fInternalLatency);
|
||||
SetEventLatency(fLatency + fInternalLatency);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ BSoundPlayer::~BSoundPlayer()
|
||||
err = roster->Disconnect(fMediaOutput, fMediaInput);
|
||||
if (err != B_OK) {
|
||||
TRACE("BSoundPlayer::~BSoundPlayer: Error disconnecting nodes: "
|
||||
"%ld (%s)\n", err, strerror(err));
|
||||
"%d (%s)\n", err, strerror(err));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ BSoundPlayer::~BSoundPlayer()
|
||||
err = roster->ReleaseNode(fMediaInput.node);
|
||||
if (err != B_OK) {
|
||||
TRACE("BSoundPlayer::~BSoundPlayer: Error releasing input node: "
|
||||
"%ld (%s)\n", err, strerror(err));
|
||||
"%d (%s)\n", err, strerror(err));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ BSoundPlayer::Start()
|
||||
status_t err = roster->StartNode(fPlayerNode->Node(),
|
||||
fPlayerNode->TimeSource()->Now() + Latency() + 5000);
|
||||
if (err != B_OK) {
|
||||
TRACE("BSoundPlayer::Start: StartNode failed, %ld", err);
|
||||
TRACE("BSoundPlayer::Start: StartNode failed, %d", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -285,12 +285,12 @@ BSoundPlayer::Latency()
|
||||
bigtime_t latency;
|
||||
status_t err = roster->GetLatencyFor(fMediaOutput.node, &latency);
|
||||
if (err != B_OK) {
|
||||
TRACE("BSoundPlayer::Latency: GetLatencyFor failed %ld (%s)\n", err,
|
||||
TRACE("BSoundPlayer::Latency: GetLatencyFor failed %d (%s)\n", err,
|
||||
strerror(err));
|
||||
return 0;
|
||||
}
|
||||
|
||||
TRACE("BSoundPlayer::Latency: latency is %Ld\n", latency);
|
||||
TRACE("BSoundPlayer::Latency: latency is %" B_PRId64 "\n", latency);
|
||||
|
||||
return latency;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ BSoundPlayer::Preroll()
|
||||
|
||||
status_t err = roster->PrerollNode(fMediaOutput.node);
|
||||
if (err != B_OK) {
|
||||
TRACE("BSoundPlayer::Preroll: Error while PrerollNode: %ld (%s)\n",
|
||||
TRACE("BSoundPlayer::Preroll: Error while PrerollNode: %d (%s)\n",
|
||||
err, strerror(err));
|
||||
return err;
|
||||
}
|
||||
@@ -867,7 +867,7 @@ BSoundPlayer::_Init(const media_node* node,
|
||||
|
||||
_GetVolumeSlider();
|
||||
|
||||
TRACE("BSoundPlayer node %ld has timesource %ld\n",
|
||||
TRACE("BSoundPlayer node %d has timesource %d\n",
|
||||
fPlayerNode->Node().node, fPlayerNode->TimeSource()->Node().node);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ TimeSourceObject::TimeSourceObject(const media_node& node)
|
||||
BMediaNode("some timesource object", node.node, node.kind),
|
||||
BTimeSource(node.node)
|
||||
{
|
||||
TRACE("TimeSourceObject::TimeSourceObject enter, id = %ld\n", node.node);
|
||||
TRACE("TimeSourceObject::TimeSourceObject enter, id = %d\n", node.node);
|
||||
if (fControlPort > 0)
|
||||
delete_port(fControlPort);
|
||||
|
||||
|
||||
@@ -620,14 +620,15 @@ _event_queue_imp::GetStart_AfterTime(bigtime_t eventTime, bool inclusive)
|
||||
void
|
||||
_event_queue_imp::Dump() const
|
||||
{
|
||||
TRACE("fEventCount = 0x%x\n",(int)fEventCount);
|
||||
TRACE("fFirstEntry = 0x%x\n",(int)fFirstEntry);
|
||||
TRACE("fLastEntry = 0x%x\n",(int)fLastEntry);
|
||||
TRACE("fEventCount = %d\n", fEventCount);
|
||||
TRACE("fFirstEntry = 0x%p\n", (void*)fFirstEntry);
|
||||
TRACE("fLastEntry = 0x%p\n", (void*)fLastEntry);
|
||||
for (event_queue_entry *entry = fFirstEntry; entry; entry = entry->next) {
|
||||
TRACE("entry = 0x%x\n",(int)entry);
|
||||
TRACE(" entry.prev = 0x%x\n",(int)entry->prev);
|
||||
TRACE(" entry.next = 0x%x\n",(int)entry->next);
|
||||
TRACE(" entry.event.event_time = 0x%x\n",(int)entry->event.event_time);
|
||||
TRACE("entry = 0x%p\n", (void*)entry);
|
||||
TRACE(" entry.prev = 0x%p\n", (void*)entry->prev);
|
||||
TRACE(" entry.next = 0x%p\n", (void*)entry->next);
|
||||
TRACE(" entry.event.event_time = %" B_PRId64 "\n",
|
||||
entry->event.event_time);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user