private void MessageHandler(int msgtype, IntPtr msgdata)
{
switch(msgtype)
{
case (int)InterProcess.MSG_MEDIA_PAUSE:
player.Ctlcontrols.pause();
break;
case (int)InterProcess.MSG_MEDIA_RESUME:
player.Ctlcontrols.play();
break;
case (int)InterProcess.MSG_MEDIA_SEEK:
int pos = InterProcess.GetMessageData<int>(msgdata);
player.Ctlcontrols.currentPosition = (double)pos;
break;
case (int)InterProcess.MSG_MEDIA_START:
MEDIASTARTDATA startdata = InterProcess.GetMessageData<MEDIASTARTDATA>(msgdata);
muxingfile = startdata.muxfilename;
PlayFile(startdata.filename, startdata.startpos);
break;
case (int)InterProcess.MSG_MEDIA_STOP:
stopintended = true;
updatetimer.Stop();
muxingfileplaying = "";
muxplayer.Ctlcontrols.stop();
muxplayer.close();
player.Ctlcontrols.stop();
player.close();
break;
}
}