Go to the documentation of this file.
28 if (!in_video.
openURL(video_url,
false ,
true ))
35 unsigned int nFrames = 0;
40 double fps = ++nFrames / tictac.
Tac();
50 cout <<
"Video FPS: " << in_video.
getVideoFPS() << endl;
53 std::this_thread::sleep_for(10ms);
55 if (
win.keyHit() &&
win.waitForKey() == 27)
break;
62 int main(
int argc,
char** argv)
68 cout <<
"Usage: " << endl;
69 cout <<
" Open a video file: " << argv[0] <<
" <VIDEOFILE>" << endl;
70 cout <<
" Open an IP camera: " << argv[0]
71 <<
" rtsp://a.b.c.d/live.sdp" << endl;
80 catch (std::exception& e)
82 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
87 printf(
"Another exception!!");
void Test_FFMPEG_CaptureCamera(const std::string &video_url)
A high-performance stopwatch, with typical resolution of nanoseconds.
Contains classes for various device interfaces.
double Tac() noexcept
Stops the stopwatch.
mrpt::gui::CDisplayWindow3D::Ptr win
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
void Tic() noexcept
Starts the stopwatch.
This class creates a window as a graphical user interface (GUI) for displaying images to the user.
Classes for creating GUI windows for 2D and 3D visualization.
A class for storing images as grayscale or RGB bitmaps.
GLsizei const GLchar ** string
void pause(const std::string &msg=std::string("Press any key to continue...")) noexcept
Shows the message "Press any key to continue" (or other custom message) to the current standard outpu...
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |