Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd89b56

Browse files
author
Valentin NOEL
committed
StreamTranscoder: manage process case according to the input index
1 parent55a4bab commitdd89b56

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

‎src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ bool StreamTranscoder::processTranscode()
604604
std::vector<bool>decodingStatus(_generators.size(),true);
605605
for(size_t index =0; index < _generators.size(); ++index)
606606
{
607-
if(getProcessCase() == eProcessCaseTranscode)
607+
EProcessCase processCase =getProcessCase(index);
608+
if(processCase == eProcessCaseTranscode)
608609
_currentDecoder = _inputDecoders.at(index);
609610
else
610611
_currentDecoder = _generators.at(index);
@@ -795,13 +796,30 @@ void StreamTranscoder::setOffset(const float offset)
795796
}
796797
}
797798

798-
StreamTranscoder::EProcessCaseStreamTranscoder::getProcessCase()const
799+
StreamTranscoder::EProcessCaseStreamTranscoder::getProcessCase(constsize_t decoderIndex)const
799800
{
800-
if(! _inputStreams.empty() && ! _inputDecoders.empty() &&std::find(_inputDecoders.begin(), _inputDecoders.end(), _currentDecoder) != _inputDecoders.end() )
801-
return eProcessCaseTranscode;
802-
elseif(! _inputStreams.empty() && _inputDecoders.empty() && !_currentDecoder)
803-
return eProcessCaseRewrap;
801+
if(_inputStreamDesc.size() <=1)
802+
{
803+
if(! _inputStreams.empty() && ! _inputDecoders.empty() &&std::find(_inputDecoders.begin(), _inputDecoders.end(), _currentDecoder) != _inputDecoders.end() )
804+
return eProcessCaseTranscode;
805+
elseif(! _inputStreams.empty() && _inputDecoders.empty() && !_currentDecoder)
806+
return eProcessCaseRewrap;
807+
else
808+
return eProcessCaseGenerator;
809+
}
804810
else
811+
{
812+
if(! _inputStreams.empty() && _currentDecoder !=NULL)
813+
{
814+
if( _inputStreams.at(decoderIndex) !=NULL)
815+
return eProcessCaseTranscode;
816+
return eProcessCaseGenerator;
817+
}
818+
elseif(! _inputStreams.empty() && _inputDecoders.empty() && !_currentDecoder)
819+
{
820+
return eProcessCaseRewrap;
821+
}
805822
return eProcessCaseGenerator;
823+
}
806824
}
807825
}

‎src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class AvExport StreamTranscoder
115115
eProcessCaseRewrap,
116116
eProcessCaseGenerator
117117
};
118-
EProcessCasegetProcessCase()const;
118+
EProcessCasegetProcessCase(constsize_t decoderIndex =0)const;
119119
//@}
120120

121121
private:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp