Playing AVI File on Direct3D Retained Mode Texture

ID: Q155951


The information in this article applies to:
  • Microsoft DirectX Software Development Kit, version 2.0, used with:
    • Microsoft Windows 95


SUMMARY

The AVIRM sample demonstrates a method of streaming video from an Audio- Video Interleaved (.avi) file onto a Direct3D Retained Mode texture. The texture is created with the IDirect3DRM::CreateTexture() method and is updated by modifying the memory pointed to by the buffer1 member of the D3DRMIMAGE structure specified.

The stretching capabilities of DirectDraw are used to stretch the AVI frames to fit a 256 by 256 DirectDraw surface used to update the texture. The texture is modified each frame, and the IDirect3DRMTexture::Changed() method is called to inform the renderer of the change.

This sample was developed using Microsoft's Visual C++ 4.x Developer Studio. To build the sample, the development environment must include the DirectX 2 SDK.


MORE INFORMATION

The following file is available for download from the Microsoft Download Center. Click the file name below to download the file:

Avirm.exe
For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.


REFERENCES

AVI streaming code from the AVIDD95 sample was used in this sample. Please see the following article in the Microsoft Knowledge Base:

Q154789 SAMPLE: AVI Playback (Streaming) onto DirectDraw Surface

Additional query words: kbfile

Keywords : kbfile kbgraphic kbmm kbsample KbDirectX kbSDKWin32 kbWinOS95
Version : WINDOWS:2.0,95
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: December 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.