Пример #1
0
inline s64 CvCapture_FFMPEG::get_total_frames()
{
    s64 nbf = ic->streams[video_stream]->nb_frames;

    if (nbf == 0)
    {
        nbf = (s64)floor(get_duration_sec() * get_fps() + 0.5);
    }
    return nbf;
}
Пример #2
0
int64_t CvCapture_FFMPEG::get_total_frames()
{
    int64_t nbf = ic->streams[video_stream]->nb_frames;

    if (nbf == 0)
    {
        nbf = (int64_t)floor(get_duration_sec() * get_fps() + 0.5);
    }
    return nbf;
}