SAMPLE: Playing AVI File on Direct3D Retained Mode Texture

Last reviewed: September 5, 1997
Article ID: Q155951
4.03 WINDOWS kbgraphic kbmm kbprg kbfile

The information in this article applies to:

  • Microsoft DirectX 2 Software Development Kit (SDK), for Windows 95, version 4.03

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.

You can find AVIRM.EXE (size: 28578 bytes) 
                      , a 28K self-extracting file, on the following
services:
  • Microsoft's World Wide Web Site on the Internet

          On the www.microsoft.com home page, click the Support icon.
          Click Knowledge Base, and select the product.
    
          Enter kbfile AVIRM.EXE (size: 28578 bytes) 
                                , and click GO!
          Open the article, and click the button to download the file.
    
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the Softlib/Mslfiles folder.
          Get AVIRM.EXE (size: 28578 bytes) 
    
  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download AVIRM.EXE (size: 28578 bytes) 
    

For additional information about downloading, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online
               Services


REFERENCES

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

   ARTICLE-ID: Q154789
   TITLE     : SAMPLE: AVI Playback (Streaming) onto DirectDraw Surface


KBCategory: kbgraphic kbmm kbprg kbfile
KBSubcategory: Direct3D
Additional reference words: 4.03 kbdsd
Keywords : Direct3D kbfile kbgraphic kbmm kbprg
Technology : kbDirectXSDK
Version : 4.03
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.