1

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?

DrYap
  • 6,525
  • 2
  • 31
  • 54

1 Answers1

3
  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.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • I have the June 2010 SDK and it is not there. – DrYap Nov 14 '11 at 17:35
  • You have to get the older one (see answer) to get the sample. It was removed from SDK later. – Roman R. Nov 14 '11 at 17:49
  • I downloaded the "Microsoft Windows SDK Update for Windows Vista and .NET Framework 3.0" and that has the headers I need. I also found [the samples online](http://csclab.murraystate.edu/bob.pilgrim/info/game_stuff/DirectX%20(C++)/Samples/C++/DirectShow/Players/Texture3D/) – DrYap Nov 14 '11 at 18:27
  • 1
    I can't find the `Texture3D` sample anywhere. However, I did find `Texture3D9 Sample`, which is in Windows SDK Version 6.1: http://www.microsoft.com/en-us/download/details.aspx?id=24826 – speedplane Dec 27 '14 at 02:26