OGRECave / ogre-audiovideo

plugins for theora video playback and openAL audio
https://ogrecave.github.io/ogre-audiovideo/
BSD 3-Clause "New" or "Revised" License
14 stars 11 forks source link

(Draft) Use OgreThreadDefines.h for threading #14

Closed sercero closed 3 years ago

sercero commented 3 years ago

fixes #13

sercero commented 3 years ago

@paroj I need to know the value of the variable OGRE_CONFIG_THREAD_PROVIDER from within the Ogre Audio-Video CMakelists.txt, how can I do that?

That is because I need to know which library to include (boost/POCO/TBB/etc...)

EDIT: I was able to access the variable OGRE_LIBRARIES from OGREConfig.cmake, and the threading library is listed there but I don't like the fact that it is not standarised and the method to deduce the threading library is ugly.

Thanks!

paroj commented 3 years ago

it should be sufficient to link against OgreMain as this cmake target will implicitly pull in any threading libraries it uses

paroj commented 3 years ago

do you have any issues with the ogre_threads branch?

sercero commented 3 years ago

Yes, it has the same issue as my branch std_thread (I did not submit that PR).

But the crash is exactly the same as #16

It crashes when doing mUpdateThread->join();.

To trigger this you have to be running inside a debugger, otherwise the program exists normally both with Debug and Release versions.

paroj commented 3 years ago

hmm.. seems this is platform specific. I cannot reproduce this on Linux with the player demo - even with a debugger attached.

sercero commented 3 years ago

I see, might be something with Windows + MinGW64.

So it's important to keep the flag OGGSOUND_THREADED for people that might hit this bug and want to disable threading as a result.

In my case, I wasn´t able to find a solution, tried many things but eventually gave up.

Perhaps someday I will try again, for now I want to do some other things.

Thanks!