Skip to content

Commit 434b31c

Browse files
author
Clement Champetier
committed
StreamTranscoder: add private functions to check the current processing case
1 parent 469f4d8 commit 434b31c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,4 +464,19 @@ double StreamTranscoder::getDuration() const
464464
return std::numeric_limits<double>::max();
465465
}
466466

467+
bool StreamTranscoder::isTranscodeCase() const
468+
{
469+
return _inputStream && _inputDecoder;
470+
}
471+
472+
bool StreamTranscoder::isRewrapCase() const
473+
{
474+
return _inputStream && ! _inputDecoder;
475+
}
476+
477+
bool StreamTranscoder::isGeneratorCase() const
478+
{
479+
return ! _inputStream;
480+
}
481+
467482
}

src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ class AvExport StreamTranscoder
9494
bool processRewrap();
9595
bool processTranscode( const int subStreamIndex = -1 ); ///< By default transcode all channels
9696

97+
bool isTranscodeCase() const;
98+
bool isRewrapCase() const;
99+
bool isGeneratorCase() const;
100+
97101
private:
98102
IInputStream* _inputStream; ///< Input stream to read next packet (has link, no ownership)
99103
IOutputStream* _outputStream; ///< Output stream to wrap next packet (has link, no ownership)

0 commit comments

Comments
 (0)