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

Add getters for decoded frames#331

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
17 changes: 17 additions & 0 deletionssrc/AvTranscoder/transcoder/StreamTranscoder.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,6 +100,23 @@ class AvExport StreamTranscoder
/// Returns a reference to the stream which wraps data
IOutputStream& getOutputStream() const { return *_outputStream; }

/// Returns the total number of generated frames for this processed stream
size_t getNumberOfGeneratedFrames() const {
size_t generatedFrames = 0;
for (IDecoder* generator : _generators) {
generatedFrames += generator->getNbDecodedFrames();
}
return generatedFrames;
}
/// Returns the total number of decoded frames for this processed stream
size_t getNumberOfDecodedFrames() const {
size_t decodedFrames = 0;
for (IDecoder* inputDecoder : _inputDecoders) {
decodedFrames += inputDecoder->getNbDecodedFrames();
}
return decodedFrames;
}

/**
* @brief Returns if the stream has the ability to switch to a generator.
*/
Expand Down
18 changes: 18 additions & 0 deletionssrc/AvTranscoder/transcoder/Transcoder.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -139,6 +139,24 @@ class AvExport Transcoder
void setProcessMethod(const EProcessMethod eProcessMethod, const size_t indexBasedStream = 0,
const double outputDuration = 0);

/**
* @brief Returns the total number of generated frames for a specific stream
* @param streamIndex: the index of the stream
* @return The total number of generated frames
*/
size_t getNumberOfGeneratedFrames(const size_t streamIndex) const {
return _streamTranscoders.at(streamIndex)->getNumberOfGeneratedFrames();
}

/**
* @brief Returns the total number of decoded frames for a specific stream
* @param streamIndex: the index of the stream
* @return The total number of decoded frames
*/
size_t getNumberOfDecodedFrames(const size_t streamIndex) const {
return _streamTranscoders.at(streamIndex)->getNumberOfDecodedFrames();
}

private:
void addRewrapStream(const InputStreamDesc& inputStreamDesc, const float offset);
void addTranscodeStream(const std::vector<InputStreamDesc>& inputStreamDescArray, const ProfileLoader::Profile& profile,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp