c# - WPF GUI starving network messages -


i developing window7, c#/wpf based gui using blend/xaml , want show h.264 video rtp stream of video call. using c based open source library making video call. have created unmanaged code dll using c based library make video call. p-invoke wpf gui dll works fine.

however notice wpf gui starving network thread used make calls , send/receive network messages. there way around problem? remember using xaml (not code) wpf gui.

you need create new delegate, , pass unmanaged thread. such as:

public delegate int passh264stream(byte[] buffer, int len); public passh264stream testdelegate = {};  testdelegate += (buffer, len) => application.current.dispatcher.begininvoke(new action(()   => receiveinuithread(buffer, len)), dispatcherpriority.render); 

and pass testdelegate unmanaged thread through pinvoke. idea have unmanaged thread call ui thread , post stuff message loop, without blocking ui.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -