The UPnP control point:
CP Initialization Procedure
So, at the control point startup, the sequence of operations performed is always the following (before the program could be considered as in "waiting-for-inputs" status):
- A new MyCtrlPoint object is created
- This CP launches a discovery procedure
- The discovery is repeated until at least one device of class MediaServer:1 is found (without add it to the source control point handler as default)
- A new discovery procedure is launched by CP
- The discovery is repeated until at least one device of class MediaRenderer:1 is found
- For this renderer device (the first found), two getService() methods are called, one for AVTransport and one for RenderingControl services
- CP tries to subscribe first to AVTransport
- If the previous operation is successful, CP tries also to subscribe to RenderingControl service
- If and only if both of the subscriptions take place in the correct way (no failures), the renderer device is added as the current media renderer in the device control point handler (DCPH); else, no renderer is set for the CP (incompatible / not found).