Small Media Library is an independent tool set that can be used by a host application to generate bitmaps from video sources in real time. It is provided as a single binary intended for use with .NET applications.

Figure 1. illustrates how Small Media Library may fit within an application.


Figure 1. A VideoPlayer instance in context


1. Loading

Go to the Download page to access the latest stable version of Small Media Library. It is supplied as a single binary. Add a reference to this to your project (and double click to view its contents in Object Explorer)



Figure 2. The members of VideoPlayer in ObjectExplorer


The Small Media Library runtime makes use of DirectShow, which should be available on every version of Windows from CE up. If you wish to build Small Media Library, then you will require the Windows SDK.

2. Important Classes

If you view Small Media Library in object explorer you will see a number of types:

  • VideoMemoryRenderer – this is the filter that receives the video data, samples and writes it. This is created and managed entirely within the library and is not of concern to the host application.
  • VideoFrame – an instance of this is passed to the VideoPlayer instance; it defines where to write the video data and in what format.
  • MediaPlayer – the base class for all the players in the library. This should not be utilised by the host as it has no purpose but to provide functionality to its subclasses.
  • VideoPlayer – this is the object that will read the video, manage the playback and marshal the data into the destination.

To play back video into memory, a host application is required to create a VideoPlayer instance, and at least one VideoFrame instance*.



(*If you don’t create a VideoFrame, VideoPlayer will create one for you that will send the video data into oblivion)

Last edited Jun 6, 2012 at 10:52 PM by sebastianfriston, version 2


No comments yet.