Skip to content

Commit

Permalink
add eac3to unknown type ext
Browse files Browse the repository at this point in the history
update to alpha1.2
  • Loading branch information
emako committed Aug 17, 2018
1 parent 12da521 commit d418c72
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion com/version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef VERSION_H
#define VERSION_H

const char *QVS_VERSION = "alpha1.1";
const char *QVS_VERSION = "alpha1.2";

#endif // VERSION_H
27 changes: 18 additions & 9 deletions tools/demuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ void Demuxer::slotEncoderProcessStarted()
if(!m_process_job_encoder.isReadable())
{
viewLog(JobChef::eJOB_LOG_TYPE_WARN, "Encoder process is not Writable.");
//abortJob();
return;
}
}
Expand All @@ -147,7 +146,6 @@ void Demuxer::slotEncoderProcessReadyReadStandardError()
{
QByteArray standardError = m_process_job_encoder.readAllStandardError();
QString standardErrorText = QString::fromUtf8(standardError);
// standardErrorText = standardErrorText.trimmed();
if(!standardErrorText.isEmpty())
{
viewLog(JobChef::eJOB_LOG_TYPE_JOB_STD_ERROR, standardErrorText);
Expand All @@ -158,7 +156,6 @@ void Demuxer::slotEncoderProcessReadyReadStandardOutput()
{
QByteArray standardOutput = m_process_job_encoder.readAllStandardOutput();
QString standardOutputText = QString::fromUtf8(standardOutput);
// standardOutputText = standardOutputText.trimmed();
if(!standardOutputText.isEmpty())
{
viewLog(JobChef::eJOB_LOG_TYPE_JOB_STD_OUTPUT, standardOutputText);
Expand Down Expand Up @@ -503,7 +500,7 @@ QString Demuxer::getEac3toExt(QString a_track_info)
int start_index = code.indexOf(QString(QT_COLON)) + eINDEX_1;
int end_index = code.indexOf(QString(QT_CSV_SPLITE));

code = code.mid(start_index, end_index - start_index).simplified();
code = code.mid(start_index, end_index - start_index).simplified().remove(QT_BLANK);
if(code.startsWith("h264") || code.indexOf(".mpls") != eINDEX_NONE)
{
code = "h264";
Expand All @@ -520,26 +517,38 @@ QString Demuxer::getEac3toExt(QString a_track_info)
{
code = "txt";
}
else if(code == "subtitle (ass)")
else if(code == "subtitle(ass)")
{
code = "ass";
}
else if(code == "subtitle (srt)")
else if(code == "subtitle(srt)")
{
code = "srt";
}
else if(code == "subtitle (ssa)")
else if(code == "subtitle(ssa)")
{
code = "ssa";
}
else if(code == "subtitle (vobsub)")
else if(code == "subtitle(vobsub)")
{
code = "sub";
}
else if(code == "subtitle (pgs)")
else if(code == "subtitle(pgs)")
{
code = "sup";
}
else if(code.startsWith("unknownaudio"))
{
code = "aac";
}
else if(code.startsWith("unknownvideo"))
{
code = "mkv";
}
else if(code.startsWith("unknown"))
{
code = "null";
}
return code;
}

Expand Down

0 comments on commit d418c72

Please sign in to comment.