1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2020-03-10 22:44:14 +00:00
12 changed files with 247 additions and 89 deletions
+5 -3
View File
@@ -495,7 +495,7 @@ struct CvCapture_FFMPEG
int64_t get_total_frames() const;
double get_duration_sec() const;
double get_fps() const;
int get_bitrate() const;
int64_t get_bitrate() const;
double r2d(AVRational r) const;
int64_t dts_to_frame_number(int64_t dts);
@@ -1425,6 +1425,8 @@ double CvCapture_FFMPEG::getProperty( int property_id ) const
if (rawMode)
return -1;
break;
case CAP_PROP_BITRATE:
return static_cast<double>(get_bitrate());
default:
break;
}
@@ -1449,9 +1451,9 @@ double CvCapture_FFMPEG::get_duration_sec() const
return sec;
}
int CvCapture_FFMPEG::get_bitrate() const
int64_t CvCapture_FFMPEG::get_bitrate() const
{
return ic->bit_rate;
return ic->bit_rate / 1000;
}
double CvCapture_FFMPEG::get_fps() const