SATPI icon indicating copy to clipboard operation
SATPI copied to clipboard

Fix #169 : missing pids in RTCP and DESCRIBE messages when transforming

Open lars18th opened this issue 2 years ago • 3 comments

When doing the translation the pid list is empty. This fixes this issue.

lars18th avatar Nov 16 '22 22:11 lars18th

Hi @Barracuda09 ,

This fixes this: https://github.com/Barracuda09/SATPI/issues/169#issuecomment-1312714160

lars18th avatar Nov 16 '22 22:11 lars18th

Hi @Barracuda09 ,

The problem (I feel) is because the current implementation of the "virtual" frontend used for the transformation is not "updated". See this part of the code (as example): https://github.com/Barracuda09/SATPI/blob/master/src/input/childpipe/TSReader.cpp#L163-L181

In the concrete DeviceData ::update() function the code calls to updatePIDFilters(). And this is necessary to update the internal pid list inside the Filter object. Therefore, without theses updates the filter will never receives the information to update that list. So my first hack was to copy the pidlist from the real (target) frontend. The problem here is when this real frontend doesn't have internal pid filtering support. So in this case my "copy" is doing nothing. Then if you could fix this to update the virtual filtering object this hack will not be necessary.

Regards.

lars18th avatar Nov 18 '22 08:11 lars18th

Hi @lars18th

I have looked and tested this without this fix, but here it seems to work as fixed with 7107fa5

I have a test with this translation:

#EXTINF:-1 satip-freq="205", Translation to: ChildPIPE exec="childpipe-hdhomerun-example.sh 192.168.0.115 0 auto:386000000 0,1,16,17,18,2000,2001,2011,2100,2101,2111,3200,3201,3211"
rtsp://%1/?msys=childpipe&exec="childpipe-hdhomerun-example.sh%20192.168.0.115%200%20auto:386000000%200,1,16,17,18,2000,2001,2011,2100,2101,2111,3200,3201,3211"

With this request:

====================================================
Send:
PLAY rtsp://192.168.0.112:554/stream=110?fe=11&freq=205&sr=6900&msys=dvbc&mtype=256qam&addpids=3200,3201,3211 RTSP/1.0
CSeq: 3
Session: 0326365337

---------
Recv:
RTSP/1.0 200 OK
Server: satpi/1.6.2.85~g4ffe2c9 Enigma
RTP-Info: url=rtsp://192.168.0.112/stream=110
CSeq: 3
Session: 0326365337
Range: npt=0.000-

====================================================

I get the PIDs in the describe

====================================================
Send:
DESCRIBE rtsp://192.168.0.112:554/stream=110 RTSP/1.0
CSeq: 5
Session: 0326365337

---------
Recv:
RTSP/1.0 200 OK
Server: satpi/1.6.2.85~g4ffe2c9 Enigma
CSeq: 5
Content-Type: application/sdp
Content-Base: rtsp://192.168.0.112/
Content-Length: 269
Session: 0326365337

v=0
o=- 0326365337 0326365337 IN IP4 192.168.0.112
s=SatIPServer:1 1,0,2
t=0 0
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
a=control:stream=110
a=fmtp:33 ver=1.2;tuner=11,240,1,15,205.0000,8.0000,dvbc,256qam,6900,0,0,-1,2;pids=0,1,16,17,18,3200,3201,3211
a=sendonly
====================================================

Here you can see that the original request with freq and pids are filled in

Barracuda09 avatar Nov 24 '22 22:11 Barracuda09