SDL from .Net C++ WinForms - threading issue
"awdorrin" <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
I have been working on building a video player object that I can embed into a .Net application. The intent is for a component that I can drop on a C# form. Currently using a .Net C++ (managed) dll to call a native C++ class that interfaces to SDL and FFMPEG. I am passing in a handle of a windows forms panel into the .Net DLL class and using SetWindowPos() and SetParent() to get the SDL window in the correct location. Things were working well, but I had the decoding/rendering loop launched from a form button, which meant it was on the GUI thread. I then moved the decoding/rendering code into its own thread, and ran into some issues. I can move the window around the screen and the video keeps playing, but the moment I try to resize the video frame, the video stops playing. The last frame displayed will resize as the window is resized, but no more video updates. Interesting thing is, if I put break points in the decoding/rendering thread, it is still chugging away and runs until it reaches the end of the video file. I believe this is some sort of cross-thread conflict, but I'm stumped as to what the cause might be. Any ideas would be greatly appreciated! Thanks -Al _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org