A
Anonymous
Guest
I'm working on integrating WinLIRC control of an external tuner.
I am implementing the funtionality in a similar way to USBUIRC.
I can't figure out why an event listener does not fire. Can anyone shed any light on this???? If USBUIRC is working, I can't figure out why this code does not work. I put some debug messages into the log, and I verify that the code that sends the message works, but the debug message in the recieve section of the code does not ever print to the log. Any ideas???? Thx...
This is the message being sent:.GUI_MSG_TUNE_EXTERNAL_CHANNEL
In recorder.cs, the message is sent:
static void TuneExternalChannel(string strChannelName, TVCaptureDevice theDev)
{
foreach (TVChannel chan in m_TVChannels)
{
if (chan.Name.Equals(strChannelName))
{
if (chan.External)
{
GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_TUNE_EXTERNAL_CHANNEL,0,0,0,0,0,null);
msg.Label=chan.ExternalTunerChannel;
msg.Label2 = theDev.FriendlyName;
GUIWindowManager.SendThreadMessage(msg);
Log.Write("********Sent message to tune external");
}
return;
}
}
}
In MediaPortal.cs, the message is listened to:
private void OnMessage(GUIMessage message)
{
switch (message.Message)
{
case GUIMessage.MessageType.GUI_MSG_CD_INSERTED:
AutoPlay.ExamineCD(message.Label);
break;
case GUIMessage.MessageType.GUI_MSG_SHOW_WARNING:
{
string strHead=GUILocalizeStrings.Get(message.Param1);
string strLine1=GUILocalizeStrings.Get(message.Param2);
string strLine2=GUILocalizeStrings.Get(message.Param3);
ShowInfo(strHead,strLine1,strLine2);
}
break;
case GUIMessage.MessageType.GUI_MSG_TUNE_EXTERNAL_CHANNEL :
Log.Write("*************Received Message to change external channel");
try...
I am implementing the funtionality in a similar way to USBUIRC.
I can't figure out why an event listener does not fire. Can anyone shed any light on this???? If USBUIRC is working, I can't figure out why this code does not work. I put some debug messages into the log, and I verify that the code that sends the message works, but the debug message in the recieve section of the code does not ever print to the log. Any ideas???? Thx...
This is the message being sent:.GUI_MSG_TUNE_EXTERNAL_CHANNEL
In recorder.cs, the message is sent:
static void TuneExternalChannel(string strChannelName, TVCaptureDevice theDev)
{
foreach (TVChannel chan in m_TVChannels)
{
if (chan.Name.Equals(strChannelName))
{
if (chan.External)
{
GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_TUNE_EXTERNAL_CHANNEL,0,0,0,0,0,null);
msg.Label=chan.ExternalTunerChannel;
msg.Label2 = theDev.FriendlyName;
GUIWindowManager.SendThreadMessage(msg);
Log.Write("********Sent message to tune external");
}
return;
}
}
}
In MediaPortal.cs, the message is listened to:
private void OnMessage(GUIMessage message)
{
switch (message.Message)
{
case GUIMessage.MessageType.GUI_MSG_CD_INSERTED:
AutoPlay.ExamineCD(message.Label);
break;
case GUIMessage.MessageType.GUI_MSG_SHOW_WARNING:
{
string strHead=GUILocalizeStrings.Get(message.Param1);
string strLine1=GUILocalizeStrings.Get(message.Param2);
string strLine2=GUILocalizeStrings.Get(message.Param3);
ShowInfo(strHead,strLine1,strLine2);
}
break;
case GUIMessage.MessageType.GUI_MSG_TUNE_EXTERNAL_CHANNEL :
Log.Write("*************Received Message to change external channel");
try...