I use both the renderer and ctrlPoint services on the same device, the renderer function is normal, but ctrlPoint can't search for the device on the current network。 Can someone tell me why? the code is as follows:
class MyCtrlPointListener : public PLT_CtrlPointListener {
public:
virtual ~MyCtrlPointListener() {}
virtual NPT_Result OnDeviceAdded(PLT_DeviceDataReference& device) {
return NPT_SUCCESS;
}
virtual NPT_Result OnDeviceRemoved(PLT_DeviceDataReference& device) {
return NPT_SUCCESS;
}
virtual NPT_Result OnActionResponse(NPT_Result res, PLT_ActionReference& action, void* userdata) {
return NPT_SUCCESS;
};
virtual NPT_Result OnEventNotify(PLT_Service* service, NPT_List<PLT_StateVariable*>* vars) {
return NPT_SUCCESS;
};
};
s_upnp.SetIgnoreLocalUUIDs(true);
PLT_CtrlPointReference ctrlPoint(new PLT_CtrlPoint());
MyCtrlPointListener* listener = new MyCtrlPointListener();
ctrlPoint->AddListener(listener);
if (NPT_SUCCEEDED(s_upnp.AddCtrlPoint(ctrlPoint)))
{
std::cout << "add ctrlPoint." << std::endl;
}
if (NPT_SUCCEEDED(s_upnp.AddDevice(device)))
{
device.Detach();
device = NULL;
if (NPT_SUCCEEDED(s_upnp.Start()))
{
return true;
}
I use both the renderer and ctrlPoint services on the same device, the renderer function is normal, but ctrlPoint can't search for the device on the current network。 Can someone tell me why? the code is as follows: