catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
328 stars 81 forks source link

RFE: Remote minisatip specific commands #1052

Open lars18th opened 1 year ago

lars18th commented 1 year ago

Hi,

This is a request to comment for a new functionality that I want to implement in minisatip. The concept is "pass specific commands in requests". Here a simple description:

My proposal is based on this: https://github.com/catalinii/minisatip/issues/992#issuecomment-1399419859 And it will be useful to solve issues like #1049, #856, #811, #992, etc. However, this RFE is only about how to pass these requests, and not about the specific commands. Therefore, the idea is to implement first the method to pass the requests extensions, and after then we'll try to implement the specific commands. I hope you agree with this proposed roadmap.

Now my proposal (open to discussion):

As you can see the two methods can pass the same information. In the URL format I suggest to use the tag x_msatip_cmd!<label>=<value>. And in the Header format X_MSATIP_CMD: <label1>=<value1>&<label2>=<value2>&.... Note that in the URL format the tag could be repeated multiple times.

If you agree with the previous, then I'll implement this in the code inside the functions that are parsing the RTSP/HTTP requests. And I'll put all the extension commands inside a tuple-vector with the labels and values. All parsed for convenience. And without checking for repetitions. After achieve this goal the idea will be to convert these values to concrete internal variables to use them.

What you think about this? You want to participate in the implementation?