Skip to content

Commit d418c72

Browse files
committedAug 17, 2018
add eac3to unknown type ext
update to alpha1.2
1 parent 12da521 commit d418c72

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed
 

‎com/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef VERSION_H
22
#define VERSION_H
33

4-
const char *QVS_VERSION = "alpha1.1";
4+
const char *QVS_VERSION = "alpha1.2";
55

66
#endif // VERSION_H

‎tools/demuxer.cpp

+18-9
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ void Demuxer::slotEncoderProcessStarted()
125125
if(!m_process_job_encoder.isReadable())
126126
{
127127
viewLog(JobChef::eJOB_LOG_TYPE_WARN, "Encoder process is not Writable.");
128-
//abortJob();
129128
return;
130129
}
131130
}
@@ -147,7 +146,6 @@ void Demuxer::slotEncoderProcessReadyReadStandardError()
147146
{
148147
QByteArray standardError = m_process_job_encoder.readAllStandardError();
149148
QString standardErrorText = QString::fromUtf8(standardError);
150-
// standardErrorText = standardErrorText.trimmed();
151149
if(!standardErrorText.isEmpty())
152150
{
153151
viewLog(JobChef::eJOB_LOG_TYPE_JOB_STD_ERROR, standardErrorText);
@@ -158,7 +156,6 @@ void Demuxer::slotEncoderProcessReadyReadStandardOutput()
158156
{
159157
QByteArray standardOutput = m_process_job_encoder.readAllStandardOutput();
160158
QString standardOutputText = QString::fromUtf8(standardOutput);
161-
// standardOutputText = standardOutputText.trimmed();
162159
if(!standardOutputText.isEmpty())
163160
{
164161
viewLog(JobChef::eJOB_LOG_TYPE_JOB_STD_OUTPUT, standardOutputText);
@@ -503,7 +500,7 @@ QString Demuxer::getEac3toExt(QString a_track_info)
503500
int start_index = code.indexOf(QString(QT_COLON)) + eINDEX_1;
504501
int end_index = code.indexOf(QString(QT_CSV_SPLITE));
505502

506-
code = code.mid(start_index, end_index - start_index).simplified();
503+
code = code.mid(start_index, end_index - start_index).simplified().remove(QT_BLANK);
507504
if(code.startsWith("h264") || code.indexOf(".mpls") != eINDEX_NONE)
508505
{
509506
code = "h264";
@@ -520,26 +517,38 @@ QString Demuxer::getEac3toExt(QString a_track_info)
520517
{
521518
code = "txt";
522519
}
523-
else if(code == "subtitle (ass)")
520+
else if(code == "subtitle(ass)")
524521
{
525522
code = "ass";
526523
}
527-
else if(code == "subtitle (srt)")
524+
else if(code == "subtitle(srt)")
528525
{
529526
code = "srt";
530527
}
531-
else if(code == "subtitle (ssa)")
528+
else if(code == "subtitle(ssa)")
532529
{
533530
code = "ssa";
534531
}
535-
else if(code == "subtitle (vobsub)")
532+
else if(code == "subtitle(vobsub)")
536533
{
537534
code = "sub";
538535
}
539-
else if(code == "subtitle (pgs)")
536+
else if(code == "subtitle(pgs)")
540537
{
541538
code = "sup";
542539
}
540+
else if(code.startsWith("unknownaudio"))
541+
{
542+
code = "aac";
543+
}
544+
else if(code.startsWith("unknownvideo"))
545+
{
546+
code = "mkv";
547+
}
548+
else if(code.startsWith("unknown"))
549+
{
550+
code = "null";
551+
}
543552
return code;
544553
}
545554

0 commit comments

Comments
 (0)
Please sign in to comment.