GST tuning is failing in RI trunk r36653
I am testing the RI trunk till the revision 36653 on linux (ubuntu) with 2 tuner configuration. While running the tunetest I found that, all the tune requests which are happening on Tuner-1 are failing (recieved AlternativeContent) and all the tune requests which are happening on Tuner-2 are passing (resulting in NormalContent).
In case of Tuner-1 requests, TIMEOUT event is coming for PAT due to which tuning is failing. I could not understand why this is happening. But I tried the below things to make all my tunings pass:
1) Interchanged the values for TunerRxPort's for tuner.0 and tuner.1 in platform.cfg i.e.
RI.Headend.tuner.0.TunerRxPort = 4141
RI.Headend.tuner.1.TunerRxPort = 4140
With this change, all the tunings are started passing. I wonder how Tuner-2 (which is having TunerRxPort as 4140 now) tunings are passing.
2) Reverted the change made in revision 36559. Retained the below if block in gst_TunerInit() function.
if (AF_INET == pSrvr->ai_family)
With this change, all the tunings are passing. I think this change is related to IPv6. Can you please explain more about this?
3) In gst_TunerInit() function, port number 4140 is used for getting srvrInfo through getaddrinfo() call.
.............some block of code.................
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_PASSIVE;
snprintf(portStr, sizeof(portStr), "%d", 4140); // TODO: read from cfg
if (0 != (ret = getaddrinfo(NULL, portStr, &hints, &srvrInfo)))
..............some block of code...............
I have changed this port number to 4144 which is not used for any TunerRxPort in platform.cfg. All the tune requests are passing with this change.
Now please explain, why I am facing the problem with GST tuner? When I use VLC for linux all tunes are passing. Are you not facing this problem with your environment?
I am attaching the log where you can see the failure scenario.