Skip to content

Update transcoder API #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/AvTranscoder/transcoder/StreamTranscoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,18 @@ class AvExport StreamTranscoder
*/
double getDuration() const;

/// Returns a reference to the current decoder used by the streamTranscoder (from input file or from generator)
/// Returns a reference to the current decoder (from input file or from generator)
IDecoder& getCurrentDecoder() const { return *_currentDecoder; }
/// Returns a reference to the encoder
IEncoder& getEncoder() const { return *_outputEncoder; }

/// Returns a reference to the object which transforms the decoded data
ITransform& getTransform() const { return *_transform; }

/// Returns a reference to the stream which unwraps data
IInputStream& getInputStream() const { return *_inputStream; }
/// Returns a reference to the stream which wraps data
IOutputStream& getOutputStream() const { return *_outputStream; }

/**
* @brief Returns if the stream can switch to a generator when ended
Expand Down
11 changes: 11 additions & 0 deletions src/AvTranscoder/transcoder/Transcoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,23 @@ class AvExport Transcoder
void process( IProgress& progress );
void process(); ///< Call process with no display of progression

/**
* @brief Return the list of streams added to the transcoder.
*/
std::vector< StreamTranscoder* >& getStreamTranscoders() { return _streamTranscoders; }

/**
* @param streamIndex: careful about the order of stream insertion of the Transcoder.
* @return a reference to a stream manage by the Transcoder.
*/
StreamTranscoder& getStreamTranscoder( size_t streamIndex ) const { return *_streamTranscoders.at( streamIndex ); }

/**
* @brief Get current processMethod
* @see EProcessMethod
*/
EProcessMethod getProcessMethod() const { return _eProcessMethod; }

/**
* @brief Set the transcoding policy.
* @note By default eProcessMethodBasedOnStream at index 0.
Expand Down