Skip to content

Commit 8b4a5cc

Browse files
committed
Merge pull request #160 from cchampet/dev_updateTranscoderAPI
Update transcoder API
2 parents f1824d7 + 40680fa commit 8b4a5cc

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,18 @@ class AvExport StreamTranscoder
6969
*/
7070
double getDuration() const;
7171

72-
/// Returns a reference to the current decoder used by the streamTranscoder (from input file or from generator)
72+
/// Returns a reference to the current decoder (from input file or from generator)
7373
IDecoder& getCurrentDecoder() const { return *_currentDecoder; }
74+
/// Returns a reference to the encoder
75+
IEncoder& getEncoder() const { return *_outputEncoder; }
76+
77+
/// Returns a reference to the object which transforms the decoded data
78+
ITransform& getTransform() const { return *_transform; }
79+
80+
/// Returns a reference to the stream which unwraps data
81+
IInputStream& getInputStream() const { return *_inputStream; }
82+
/// Returns a reference to the stream which wraps data
83+
IOutputStream& getOutputStream() const { return *_outputStream; }
7484

7585
/**
7686
* @brief Returns if the stream can switch to a generator when ended

src/AvTranscoder/transcoder/Transcoder.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,23 @@ class AvExport Transcoder
122122
void process( IProgress& progress );
123123
void process(); ///< Call process with no display of progression
124124

125+
/**
126+
* @brief Return the list of streams added to the transcoder.
127+
*/
128+
std::vector< StreamTranscoder* >& getStreamTranscoders() { return _streamTranscoders; }
129+
125130
/**
126131
* @param streamIndex: careful about the order of stream insertion of the Transcoder.
127132
* @return a reference to a stream manage by the Transcoder.
128133
*/
129134
StreamTranscoder& getStreamTranscoder( size_t streamIndex ) const { return *_streamTranscoders.at( streamIndex ); }
130135

136+
/**
137+
* @brief Get current processMethod
138+
* @see EProcessMethod
139+
*/
140+
EProcessMethod getProcessMethod() const { return _eProcessMethod; }
141+
131142
/**
132143
* @brief Set the transcoding policy.
133144
* @note By default eProcessMethodBasedOnStream at index 0.

0 commit comments

Comments
 (0)