Microsoft DirectX 9.0

Other Source Objects

In addition to video and audio sources, DirectShow Editing Sources (DES) supports the following source objects.

Still Images

DES supports the following file formats for still images:

These files can be used as still images or to create animations. For bitmap, JPEG, and Targa files, if you are using the file as a still image, call the IAMTimelineSrc::SetDefaultFPS method to set the frame rate to zero.

DIB Sequences

Given a series of bitmap, JPEG, or Targa files, the render engine can construct a DIB sequence. To create a DIB sequence, give the files numerically sequential names, such as Image001.bmp, Image002.bmp, Image003.bmp, and so on. Use the first file in the sequence as the source. Set the frame rate for the sequence by calling IAMTimelineSrc::SetDefaultFPS. The render engine cycles through the images in the sequence at the specified frame rate.

If the sequence is too short to fill the duration, given the frame rate, the rest of the duration is solid black. No error occurs during rendering.

GIF Sources

DES supports GIF sources, including animated and transparent GIFs, using the GIF89a specification. With an animated GIF, unlike the other file types, you do not need to set the frame rate. The GIF file specifies the delay between each image in the animation.

To support transparent GIFs, DES converts transparent regions in the image to the RGB triplet RGB(0,0,0). You can then use the Key Transition to key on RGB(0,0,0).

DES also converts any black regions that fall within the range RGB(0–7,0–7,0–7) to the value RGB(8,8,8)—except for the transparency index, if it falls in that range. This conversion is not detectable to the eye.

Video Color Source

The Video Color Source object creates a continuous video image of a solid color. One use for this object is to make it a layer in a transition. For example, use it in a video fade-in or fade-out.

Custom Source Filters

DES can use a DirectShow source filter as a timeline source, if the filter meets the following conditions:

To use a custom source, specify the CLSID of the filter as the subobject GUID of the source object. For more information, see Subobjects. To support custom properties, implement them as IDispatch "put" properties. Only static properties are supported on source objects; dynamic properties are not supported.