Closed
Bug 1335066
Opened 9 years ago
Closed 9 years ago
Fix logging in TrackEncoder.cpp
Categories
(Core :: Audio/Video: Recording, defect)
Core
Audio/Video: Recording
Tracking
()
RESOLVED
FIXED
mozilla54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | fixed |
People
(Reporter: padenot, Assigned: padenot)
Details
Attachments
(1 file)
No description provided.
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → padenot
Comment 2•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8831722 [details]
Bug 1335066 - Fix logging in TrackEncoder.cpp.
https://reviewboard.mozilla.org/r/108276/#review109280
::: dom/media/encoder/TrackEncoder.cpp:74
(Diff revision 1)
> // The number of channels is determined by the first non-null chunk, and
> // thus the audio encoder is initialized at this time.
> if (!chunk.IsNull()) {
> nsresult rv = Init(chunk.mChannelData.Length(), aGraph->GraphRate());
> if (NS_FAILED(rv)) {
> - LOG("[AudioTrackEncoder]: Fail to initialize the encoder!");
> + TRACK_LOG(LogLevel::Debug, ("[AudioTrackEncoder]: Fail to initialize the encoder!"));
This is great because we can differentiate log levels!
Let's make this one Error.
::: dom/media/encoder/TrackEncoder.cpp:87
(Diff revision 1)
>
> mNotInitDuration += aQueuedMedia.GetDuration();
> if (!mInitialized &&
> (mNotInitDuration / aGraph->GraphRate() > INIT_FAILED_DURATION) &&
> mInitCounter > 1) {
> - LOG("[AudioTrackEncoder]: Initialize failed for 30s.");
> + TRACK_LOG(LogLevel::Debug, ("[AudioTrackEncoder]: Initialize failed for 30s."));
Warning
::: dom/media/encoder/TrackEncoder.cpp:99
(Diff revision 1)
> AppendAudioSegment(audio);
>
>
> // The stream has stopped and reached the end of track.
> if (aTrackEvents == TrackEventCommand::TRACK_EVENT_ENDED) {
> - LOG("[AudioTrackEncoder]: Receive TRACK_EVENT_ENDED .");
> + TRACK_LOG(LogLevel::Debug, ("[AudioTrackEncoder]: Receive TRACK_EVENT_ENDED ."));
Info
::: dom/media/encoder/TrackEncoder.cpp:212
(Diff revision 1)
> gfx::IntSize intrinsicSize = chunk.mFrame.GetIntrinsicSize();
> nsresult rv = Init(imgsize.width, imgsize.height,
> intrinsicSize.width, intrinsicSize.height);
>
> if (NS_FAILED(rv)) {
> - LOG("[VideoTrackEncoder]: Fail to initialize the encoder!");
> + TRACK_LOG(LogLevel::Debug, ("[VideoTrackEncoder]: Fail to initialize the encoder!"));
Error
::: dom/media/encoder/TrackEncoder.cpp:224
(Diff revision 1)
> }
>
> mNotInitDuration += aSegment.GetDuration();
> if ((mNotInitDuration / mTrackRate > INIT_FAILED_DURATION) &&
> mInitCounter > 1) {
> - LOG("[VideoTrackEncoder]: Initialize failed for %ds.", INIT_FAILED_DURATION);
> + TRACK_LOG(LogLevel::Debug, ("[VideoTrackEncoder]: Initialize failed for %ds.", INIT_FAILED_DURATION));
Warning
::: dom/media/encoder/TrackEncoder.cpp:270
(Diff revision 1)
>
> AppendVideoSegment(video);
>
> // The stream has stopped and reached the end of track.
> if (aTrackEvents == TrackEventCommand::TRACK_EVENT_ENDED) {
> - LOG("[VideoTrackEncoder]: Receive TRACK_EVENT_ENDED .");
> + TRACK_LOG(LogLevel::Debug, ("[VideoTrackEncoder]: Receive TRACK_EVENT_ENDED ."));
Info
Attachment #8831722 -
Flags: review?(pehrson) → review+
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/30293a6c6e4a
Fix logging in TrackEncoder.cpp. r=pehrsons
Comment 4•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•