leapmotion / DShowBaseClasses

Microsoft DirectShow base classes wrapped in CMake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DirectShow Base Classes

This file just contains the Microsoft DirectShow base classes wrapped up in a nice CMakeLists.txt for use with projects that use CMake but still rely on these old libraries. Some modifications have been made to make these source compile without errors on the latest platform SDK, other than that they are provided more or less as they came with the Windows 7.1 SDK Samples.

Configuration

To configure, build, and package:

cmake . -G "Visual Studio 12 2013 Win64"
cmake . --build . --config Release
cpack

The packaged result will be called baseclasses-<version>-win64.zip. 32 bit builds are configured the same way, just omit the Win64 statement.

Usage

This project was built with the intention of being found with CMake's find_package command. Usage is as follows:

find_package(baseclasses 1.0 REQUIRED)
target_link_libraries(MyDShowProject BaseClasses::BaseClasses)

You shouldn't need to reference any include directories explicitly. They will be added for you by the target_link_libraries command. To include BaseClasses in your project:

#include <baseclasses/Streams.h>

class CMyFilter:
  public CTransformFilter
{
public:
  CMyFilter(void);

  HRESULT CheckMediaType(const CMediaType* pmt) override;
  HRESULT DoRenderSample(IMediaSample* pSample) override;
};

About

Microsoft DirectShow base classes wrapped in CMake


Languages

Language:C++ 96.6%Language:C 2.8%Language:CMake 0.7%