Skip to content

Commit

Permalink
Fix compilation on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Oct 13, 2024
1 parent b250800 commit f0e1003
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 0 additions & 2 deletions YUViewLib/src/filesource/FileSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include <common/Formatting.h>
#include <common/Typedef.h>

#include <format>

#include <QDateTime>
#include <QDir>
#include <QSettings>
Expand Down
16 changes: 8 additions & 8 deletions YUViewLib/src/parser/ParserAnnexB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ bool ParserAnnexB::runParsingOfFile(const std::filesystem::path &compressedFileP
return this->parseAnnexBFile(file);
}

vector<QTreeWidgetItem *> ParserAnnexB::StreamInfo::getStreamInfo()
vector<QTreeWidgetItem *> ParserAnnexB::createTreeItemsFromStreamInfo() const
{
vector<QTreeWidgetItem *> infoList;
infoList.push_back(
new QTreeWidgetItem(QStringList() << "File size" << QString::number(file_size)));
if (parsing)
infoList.push_back(new QTreeWidgetItem(
QStringList() << "File size" << QString::number(this->streamInfo.file_size)));
if (this->streamInfo.parsing)
{
infoList.push_back(new QTreeWidgetItem(QStringList() << "Number NAL units"
<< "Parsing..."));
Expand All @@ -301,10 +301,10 @@ vector<QTreeWidgetItem *> ParserAnnexB::StreamInfo::getStreamInfo()
}
else
{
infoList.push_back(new QTreeWidgetItem(QStringList() << "Number NAL units"
<< QString::number(this->nrNalUnits)));
infoList.push_back(
new QTreeWidgetItem(QStringList() << "Number Frames" << QString::number(this->nrFrames)));
infoList.push_back(new QTreeWidgetItem(
QStringList() << "Number NAL units" << QString::number(this->streamInfo.nrNalUnits)));
infoList.push_back(new QTreeWidgetItem(
QStringList() << "Number Frames" << QString::number(this->streamInfo.nrFrames)));
}

return infoList;
Expand Down
7 changes: 3 additions & 4 deletions YUViewLib/src/parser/ParserAnnexB.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ParserAnnexB : public Parser
// Clear all knowledge about the bitstream.
void clearData();

vector<QTreeWidgetItem *> getStreamInfo() override { return this->streamInfo.getStreamInfo(); }
vector<QTreeWidgetItem *> getStreamInfo() override { return createTreeItemsFromStreamInfo(); }
unsigned int getNrStreams() override { return 1; }
std::string getShortStreamDescription(const int streamIndex) const override;

Expand Down Expand Up @@ -161,14 +161,13 @@ class ParserAnnexB : public Parser
// Save general information about the file here
struct StreamInfo
{
vector<QTreeWidgetItem *> getStreamInfo();

int64_t file_size{};
unsigned nrNalUnits{0};
unsigned nrFrames{0};
bool parsing{false};
};
StreamInfo streamInfo{};
StreamInfo streamInfo{};
vector<QTreeWidgetItem *> createTreeItemsFromStreamInfo() const;

int getFramePOC(FrameIndexDisplayOrder frameIdx);

Expand Down

0 comments on commit f0e1003

Please sign in to comment.