# CinderWMF with threaded loading?

**URL:** https://discourse.libcinder.org/t/cinderwmf-with-threaded-loading/704
**Category:** Uncategorized
**Created:** [May 26, 2017, 2:28am UTC](https://discourse.libcinder.org/t/cinderwmf-with-threaded-loading/704 "2017-05-26T02:28:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Gazoo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gazoo/32/61_2.png) [@Gazoo](https://discourse.libcinder.org/u/Gazoo)
#### Post date: [May 26, 2017, 2:28am UTC](https://discourse.libcinder.org/t/cinderwmf-with-threaded-loading/704/1 "2017-05-26T02:28:01Z")

</div>

Hey Embers,

I know hardware accelerated decoding of video in OpenGL on Windows is kind of a four-letter word but it’s important to me, so I might as well dive headlong into it. I recently checked out @paul.houx’s most recent build of the [CinderWMF](https://github.com/paulhoux/Cinder-WMFVideo) cinder block.

After a days worth of testing I narrowed down the video format I can use with it, and that it seems to perform quite well. There’s a bit of a pause involved in the WMFplayer however, likely due to the files and memory allocation it goes through. Since windows code is a bit of a hellscape, I thought I’d try to solve this matter on the Cinder side, and share the OpenGL context with a thread and create the WMFplayer in it. Unfortunately, this seems to anger the WMFplayer as the internal `mState` member variable of `CPlayer` never becomes `PAUSED` and playback is never able to proceed.

So I’m asking if anyone else may have tried to get the WMFPlayer block loaded in a seperate thread with any luck?

I recall merging some code months ago in the `CPlayer` which I might take another gander at. It includes a non-blocking call to what I believe is the WMF platform in the `OpenURLAsync` function, but I ended up never actually testing/using it back then.

I’ve created [a separate code example](https://pastebin.com/rtbPSMJC) that starts the block in a separate thread if anyone is curious.

Any thoughts on the matter are most welcome. Thanks in advance!

Gazoo
