File tree Expand file tree Collapse file tree 3 files changed +1
-16
lines changed
src/AvTranscoder/mediaProperty Expand file tree Collapse file tree 3 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -189,15 +189,6 @@ Rational AudioProperties::getTimeBase() const
189
189
return timeBase;
190
190
}
191
191
192
- double AudioProperties::getFps () const
193
- {
194
- Rational timeBase = getTimeBase ();
195
- double fps = timeBase.den / (double ) timeBase.num ;
196
- if ( isinf ( fps ) )
197
- fps = 0.0 ;
198
- return fps;
199
- }
200
-
201
192
double AudioProperties::getDuration () const
202
193
{
203
194
Rational timeBase = getTimeBase ();
@@ -224,7 +215,6 @@ PropertiesMap AudioProperties::getPropertiesAsMap() const
224
215
detail::add ( dataMap, " channelDescription" , getChannelDescription () );
225
216
detail::add ( dataMap, " ticksPerFrame" , getTicksPerFrame () );
226
217
detail::add ( dataMap, " timeBase" , getTimeBase () );
227
- detail::add ( dataMap, " fps" , getFps () );
228
218
detail::add ( dataMap, " duration" , getDuration () );
229
219
230
220
for ( size_t metadataIndex = 0 ; metadataIndex < _metadatas.size (); ++metadataIndex )
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ class AvExport AudioProperties
35
35
36
36
size_t getTicksPerFrame () const ;
37
37
Rational getTimeBase () const ;
38
- double getFps () const ; // /< Corresponds to the number of audio samples for one video frame
39
38
double getDuration () const ;
40
39
41
40
PropertiesMap& getMetadatas () { return _metadatas; }
Original file line number Diff line number Diff line change @@ -478,11 +478,7 @@ int VideoProperties::getLevel() const
478
478
479
479
double VideoProperties::getFps () const
480
480
{
481
- Rational timeBase = getTimeBase ();
482
- double fps = timeBase.den / (double ) timeBase.num ;
483
- if ( isinf ( fps ) )
484
- fps = 0.0 ;
485
- return fps;
481
+ return getNbFrames () / getDuration ();
486
482
}
487
483
488
484
double VideoProperties::getDuration () const
You can’t perform that action at this time.
0 commit comments