Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d079588 authored by Gopalakrishnan Nallasamy's avatar Gopalakrishnan Nallasamy
Browse files

MPEG4Writer: Better logging in DumpTimeStamps()

Current Log messages when recording stops before receiving first frame.
E MPEG4Writer: Dumping Video track's last 10 frames timestamp and frame type
E MPEG4Writer:
E MPEG4Writer:

That is split between two prints.

After this change, it would be a one print statement with all data.
E/MPEG4Writer: Dumping Video track's last 10 frames' timestamps(pts, dts) and frame type :
               (369851us, 369851us Non-Key frame)
	       (403171us, 403171us Non-Key frame)

E/MPEG4Writer: 0 frames to dump in Audio track

Bug: 129554199

Test: Checked that expected log messages were present when recording
      as mentioned in the description above for both cases.

Change-Id: If6c3b96f30b6ebe9e0cca479c7258b5fe3c5dec8
parent baf2d2c6
Loading
Loading
Loading
Loading
+12 −8
Original line number Original line Diff line number Diff line
@@ -2920,14 +2920,18 @@ void MPEG4Writer::Track::updateDriftTime(const sp<MetaData>& meta) {
}
}


void MPEG4Writer::Track::dumpTimeStamps() {
void MPEG4Writer::Track::dumpTimeStamps() {
    ALOGE("Dumping %s track's last 10 frames timestamp and frame type ", getTrackType());
    if (!mTimestampDebugHelper.empty()) {
    std::string timeStampString;
        std::string timeStampString = "Dumping " + std::string(getTrackType()) + " track's last " +
    for (std::list<TimestampDebugHelperEntry>::iterator entry = mTimestampDebugHelper.begin();
                                      std::to_string(mTimestampDebugHelper.size()) +
            entry != mTimestampDebugHelper.end(); ++entry) {
                                      " frames' timestamps(pts, dts) and frame type : ";
        timeStampString += "(" + std::to_string(entry->pts)+
        for (const TimestampDebugHelperEntry& entry : mTimestampDebugHelper) {
                "us, " + std::to_string(entry->dts) + "us " + entry->frameType + ") ";
            timeStampString += "\n(" + std::to_string(entry.pts) + "us, " +
                               std::to_string(entry.dts) + "us " + entry.frameType + ") ";
        }
        }
        ALOGE("%s", timeStampString.c_str());
        ALOGE("%s", timeStampString.c_str());
    } else {
        ALOGE("0 frames to dump timeStamps in %s track ", getTrackType());
    }
}
}


status_t MPEG4Writer::Track::threadEntry() {
status_t MPEG4Writer::Track::threadEntry() {