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

Commitc619856

Browse files
author
Clement Champetier
committed
VideoProperties: return fps as a float type
Double type is not constructed the same way in C++ and Java, and doesnot exist in python. Our bindings of 'C++ double' could create issues,and since a fps with a simple precision is enough, we decided to returnfps as float.
1 parentcda8459 commitc619856

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/AvTranscoder/mediaProperty/VideoProperties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,9 @@ int VideoProperties::getLevel() const
518518
return _codecContext->level;
519519
}
520520

521-
doubleVideoProperties::getFps()const
521+
floatVideoProperties::getFps()const
522522
{
523-
size_t nbFrames =getNbFrames();
523+
constsize_t nbFrames =getNbFrames();
524524
if( nbFrames )
525525
{
526526
double duration =getDuration();
@@ -531,7 +531,7 @@ double VideoProperties::getFps() const
531531

532532
// if nbFrames of stream is unknwon
533533
Rational timeBase =getTimeBase();
534-
double fps = timeBase.den / (double) timeBase.num;
534+
float fps = timeBase.den / (double) timeBase.num;
535535
if(std::isinf( fps ) )
536536
{
537537
std::ostringstream os;

‎src/AvTranscoder/mediaProperty/VideoProperties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AvExport VideoProperties : public StreamProperties
5656
intgetProfile()const;
5757
intgetLevel()const;
5858

59-
doublegetFps()const;
59+
floatgetFps()const;
6060

6161
boolhasBFrames()const;
6262
//bool isClosedGop() const;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp