amend cmd line option for UHD Blu-Ray and add option to tsMuxerGUI
parent
aff823e45e
commit
eaba2aaf1a
|
@ -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;
|
||||
else if (str.find("--blu-ray") != string::npos)
|
||||
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\
|
||||
not created at this case. If output file name has .iso\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\
|
||||
--cut-start Trim the beginning of the file. Value should be completed\n\
|
||||
with \"ms\" (the number of milliseconds), \"s\" (seconds) or\n\
|
||||
|
|
|
@ -1583,7 +1583,7 @@ void MPLSParser::UO_mask_table(BitStreamReader& reader)
|
|||
}
|
||||
|
||||
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;
|
||||
reader.setBuffer(buffer, buffer + len);
|
||||
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)
|
||||
{
|
||||
# NOTE: see https://github.com/lerks/BluRay/wiki/PlayItem
|
||||
// NOTE: see https://github.com/lerks/BluRay/wiki/PlayItem
|
||||
MPLSPlayItem newItem;
|
||||
int length = reader.getBits(16);
|
||||
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)
|
||||
{
|
||||
# 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 startBits = reader.getBitsLeft();
|
||||
|
||||
|
@ -2713,7 +2713,7 @@ MPLSStreamInfo::~MPLSStreamInfo()
|
|||
|
||||
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 startBits = reader.getBitsLeft();
|
||||
|
||||
|
@ -2787,7 +2787,7 @@ void MPLSStreamInfo::composeStreamEntry(BitStreamWriter& writer, int entryNum, i
|
|||
|
||||
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 startBits = reader.getBitsLeft();
|
||||
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
|
||||
#include "tsmuxerwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(images);
|
||||
QApplication app(argc, argv);
|
||||
TsMuxerWindow win;
|
||||
win.show();
|
||||
QList<QUrl> files;
|
||||
for (int i = 1; i < argc; ++i)
|
||||
files << QUrl::fromLocalFile(QString::fromLocal8Bit(argv[i]));
|
||||
if (!files.isEmpty())
|
||||
win.addFiles(files);
|
||||
return app.exec();
|
||||
int main(int argc, char *argv[]) {
|
||||
Q_INIT_RESOURCE(images);
|
||||
QApplication app(argc, argv);
|
||||
TsMuxerWindow win;
|
||||
win.show();
|
||||
QList<QUrl> files;
|
||||
for (int i = 1; i < argc; ++i)
|
||||
files << QUrl::fromLocalFile(QString::fromLocal8Bit(argv[i]));
|
||||
if (!files.isEmpty())
|
||||
win.addFiles(files);
|
||||
return app.exec();
|
||||
}
|
||||
|
|
|
@ -2,22 +2,21 @@
|
|||
|
||||
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);
|
||||
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.okBtn, SIGNAL(clicked()), this, SLOT(close()));
|
||||
}
|
||||
|
||||
void MuxForm::closeEvent (QCloseEvent * event )
|
||||
{
|
||||
void MuxForm::closeEvent(QCloseEvent *event) {
|
||||
onAbort();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MuxForm::prepare(const QString& label)
|
||||
{
|
||||
void MuxForm::prepare(const QString &label) {
|
||||
muxProcess = 0;
|
||||
errCnt = 0;
|
||||
setWindowTitle(label);
|
||||
|
@ -29,32 +28,27 @@ void MuxForm::prepare(const QString& label)
|
|||
ui.okBtn->setEnabled(false);
|
||||
}
|
||||
|
||||
void MuxForm::onProgressChanged()
|
||||
{
|
||||
ui.progressLabel->setText(QString("Progress: ") + QString::number(ui.progressBar->value()/10.0,'f',1) + '%');
|
||||
void MuxForm::onProgressChanged() {
|
||||
ui.progressLabel->setText(
|
||||
QString("Progress: ") +
|
||||
QString::number(ui.progressBar->value() / 10.0, 'f', 1) + '%');
|
||||
}
|
||||
|
||||
void MuxForm::setProgress(int value)
|
||||
{
|
||||
ui.progressBar->setValue(value);
|
||||
}
|
||||
void MuxForm::setProgress(int value) { ui.progressBar->setValue(value); }
|
||||
|
||||
void MuxForm::addStdOutLine(const QString& line)
|
||||
{
|
||||
void MuxForm::addStdOutLine(const QString &line) {
|
||||
ui.stdoutText->append(line);
|
||||
QTextCursor c = ui.stdoutText->textCursor();
|
||||
c.movePosition(QTextCursor::End);
|
||||
ui.stdoutText->setTextCursor(c);
|
||||
}
|
||||
|
||||
void MuxForm::addStdErrLine(const QString& line)
|
||||
{
|
||||
void MuxForm::addStdErrLine(const QString &line) {
|
||||
if (errCnt >= MAX_ERRORS_CNT)
|
||||
return;
|
||||
ui.stderrText->append(line);
|
||||
errCnt = ui.stderrText->document()->blockCount();
|
||||
if (errCnt >= MAX_ERRORS_CNT)
|
||||
{
|
||||
if (errCnt >= MAX_ERRORS_CNT) {
|
||||
ui.stderrText->append("---------------------------------------");
|
||||
ui.stderrText->append("Too many errors! tsMuxeR is terminated.");
|
||||
onAbort();
|
||||
|
@ -64,23 +58,21 @@ void MuxForm::addStdErrLine(const QString& line)
|
|||
ui.stderrText->setTextCursor(c);
|
||||
}
|
||||
|
||||
void MuxForm::muxFinished(int exitCode, const QString& prefix)
|
||||
{
|
||||
void MuxForm::muxFinished(int exitCode, const QString &prefix) {
|
||||
Q_UNUSED(prefix);
|
||||
if (muxProcess && ui.abortBtn->isEnabled())
|
||||
{
|
||||
if (muxProcess && ui.abortBtn->isEnabled()) {
|
||||
if (exitCode == 0)
|
||||
setWindowTitle("tsMuxeR successfully finished");
|
||||
else
|
||||
setWindowTitle("tsMuxeR finished with error code " + QString::number(exitCode));
|
||||
setWindowTitle("tsMuxeR finished with error code " +
|
||||
QString::number(exitCode));
|
||||
ui.muxLabel->setText(windowTitle() + '.');
|
||||
ui.abortBtn->setEnabled(false);
|
||||
ui.okBtn->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
void MuxForm::onAbort()
|
||||
{
|
||||
void MuxForm::onAbort() {
|
||||
if (muxProcess == nullptr)
|
||||
return;
|
||||
ui.abortBtn->setEnabled(false);
|
||||
|
@ -92,7 +84,4 @@ void MuxForm::onAbort()
|
|||
muxProcess = nullptr;
|
||||
}
|
||||
|
||||
void MuxForm::setProcess(QProcess* proc)
|
||||
{
|
||||
muxProcess = proc;
|
||||
}
|
||||
void MuxForm::setProcess(QProcess *proc) { muxProcess = proc; }
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,13 +6,13 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>893</width>
|
||||
<height>794</height>
|
||||
<width>1020</width>
|
||||
<height>800</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>660</width>
|
||||
<width>800</width>
|
||||
<height>650</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>tsMuxeR GUI 2.6.13</string>
|
||||
<string>tsMuxeR GUI 2.6.15</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="images.qrc">
|
||||
|
@ -2666,6 +2666,26 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QRadioButton" name="radioButtonAVCHD">
|
||||
<property name="text">
|
||||
|
@ -2932,6 +2952,7 @@ p, li { white-space: pre-wrap; }
|
|||
<tabstop>radioButtonTS</tabstop>
|
||||
<tabstop>radioButtonM2TS</tabstop>
|
||||
<tabstop>radioButtonBluRay</tabstop>
|
||||
<tabstop>radioButtonBluRayUHD</tabstop>
|
||||
<tabstop>radioButtonDemux</tabstop>
|
||||
<tabstop>outFileName</tabstop>
|
||||
<tabstop>btnBrowse</tabstop>
|
||||
|
|
Loading…
Reference in New Issue