-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparserdialog.h
More file actions
63 lines (50 loc) · 1.43 KB
/
parserdialog.h
File metadata and controls
63 lines (50 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef PARSERDIALOG_H
#define PARSERDIALOG_H
#include <QDialog>
#include <QtCore>
#include <QTextBrowser>
#include <QTreeWidget>
// Project files
#include "qhexedit.h"
#include "mpeg2ts/mpeg2ts.h"
#include "mpeg2ts/TsUtilities.h"
// Forward declarations
namespace Ui {
class Dialog;
}
class ParserDialog : public QDialog
{
Q_OBJECT
public:
explicit ParserDialog(QHexEdit *hexEdit, QWidget *parent = 0);
~ParserDialog();
Ui::Dialog* _ui;
void setFileName(QString fileName);
private slots:
void on_parseButton_clicked();
private:
void init();
void parseData();
void buildTreeView();
void buildPatView(QTreeWidgetItem* patRoot);
void buildPmtView(QTreeWidgetItem* pmtRoot);
void buildPidView(QTreeWidgetItem* root);
void buildMediaView(QTreeWidgetItem* root);
QTreeWidgetItem* addTreeRoot(QString name,
QString description);
QTreeWidgetItem* addTreeChild(QTreeWidgetItem *parent,
QString name,
QString description);
QHexEdit* _hexEdit;
QTextBrowser* _textBrowser;
QTreeWidget* _treeWidget;
QString _fileName;
// Parsing stuff
tsutil::TsUtilities _tsUtil;
std::vector<uint16_t> _pmtPids;
mpeg2ts::PmtTable _pmt;
std::map<int, mpeg2ts::PmtTable> _pmtTables;
mpeg2ts::PatTable _pat;
tsutil::VideoMediaInfo _videoInfo;
};
#endif // PARSERDIALOG_H