text: #
  #       DVR-Scan: Find & Export Motion Events in Video Footage
  #   --------------------------------------------------------------
  #     [  Site: https://github.com/Breakthrough/DVR-Scan/   ]
  #     [  Documentation: http://dvr-scan.readthedocs.org/   ]
  #
  # This file contains all platform/library specific code, intended to improve
  # compatibility of DVR-Scan with a wider array of software versions.
  #
  # Copyright (C) 2016-2017 Brandon Castellano <http://www.bcastell.com>.
  #
  # DVR-Scan is licensed under the BSD 2-Clause License; see the included
  # LICENSE file or visit one of the following pages for details:
  #  - https://github.com/Breakthrough/DVR-Scan/
  #
  # This software uses Numpy and OpenCV; see the LICENSE-NUMPY and
  # LICENSE-OPENCV files or visit the above URL for details.
  #
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  # IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  # OTHER DEALINGS IN THE SOFTWARE.
  #
  
  # Third-Party Library Imports
  import cv2
  
  # Compatibility fix for OpenCV < 3.0
  if (int(cv2.__version__[0]) <= 3):
      cv2.CAP_PROP_FRAME_WIDTH = cv2.cv.CV_CAP_PROP_FRAME_WIDTH
      cv2.CAP_PROP_FRAME_HEIGHT = cv2.cv.CV_CAP_PROP_FRAME_HEIGHT
      cv2.CAP_PROP_FPS = cv2.cv.CV_CAP_PROP_FPS
      cv2.CAP_PROP_POS_MSEC = cv2.cv.CV_CAP_PROP_POS_MSEC
      cv2.CAP_PROP_POS_FRAMES = cv2.cv.CV_CAP_PROP_POS_FRAMES
      cv2.CAP_PROP_FRAME_COUNT = cv2.cv.CV_CAP_PROP_FRAME_COUNT
  
  
  def get_tqdm():
      """ Safely attempts to import the tqdm module, returning either a
      reference to the imported module, or None if tqdm was not found."""
      try:
          import tqdm
          return tqdm
      except ImportError:
          print("")
      return None
  