AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConsoleProgress.cpp
Go to the documentation of this file.
1 #include "ConsoleProgress.hpp"
2 
3 #include <iostream>
4 #include <iomanip>
5 
6 namespace avtranscoder
7 {
8 
10 {
11 }
12 
13 EJobStatus ConsoleProgress::progress(const double processedDuration, const double programDuration)
14 {
15  // The program could be an image (programDuration = 0)
16  double progressDuration = programDuration ? processedDuration / programDuration : 0;
17 
18  std::string progress(80, '-');
19  std::string done(80.0 * progressDuration, '#');
20  progress.replace(0, done.size(), done);
21 
22  std::cout << std::setprecision(2) << std::fixed << "\r[" << progress << "] " << processedDuration << "/"
23  << programDuration << std::flush;
24 
25  return eJobStatusContinue;
26 }
27 }
EJobStatus
Indicate the state of a process.
Definition: IProgress.hpp:12
EJobStatus progress(const double processedDuration, const double programDuration)
Manage the progress.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy