Playing AVIs

Is it possible to play AVIs in OpenGL? I mean to Use a poly or something to display a video in a window using OpenGL. If yes than where it is could be written?

You can find avi playing routine at NeHe Tutorials #36. It displays avi to a texture


How about other files besides AVI’s? Is that possible?