@@ -33,7 +33,7 @@ Transcoder::~Transcoder()
33
33
}
34
34
}
35
35
36
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const std::string& profileName, const double offset )
36
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const std::string& profileName, const float offset )
37
37
{
38
38
// Re-wrap
39
39
if ( profileName.length () == 0 )
@@ -52,7 +52,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
52
52
}
53
53
}
54
54
55
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const std::string& profileName, ICodec& codec, const double offset )
55
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const std::string& profileName, ICodec& codec, const float offset )
56
56
{
57
57
// Re-wrap
58
58
if ( profileName.length () == 0 )
@@ -71,7 +71,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
71
71
}
72
72
}
73
73
74
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const ProfileLoader::Profile& profile, const double offset )
74
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const ProfileLoader::Profile& profile, const float offset )
75
75
{
76
76
// Check filename
77
77
if ( ! filename.length () )
@@ -80,7 +80,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
80
80
addTranscodeStream ( filename, streamIndex, -1 , profile, offset );
81
81
}
82
82
83
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const ProfileLoader::Profile& profile, ICodec& codec, const double offset )
83
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const ProfileLoader::Profile& profile, ICodec& codec, const float offset )
84
84
{
85
85
// Generator
86
86
if ( ! filename.length () )
@@ -94,7 +94,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
94
94
}
95
95
}
96
96
97
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const std::string& profileName, const double offset )
97
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const std::string& profileName, const float offset )
98
98
{
99
99
// No subStream selected
100
100
if ( subStreamIndex < 0 )
@@ -124,7 +124,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
124
124
}
125
125
}
126
126
127
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const std::string& profileName, ICodec& codec, const double offset )
127
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const std::string& profileName, ICodec& codec, const float offset )
128
128
{
129
129
// No subStream selected
130
130
if ( subStreamIndex < 0 )
@@ -155,7 +155,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
155
155
}
156
156
}
157
157
158
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const ProfileLoader::Profile& profile, const double offset )
158
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const ProfileLoader::Profile& profile, const float offset )
159
159
{
160
160
// No subStream selected
161
161
if ( subStreamIndex < 0 )
@@ -171,7 +171,7 @@ void Transcoder::add( const std::string& filename, const size_t streamIndex, con
171
171
addTranscodeStream ( filename, streamIndex, subStreamIndex, profile, offset );
172
172
}
173
173
174
- void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const ProfileLoader::Profile& profile, ICodec& codec, const double offset )
174
+ void Transcoder::add ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const ProfileLoader::Profile& profile, ICodec& codec, const float offset )
175
175
{
176
176
// No subStream selected
177
177
if ( subStreamIndex < 0 )
@@ -282,7 +282,7 @@ void Transcoder::setProcessMethod( const EProcessMethod eProcessMethod, const si
282
282
_outputDuration = outputDuration;
283
283
}
284
284
285
- void Transcoder::addRewrapStream ( const std::string& filename, const size_t streamIndex, const double offset )
285
+ void Transcoder::addRewrapStream ( const std::string& filename, const size_t streamIndex, const float offset )
286
286
{
287
287
LOG_INFO ( " Add rewrap stream from file '" << filename << " ' / index=" << streamIndex << " / offset=" << offset << " s" )
288
288
@@ -292,7 +292,7 @@ void Transcoder::addRewrapStream( const std::string& filename, const size_t stre
292
292
_streamTranscoders.push_back ( _streamTranscodersAllocated.back () );
293
293
}
294
294
295
- void Transcoder::addTranscodeStream ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const double offset )
295
+ void Transcoder::addTranscodeStream ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const float offset )
296
296
{
297
297
// Get profile from input file
298
298
InputFile inputFile ( filename );
@@ -306,7 +306,7 @@ void Transcoder::addTranscodeStream( const std::string& filename, const size_t s
306
306
addTranscodeStream ( filename, streamIndex, subStreamIndex, profile, offset );
307
307
}
308
308
309
- void Transcoder::addTranscodeStream ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const ProfileLoader::Profile& profile, const double offset )
309
+ void Transcoder::addTranscodeStream ( const std::string& filename, const size_t streamIndex, const int subStreamIndex, const ProfileLoader::Profile& profile, const float offset )
310
310
{
311
311
// Add profile
312
312
if ( ! _profileLoader.hasProfile ( profile ) )
@@ -348,7 +348,7 @@ void Transcoder::addDummyStream( const ProfileLoader::Profile& profile, const IC
348
348
_streamTranscoders.push_back ( _streamTranscodersAllocated.back () );
349
349
}
350
350
351
- InputFile* Transcoder::addInputFile ( const std::string& filename, const size_t streamIndex, const double offset )
351
+ InputFile* Transcoder::addInputFile ( const std::string& filename, const size_t streamIndex, const float offset )
352
352
{
353
353
InputFile* referenceFile = NULL ;
354
354
@@ -532,7 +532,7 @@ void Transcoder::fillProcessStat( ProcessStat& processStat )
532
532
if ( encoderContext.coded_frame && ( encoderContext.flags & CODEC_FLAG_PSNR) )
533
533
{
534
534
videoStat._quality = encoderContext.coded_frame ->quality ;
535
- videoStat._psnr = VideoStat::psnr (encoderContext.coded_frame ->error [0 ] / (encoderContext.width * encoderContext.height * 255.0 * 255.0 ) );
535
+ videoStat._psnr = VideoStat::psnr ( encoderContext.coded_frame ->error [0 ] / ( encoderContext.width * encoderContext.height * 255.0 * 255.0 ) );
536
536
}
537
537
processStat.addVideoStat ( streamIndex, videoStat );
538
538
break ;
0 commit comments