Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

emmicart

OpenGL OpenGL & AVI/MPEG playback problem

This topic is 6085 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings, In my current OpenGL application, I need to be able to play an AVI/MPEG file at any time (basic 2D rendering of the video, no need for any 3D video-texture). My problem is that when I do play the AVI file, I''m loosing some of my textures (both in software rendering and with my GeForce 2 MX OpenGL driver). I''ve tried to play the video in a separate process too, the results are the same. I''m using DirectShow to render the video file in a separate window, displayed just over the OpenGL rendering window. This seems to conflict with the OpenGL drivers. But when I launch the AVI from the Mediaplayer while my OpenGL app is running, I don''t loose any texture. Do you know how I could solve this problem ? Thanks, Emmanuel.

Share this post


Link to post
Share on other sites
Advertisement
I don''t know if you''ve found this, but there''s a recent NeHe tutorial dealing with video. I haven''t gone throught it yet (I''ve got far more important things at the moment to do ), but it should help you out. I think it uses Video For Windows instead of DirectShow.

You can find it at http://nehe.gamedev.net/tutorials/lesson36.asp

I seem to remember somebody saying that it''s generally a bad idea to use OpenGL and a MS rendering API together...

Simon Wilson,
XEOS Digital Development

Share this post


Link to post
Share on other sites
Greetings,

Sure, I took a look at this excellent tutorial, but it mainly
explains how to render a video to a texture. In my case, I
want to render the video + sound streams in my window.

After some more experiments, it appears that even if I launch
the Mediaplayer application while my app is running, I also
loose textures (either in software & hardware mode) !!!

I''ve found a workaround to my problem: after the video has finished to play, I recreate the OpenGL rendering context.
But this involves reloading all the textures, which can be
a pain and is really not elegant ... But it works.

If someone has a better way to do it, please let me know.

Thanks,
Emmanuel.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!