directxdirectshowvideo-processingdirectx-9direct3d9

Render video to Direct3D 9.0c texture


I have been trying to play a video in my Direct3D application and have been trying to do so with the help of DirectShow. My problem is that I cannot find how to get the frame data to put into a texture (ISampleGrabber won't install).

Does anyone know of any methods or examples of this being done?


Solution

    1. ISampleGrabber is available in all versions of Windows released last 15+ years
    2. Look for "Microsoft® DirectX® 9.0 SDK Update (October 2004)" which contains sample app, which does exactly what you want:

    Texture3D Sample Description

    Draws video on a Microsoft® Direct3D texture surface.

    Note This sample does not support changing the display properties of the monitor while the sample is running.

    Path

    Source: (SDK root)\Samples\C++\DirectShow\Players\Texture3D

    Executable: (SDK root)\Samples\C++\DirectShow\Bin\Texture3D.exe

    UPDATE. Even though Sample Grabber existed though many many versions of Windows, it was finally removed along with other filters hosted by qedit.dll in most recent versions of operating systems (Windows Server 2008 in particular). Those whose application are dependent on this API, should consider building a replacement using Grabber sample from older SDKs. The same applies to those needing this filter because of so many references on Internet and tutorials on how to use it to get access to media streams.

    The filter was removed silently and without any replacement. Microsoft suggests that Media Foundation is an alternate option and successor to DirectShow, which is however hardly helpful.