Display capture file size in capture connection window. Closes #1723

This commit is contained in:
baldurk
2020-02-14 13:47:29 +00:00
parent 4241e0ec55
commit f7cb742a4c
7 changed files with 61 additions and 8 deletions
+7 -3
View File
@@ -673,11 +673,14 @@ QString LiveCapture::MakeText(Capture *cap)
text += lit("\n") + cap->api;
if(cap->frameNumber == ~0U)
text += tr("\nUser-defined Capture ");
text += tr("\nUser-defined Capture");
else
text += tr("\nFrame #%1 ").arg(cap->frameNumber);
text += tr("\nFrame #%1").arg(cap->frameNumber);
text += cap->timestamp.toString(lit("yyyy-MM-dd HH:mm:ss"));
if(cap->byteSize > 0)
text += QFormatStr(" (%1 MB)").arg(double(cap->byteSize) / 1000000.0, 0, 'f', 2);
text += cap->timestamp.toString(lit("\nyyyy-MM-dd HH:mm:ss"));
return text;
}
@@ -1045,6 +1048,7 @@ void LiveCapture::captureAdded(const NewCaptureData &newCapture)
cap->timestamp =
QDateTime(QDate(1970, 1, 1), QTime(0, 0, 0), Qt::UTC).addSecs(newCapture.timestamp).toLocalTime();
cap->byteSize = newCapture.byteSize;
cap->thumb = QImage(newCapture.thumbnail.data(), newCapture.thumbWidth, newCapture.thumbHeight,
newCapture.thumbWidth * 3, QImage::Format_RGB888)