Bug 835290 MediaPipeline - replace attempted += of ints with PR_snprintfs r=jesup

This commit is contained in:
Ethan Hugg 2013-01-28 12:26:32 -08:00
parent eb51eaad4d
commit aba52e62fb

View File

@ -477,12 +477,17 @@ void MediaPipeline::PacketReceived(TransportLayer *layer,
}
nsresult MediaPipelineTransmit::Init() {
char track_id_string[11];
ASSERT_ON_THREAD(main_thread_);
// We can replace this when we are allowed to do streams or std::to_string
PR_snprintf(track_id_string, sizeof(track_id_string), "%d", track_id_);
description_ = pc_ + "| ";
description_ += conduit_->type() == MediaSessionConduit::AUDIO ?
"Transmit audio[" : "Transmit video[";
description_ += track_id_ + "]";
description_ += track_id_string;
description_ += "]";
// TODO(ekr@rtfm.com): Check for errors
MOZ_MTLOG(PR_LOG_DEBUG, "Attaching pipeline to stream "
@ -812,11 +817,16 @@ void MediaPipelineTransmit::PipelineListener::ProcessVideoChunk(
#endif
nsresult MediaPipelineReceiveAudio::Init() {
char track_id_string[11];
ASSERT_ON_THREAD(main_thread_);
MOZ_MTLOG(PR_LOG_DEBUG, __FUNCTION__);
// We can replace this when we are allowed to do streams or std::to_string
PR_snprintf(track_id_string, sizeof(track_id_string), "%d", track_id_);
description_ = pc_ + "| Receive audio[";
description_ += track_id_ + "]";
description_ += track_id_string;
description_ += "]";
stream_->AddListener(listener_);
@ -877,11 +887,16 @@ NotifyPull(MediaStreamGraph* graph, StreamTime desired_time) {
}
nsresult MediaPipelineReceiveVideo::Init() {
char track_id_string[11];
ASSERT_ON_THREAD(main_thread_);
MOZ_MTLOG(PR_LOG_DEBUG, __FUNCTION__);
// We can replace this when we are allowed to do streams or std::to_string
PR_snprintf(track_id_string, sizeof(track_id_string), "%d", track_id_);
description_ = pc_ + "| Receive video[";
description_ += track_id_ + "]";
description_ += track_id_string;
description_ += "]";
stream_->AddListener(listener_);