Jump to content
  • Advertisement
Sign in to follow this  
Dave1024

Video Playing Using Thread

This topic is 3755 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

I am using Thread For Play the video.I am using two thread one for Frame Reading& Best Matched Display Format. Another for Rendering. Using CView Class I can Integrate the DirectX Application with MFC The pseudo code of my work as follows Event Handler For Play Button { Calculate Total Frame Create Thread1 Create Thread2 WaitForCompletion -Thread 1 Wait For Completion- Thread 2 Close Thread1 Handle Close Thread2 Handle } Thread Proce1 { Loop:current Frame != Total { //Read And Convert } } Thread Proce2 { Loop : current Frame != Total { //Render to the view port. } } Here i face a problem . When Start the thread then No other GUI Controls Respond.Window Minimize & Maximize Disable.This continue till the video playing ends.After the playing is complete the GUI is respond in a FIFO Manner.I think the message queue's first message is executed. How i solve this dirty problem ? Any change in the design is necessary??

Share this post


Link to post
Share on other sites
Advertisement
Well if both of your treads are busy doing processing, they're not handling messages. This means your windows and controls won't respond. You need to have the thread that created the windows keep running so they can pump the message loop.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!