Skip to content

Commit e1e000d

Browse files
authored
browser(firefox): do not spam stderr with screencast logs (#4630)
1 parent ea833da commit e1e000d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

browser_patches/firefox/BUILD_NUMBER

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1219
2-
Changed: [email protected] Mon 07 Dec 2020 10:23:58 AM PST
1+
1220
2+
Changed: [email protected] Mon Dec 7 18:25:06 PST 2020

browser_patches/firefox/juggler/screencast/ScreencastEncoder.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ class ScreencastEncoder::VPXCodec {
243243

244244
if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
245245
m_writer->writeFrame(pkt);
246-
bool keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
247246
++m_frameCount;
248-
fprintf(stderr, " #%03d %spts=%" PRId64 " sz=%zd\n", m_frameCount, keyframe ? "[K] " : "", pkt->data.frame.pts, pkt->data.frame.sz);
247+
// fprintf(stderr, " #%03d %spts=%" PRId64 " sz=%zd\n", m_frameCount, (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0 ? "[K] " : "", pkt->data.frame.pts, pkt->data.frame.sz);
249248
m_pts += pkt->data.frame.duration;
250249
}
251250
}
@@ -261,7 +260,7 @@ class ScreencastEncoder::VPXCodec {
261260

262261
m_writer->finish();
263262
fclose(m_file);
264-
fprintf(stderr, "ScreencastEncoder::finish %d frames\n", m_frameCount);
263+
// fprintf(stderr, "ScreencastEncoder::finish %d frames\n", m_frameCount);
265264
}
266265

267266
RefPtr<nsIThread> m_encoderQueue;
@@ -327,7 +326,7 @@ RefPtr<ScreencastEncoder> ScreencastEncoder::create(nsCString& errorString, cons
327326
}
328327

329328
std::unique_ptr<VPXCodec> vpxCodec(new VPXCodec(codec, cfg, file));
330-
fprintf(stderr, "ScreencastEncoder initialized with: %s\n", vpx_codec_iface_name(codec_interface));
329+
// fprintf(stderr, "ScreencastEncoder initialized with: %s\n", vpx_codec_iface_name(codec_interface));
331330
return new ScreencastEncoder(std::move(vpxCodec), scale, margin);
332331
}
333332

@@ -347,7 +346,7 @@ void ScreencastEncoder::flushLastFrame()
347346

348347
void ScreencastEncoder::encodeFrame(const webrtc::VideoFrame& videoFrame)
349348
{
350-
fprintf(stderr, "ScreencastEncoder::encodeFrame\n");
349+
// fprintf(stderr, "ScreencastEncoder::encodeFrame\n");
351350
flushLastFrame();
352351

353352
m_lastFrame = std::make_unique<VPXFrame>(videoFrame.video_frame_buffer(), m_scale, m_margin);

0 commit comments

Comments
 (0)