Skip to content

Commit 992affe

Browse files
switch audio/video processing order, just for better reading
1 parent bfddb81 commit 992affe

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/AvTranscoder/Transcoder/StreamTranscoder.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,23 @@ StreamTranscoder::StreamTranscoder(
153153
if( ! profile.count( Profile::avProfileType ) )
154154
throw std::runtime_error( "unable to found stream type (audio, video, etc.)" );
155155

156+
if( profile.find( Profile::avProfileType )->second == Profile::avProfileTypeVideo )
157+
{
158+
OutputVideo* outputVideo = new OutputVideo();
159+
160+
_outputEssence = outputVideo;
161+
VideoFrameDesc inputVideoFrameDesc = static_cast<DummyVideo*>( _inputEssence )->getVideoDesc().getVideoFrameDesc();
162+
outputVideo->setProfile( profile, inputVideoFrameDesc );
163+
164+
_outputStream = &outputFile.addVideoStream( outputVideo->getVideoDesc() );
165+
_sourceBuffer = new VideoFrame( outputVideo->getVideoDesc().getVideoFrameDesc() );
166+
_frameBuffer = new VideoFrame( outputVideo->getVideoDesc().getVideoFrameDesc() );
167+
168+
_transform = new VideoEssenceTransform();
169+
170+
return;
171+
}
172+
156173
if( profile.find( Profile::avProfileType )->second == Profile::avProfileTypeAudio )
157174
{
158175
OutputAudio* outputAudio = new OutputAudio();
@@ -172,23 +189,6 @@ StreamTranscoder::StreamTranscoder(
172189
return;
173190
}
174191

175-
if( profile.find( Profile::avProfileType )->second == Profile::avProfileTypeVideo )
176-
{
177-
OutputVideo* outputVideo = new OutputVideo();
178-
179-
_outputEssence = outputVideo;
180-
VideoFrameDesc inputVideoFrameDesc = static_cast<DummyVideo*>( _inputEssence )->getVideoDesc().getVideoFrameDesc();
181-
outputVideo->setProfile( profile, inputVideoFrameDesc );
182-
183-
_outputStream = &outputFile.addVideoStream( outputVideo->getVideoDesc() );
184-
_sourceBuffer = new VideoFrame( outputVideo->getVideoDesc().getVideoFrameDesc() );
185-
_frameBuffer = new VideoFrame( outputVideo->getVideoDesc().getVideoFrameDesc() );
186-
187-
_transform = new VideoEssenceTransform();
188-
189-
return;
190-
}
191-
192192
throw std::runtime_error( "unupported stream type" );
193193
}
194194

0 commit comments

Comments
 (0)