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

Commit 1ebcf112 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "MPEG4Writer: Better logging in DumpTimeStamps()"

parents 7fc25554 2d079588
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -2914,14 +2914,18 @@ void MPEG4Writer::Track::updateDriftTime(const sp<MetaData>& meta) {
}

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

status_t MPEG4Writer::Track::threadEntry() {