Sascha-L / WPF-MediaKit

Microsoft Public License
366 stars 116 forks source link

WorkDispatcher.DispatcherThread: Property has no public setter #47

Closed JohannesDrexler closed 7 years ago

JohannesDrexler commented 7 years ago

The class WPFMediaKit.Threading.WorkDispatcherObject has no public setter. Can this be changed to get a setter ?

xmedeko commented 7 years ago

What's your use case, why do you need that?

JohannesDrexler commented 7 years ago

I am using the WpfKit in a service to capture Thumbnails of videos and stuff like that. Because of multithreading and using of tasks i need do assign the DispatcherThread to avoid erros in "VerifyAccess()"

xmedeko commented 7 years ago

I am not sure if you can safely obey VerifyAccess this way - i.e. if it does not bring more problems. You can use Dispatcher.BeginInvoke(...) to run your task on the Dispatcher thread.

JohannesDrexler commented 7 years ago

Dispatcher.BeginInvoke works well for me. You can close that issue if you want to

thanks :)

xmedeko commented 7 years ago

Note: you can use also FFMPEG to capture video thumbnails, e.g. https://github.com/vladjerca/FFMpegSharp

JohannesDrexler commented 7 years ago

This would be also an option but i try to keep the application i work on as tiny as possible. That's why i am trying to use your package ;)

xmedeko commented 7 years ago

It's not my package, it's a community package :-). I am just helping to maintain it. Can you publish your solution how to do video thumbnail with this project when running as a service (without display) to the Wiki page https://github.com/Sascha-L/WPF-MediaKit/wiki/Headless-Examples ? Sometime people ask for this, thanks.