/wpl

Micro C++ library for playing AVI/WMV videos in a window on Windows. :movie_camera:

Primary LanguageCApache License 2.0Apache-2.0

alt tag

Video Library       Build status Open Source Love License

WPL or Windows Playback Library is a small C++ library to play video files inside a normal window on the Win32 operating system. I built it as having an intro video in many of my OpenGL projects was something I wanted to have. The library just wraps DirectShow and handles the painting of the window for the user. It has been used in my projects successfully and I have put it here if others are curious.

// Create a player & open a file
VideoPlayer videoPlayer;
videoPlayer.openVideo("demo.wmv");

// Set player state
videoPlayer.pause();
videoPlayer.stop();
videoPlayer.play();

// Notify the player to re render the window
videoPlayer.updateVideoWindow();
videoPlayer.repaint();

// State check functions
videoPlayer.hasFinished();
videoPlayer.hasVideo();

Features

  • Load AVI/WMV Video Files
  • DirectX based drawing
  • The ability to pause, stop and resume Videos.
  • Tell when a video has finished.

Development

  • Adjust the playback speed.
  • Disable and control audio.
  • Set drawing region for window.
  • Port project to CMake

License

Apache 2.0