amend cmd line option for UHD Blu-Ray and add option to tsMuxerGUI

master
Daniel Bryant 2019-11-26 16:49:50 +00:00
parent aff823e45e
commit eaba2aaf1a
6 changed files with 1474 additions and 1455 deletions

View File

@ -91,7 +91,7 @@ DiskType checkBluRayMux(const char* metaFileName, int& autoChapterLen, vector<do
} }
} }
if (str.find("--blu-ray v3") != string::npos) if (str.find("--blu-ray-v3") != string::npos)
result = UHD_BLURAY; result = UHD_BLURAY;
else if (str.find("--blu-ray") != string::npos) else if (str.find("--blu-ray") != string::npos)
result = DT_BLURAY; result = DT_BLURAY;
@ -486,6 +486,7 @@ All parameters in this group started with two dashes:\n\
is created as folder on HDD. For BD3D disks ssif files are\n\ is created as folder on HDD. For BD3D disks ssif files are\n\
not created at this case. If output file name has .iso\n\ not created at this case. If output file name has .iso\n\
extension, then BD disk is created as image file.\n\ extension, then BD disk is created as image file.\n\
--blu-ray-v3 As above - except mux to UHD BD disks.\n\
--avchd Mux to AVCHD disk.\n\ --avchd Mux to AVCHD disk.\n\
--cut-start Trim the beginning of the file. Value should be completed\n\ --cut-start Trim the beginning of the file. Value should be completed\n\
with \"ms\" (the number of milliseconds), \"s\" (seconds) or\n\ with \"ms\" (the number of milliseconds), \"s\" (seconds) or\n\

View File

@ -1583,7 +1583,7 @@ void MPLSParser::UO_mask_table(BitStreamReader& reader)
} }
void MPLSParser::parsePlayList(uint8_t* buffer, int len) { void MPLSParser::parsePlayList(uint8_t* buffer, int len) {
# NOTE: see https://github.com/lerks/BluRay/wiki/MPLS //NOTE: see https://github.com/lerks/BluRay/wiki/MPLS
BitStreamReader reader; BitStreamReader reader;
reader.setBuffer(buffer, buffer + len); reader.setBuffer(buffer, buffer + len);
uint32_t length = reader.getBits(32); uint32_t length = reader.getBits(32);
@ -2093,7 +2093,7 @@ void MPLSParser::composeExtensionData(BitStreamWriter& writer, vector<ExtDataBlo
void MPLSParser::parsePlayItem(BitStreamReader& reader, int PlayItem_id) void MPLSParser::parsePlayItem(BitStreamReader& reader, int PlayItem_id)
{ {
# NOTE: see https://github.com/lerks/BluRay/wiki/PlayItem // NOTE: see https://github.com/lerks/BluRay/wiki/PlayItem
MPLSPlayItem newItem; MPLSPlayItem newItem;
int length = reader.getBits(16); int length = reader.getBits(16);
int startBits = reader.getBitsLeft(); int startBits = reader.getBitsLeft();
@ -2426,7 +2426,7 @@ void MPLSParser::composeSTN_table(BitStreamWriter& writer, int PlayItem_id, bool
void MPLSParser::STN_table(BitStreamReader& reader, int PlayItem_id) void MPLSParser::STN_table(BitStreamReader& reader, int PlayItem_id)
{ {
# NOTE: see https://github.com/lerks/BluRay/wiki/STNTable // NOTE: see https://github.com/lerks/BluRay/wiki/STNTable
int length = reader.getBits(16); //16 uimsbf int length = reader.getBits(16); //16 uimsbf
int startBits = reader.getBitsLeft(); int startBits = reader.getBitsLeft();
@ -2713,7 +2713,7 @@ MPLSStreamInfo::~MPLSStreamInfo()
void MPLSStreamInfo::parseStreamEntry(BitStreamReader& reader) void MPLSStreamInfo::parseStreamEntry(BitStreamReader& reader)
{ {
# NOTE: see https://github.com/lerks/BluRay/wiki/StreamEntry // NOTE: see https://github.com/lerks/BluRay/wiki/StreamEntry
int length = reader.getBits(8); //8 uimsbf int length = reader.getBits(8); //8 uimsbf
int startBits = reader.getBitsLeft(); int startBits = reader.getBitsLeft();
@ -2787,7 +2787,7 @@ void MPLSStreamInfo::composeStreamEntry(BitStreamWriter& writer, int entryNum, i
void MPLSStreamInfo::parseStreamAttributes(BitStreamReader& reader) void MPLSStreamInfo::parseStreamAttributes(BitStreamReader& reader)
{ {
# NOTE: see https://github.com/lerks/BluRay/wiki/StreamAttributes // NOTE: see https://github.com/lerks/BluRay/wiki/StreamAttributes
int length = reader.getBits(8); // 8 uimsbf int length = reader.getBits(8); // 8 uimsbf
int startBits = reader.getBitsLeft(); int startBits = reader.getBitsLeft();

View File

@ -2,16 +2,15 @@
#include "tsmuxerwindow.h" #include "tsmuxerwindow.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[]) {
{ Q_INIT_RESOURCE(images);
Q_INIT_RESOURCE(images); QApplication app(argc, argv);
QApplication app(argc, argv); TsMuxerWindow win;
TsMuxerWindow win; win.show();
win.show(); QList<QUrl> files;
QList<QUrl> files; for (int i = 1; i < argc; ++i)
for (int i = 1; i < argc; ++i) files << QUrl::fromLocalFile(QString::fromLocal8Bit(argv[i]));
files << QUrl::fromLocalFile(QString::fromLocal8Bit(argv[i])); if (!files.isEmpty())
if (!files.isEmpty()) win.addFiles(files);
win.addFiles(files); return app.exec();
return app.exec();
} }

View File

@ -2,22 +2,21 @@
const static int MAX_ERRORS_CNT = 10000; const static int MAX_ERRORS_CNT = 10000;
MuxForm::MuxForm(QWidget* parent): QDialog(parent, Qt::WindowMaximizeButtonHint), muxProcess(0) MuxForm::MuxForm(QWidget *parent)
{ : QDialog(parent, Qt::WindowMaximizeButtonHint), muxProcess(0) {
ui.setupUi(this); ui.setupUi(this);
connect(ui.progressBar, SIGNAL(valueChanged(int)), this, SLOT(onProgressChanged())); connect(ui.progressBar, SIGNAL(valueChanged(int)), this,
SLOT(onProgressChanged()));
connect(ui.abortBtn, SIGNAL(clicked()), this, SLOT(onAbort())); connect(ui.abortBtn, SIGNAL(clicked()), this, SLOT(onAbort()));
connect(ui.okBtn, SIGNAL(clicked()), this, SLOT(close())); connect(ui.okBtn, SIGNAL(clicked()), this, SLOT(close()));
} }
void MuxForm::closeEvent (QCloseEvent * event ) void MuxForm::closeEvent(QCloseEvent *event) {
{
onAbort(); onAbort();
event->accept(); event->accept();
} }
void MuxForm::prepare(const QString& label) void MuxForm::prepare(const QString &label) {
{
muxProcess = 0; muxProcess = 0;
errCnt = 0; errCnt = 0;
setWindowTitle(label); setWindowTitle(label);
@ -29,32 +28,27 @@ void MuxForm::prepare(const QString& label)
ui.okBtn->setEnabled(false); ui.okBtn->setEnabled(false);
} }
void MuxForm::onProgressChanged() void MuxForm::onProgressChanged() {
{ ui.progressLabel->setText(
ui.progressLabel->setText(QString("Progress: ") + QString::number(ui.progressBar->value()/10.0,'f',1) + '%'); QString("Progress: ") +
QString::number(ui.progressBar->value() / 10.0, 'f', 1) + '%');
} }
void MuxForm::setProgress(int value) void MuxForm::setProgress(int value) { ui.progressBar->setValue(value); }
{
ui.progressBar->setValue(value);
}
void MuxForm::addStdOutLine(const QString& line) void MuxForm::addStdOutLine(const QString &line) {
{
ui.stdoutText->append(line); ui.stdoutText->append(line);
QTextCursor c = ui.stdoutText->textCursor(); QTextCursor c = ui.stdoutText->textCursor();
c.movePosition(QTextCursor::End); c.movePosition(QTextCursor::End);
ui.stdoutText->setTextCursor(c); ui.stdoutText->setTextCursor(c);
} }
void MuxForm::addStdErrLine(const QString& line) void MuxForm::addStdErrLine(const QString &line) {
{
if (errCnt >= MAX_ERRORS_CNT) if (errCnt >= MAX_ERRORS_CNT)
return; return;
ui.stderrText->append(line); ui.stderrText->append(line);
errCnt = ui.stderrText->document()->blockCount(); errCnt = ui.stderrText->document()->blockCount();
if (errCnt >= MAX_ERRORS_CNT) if (errCnt >= MAX_ERRORS_CNT) {
{
ui.stderrText->append("---------------------------------------"); ui.stderrText->append("---------------------------------------");
ui.stderrText->append("Too many errors! tsMuxeR is terminated."); ui.stderrText->append("Too many errors! tsMuxeR is terminated.");
onAbort(); onAbort();
@ -64,23 +58,21 @@ void MuxForm::addStdErrLine(const QString& line)
ui.stderrText->setTextCursor(c); ui.stderrText->setTextCursor(c);
} }
void MuxForm::muxFinished(int exitCode, const QString& prefix) void MuxForm::muxFinished(int exitCode, const QString &prefix) {
{
Q_UNUSED(prefix); Q_UNUSED(prefix);
if (muxProcess && ui.abortBtn->isEnabled()) if (muxProcess && ui.abortBtn->isEnabled()) {
{
if (exitCode == 0) if (exitCode == 0)
setWindowTitle("tsMuxeR successfully finished"); setWindowTitle("tsMuxeR successfully finished");
else else
setWindowTitle("tsMuxeR finished with error code " + QString::number(exitCode)); setWindowTitle("tsMuxeR finished with error code " +
QString::number(exitCode));
ui.muxLabel->setText(windowTitle() + '.'); ui.muxLabel->setText(windowTitle() + '.');
ui.abortBtn->setEnabled(false); ui.abortBtn->setEnabled(false);
ui.okBtn->setEnabled(true); ui.okBtn->setEnabled(true);
} }
} }
void MuxForm::onAbort() void MuxForm::onAbort() {
{
if (muxProcess == nullptr) if (muxProcess == nullptr)
return; return;
ui.abortBtn->setEnabled(false); ui.abortBtn->setEnabled(false);
@ -92,7 +84,4 @@ void MuxForm::onAbort()
muxProcess = nullptr; muxProcess = nullptr;
} }
void MuxForm::setProcess(QProcess* proc) void MuxForm::setProcess(QProcess *proc) { muxProcess = proc; }
{
muxProcess = proc;
}

File diff suppressed because it is too large Load Diff

View File

@ -6,13 +6,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>893</width> <width>1020</width>
<height>794</height> <height>800</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>660</width> <width>800</width>
<height>650</height> <height>650</height>
</size> </size>
</property> </property>
@ -20,7 +20,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>tsMuxeR GUI 2.6.13</string> <string>tsMuxeR GUI 2.6.15</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="images.qrc"> <iconset resource="images.qrc">
@ -2666,6 +2666,26 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QRadioButton" name="radioButtonBluRayISOUHD">
<property name="text">
<string>UHD Blu-ray ISO</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonBluRayUHD">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>UHD Blu-ray folder</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QRadioButton" name="radioButtonAVCHD"> <widget class="QRadioButton" name="radioButtonAVCHD">
<property name="text"> <property name="text">
@ -2932,6 +2952,7 @@ p, li { white-space: pre-wrap; }
<tabstop>radioButtonTS</tabstop> <tabstop>radioButtonTS</tabstop>
<tabstop>radioButtonM2TS</tabstop> <tabstop>radioButtonM2TS</tabstop>
<tabstop>radioButtonBluRay</tabstop> <tabstop>radioButtonBluRay</tabstop>
<tabstop>radioButtonBluRayUHD</tabstop>
<tabstop>radioButtonDemux</tabstop> <tabstop>radioButtonDemux</tabstop>
<tabstop>outFileName</tabstop> <tabstop>outFileName</tabstop>
<tabstop>btnBrowse</tabstop> <tabstop>btnBrowse</tabstop>