Reduce code duplication via MediaFileInfo::overallAverageBitrate()
This commit is contained in:
parent
814580a895
commit
fb04ee4e12
|
@ -13,7 +13,7 @@ set(META_GUI_OPTIONAL true)
|
|||
set(META_JS_SRC_DIR renamingutility)
|
||||
set(META_VERSION_MAJOR 3)
|
||||
set(META_VERSION_MINOR 2)
|
||||
set(META_VERSION_PATCH 0)
|
||||
set(META_VERSION_PATCH 1)
|
||||
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
||||
|
||||
# add project files
|
||||
|
@ -180,7 +180,7 @@ if (WIDGETS_GUI OR QUICK_GUI)
|
|||
endif ()
|
||||
|
||||
# find tagparser
|
||||
find_package(tagparser 8.1.0 REQUIRED)
|
||||
find_package(tagparser 8.3.0 REQUIRED)
|
||||
use_tag_parser()
|
||||
list(APPEND TEST_LIBRARIES ${TAG_PARSER_SHARED_LIB})
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ void FileInfoModel::updateCache()
|
|||
const TimeSpan duration = m_file->duration();
|
||||
if (!duration.isNull()) {
|
||||
rootHelper.appendRow(tr("Duration"), duration);
|
||||
rootHelper.appendRow(tr("Overall avg. bitrate"), bitrateToString(0.0078125 * m_file->size() / duration.totalSeconds()));
|
||||
rootHelper.appendRow(tr("Overall avg. bitrate"), bitrateToString(m_file->overallAverageBitrate()));
|
||||
}
|
||||
const char *const mimeType = m_file->mimeType();
|
||||
if (*mimeType) {
|
||||
|
|
|
@ -913,7 +913,7 @@ public:
|
|||
if (!duration.isNull()) {
|
||||
m_rowMaker.mkRow(QCoreApplication::translate("HtmlInfo", "Duration"), qstr(duration.toString(TimeSpanOutputFormat::WithMeasures)));
|
||||
m_rowMaker.mkRow(QCoreApplication::translate("HtmlInfo", "Overall avg. bitrate"),
|
||||
qstr(bitrateToString(0.0078125 * m_file.size() / duration.totalSeconds())));
|
||||
qstr(bitrateToString(m_file.overallAverageBitrate())));
|
||||
}
|
||||
const char *const mimeType = m_file.mimeType();
|
||||
if (*mimeType) {
|
||||
|
|
Loading…
Reference in New Issue