-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Internal pid filtering doesn't work with last changes #174
Comments
Hi @lars18th Yes I understand your comment about low bitrate streams, but I feel that this has always been like this (I realize now). But my point is, we need to change this in a different way. And I think it needs to go here (some how): SATPI/src/output/StreamThreadBase.cpp Lines 197 to 236 in c56c6a7
Here is already a time interval that will send null packets and maybe we need to flush it here. Then it makes more sense to me. |
Hi @Barracuda09 , Thank you for your answer. From it I feel you're with me in the idea to discuss this in deep before implementing something uggly. However, first of all: the current code doesn't work. The internal filtering at time is buggy (I need to deactivate it in the configuration of the Frontend to obtain a working output). So please, take this in consideration. From my point of view is not a problem to leave it in this situation until the final implementation will be architectured. And I understand that you have the best idea of the code, so I'll follow your suggestions. With the objective to architecture the best I'll suggest to discuss these questions:
Please, try to clarify these questions. |
Hi @lars18th My main problem (i saw) with not handeling full buffers is that this will skew the count of packets because it will go multiple times through the filterData(..) and for that matter also if you filter out PIDs. And maybe even collecting table data will be affected. But I understand now this was always a problem with slow pid rates (scanning probably) that wil not fill the buffer that fast. I have to think about it some more |
Hi @Barracuda09 , OK. Then the problem is more complex. However, please try to confirm or rebate this:
With this assuption we can reimplement the code of the function
You can see that then, when the device is reading, it can call to What you think about this approach? |
Hi @Barracuda09 , The internal pid filtering is so relevant, bacause after supporting it (wihtout errors or troubles), my next objective is to support the external pid filtering for the Child PIPE input. I see your recent commit 2a5899a and I'm using HDHRs too. So what I want is to drive them including the control of the pid filtering inside the device. I've more or less the idea to complete it. So please, could you try to define how to resolve the current issues with the internal pid filtering? I'll follow your rescomendations but I feel that we need to advance and not stay busy. You agree? Regards. |
Hi @lars18th Yes I think too we need to resolve this. The problem is that I still trying to determind how to handle this. Problem is when not handeling full buffers
I will look again into the markToFlush method you had introduced. Kind regards |
Hi @Barracuda09 , I can't say why your tests aren't working as expected. In my case is the opposite: the current code doesn't work. My environment it's one HDHRs with DVB-T/C tuners. I configure them (using a script) to send the Full Transport Stream. Then with the Child PIPE and mapping.m3u I'm serving some DVB-S SAT>IP clients. Whats the problem now? With the current code state a lot of CC-Errors appears. With my original code all is going fine. The difference? Your last change of the So, please try to accept some simple changes to advance. My proposal:
Please consider this. |
Hi @Barracuda09 , Please check my PR #176 . In this I've simplified a lot the code. And I've incorporated your idea to leave to the function So please, check it. With this I've restored the functionality for the Child PIPE input. |
Hi @Barracuda09 , Please read my comment about last commit: #180 (comment) |
Hi @Barracuda09 ,
I see your efforts to cleanup the internal pid filtering code. And I agree with the changes. However, with last changes the internal pid filtering with the Child PIPE is broken (and I feel with the Streamer input too). The problem is this:
The root cause is that you've removed the loop to re-read more data when the buffer is not full. I can understand that you want to maintain the code clean and easy to change it. However, I feel we need to accept a compromise. Let me first to comment one edge case that is the cause to implement the previously commented function
mpegts::PacketBuffer::markToFlush()
that now is removed:Perhaps you could find this example very edge. But nothing more far than the reality. When a SAT>IP client is doing a scanning, the client is only interested on some PSI tables. And in some networks the repetition rate is very scarse. So in this case the scanning time is very long or it fails if you don't flush the TS packets very soon.
I hope you now understand the need for flush PacketBuffer content when it has less than 7 TS packets. Therefore, related to this question you agree with the idea to restore the function
mpegts::PacketBuffer::markToFlush()
and the associated code? If not then please comment about the alternatives that you see.Another question is how to do in the concrete functions of
Device::readFullTSPacket()
when we apply the internal pid filtering. I feel you think that when you return false, then in this case in the next loop the code will continue filling the same PacketBuffer at the same point. But from my realworld tests this is not true. And for this reason I've implemented a code that rereads more data if the buffer is not full... until it will be completed or if a lot of time has passed. In this last case a flushing of the packet it's necessary. This is my behaviour for the Child PIPE input. And my idea is to complete the code (not already implemented) for the rest of inputs. For example, for the Streamer input my code will not check if more data is pending in the socket. And instead of doing that the buffer is always flushed. However, this is WIP code. So please not consider it finished.The question is that we need to be sure of the best behaviour when some packets are filtered out from the reading buffer. What's your point of view? Perhaps I'm completly wrong in my assumptions. And as you have created the code, then I'm missing some important aspects. So please comment your opinion.
Regards.
The text was updated successfully, but these errors were encountered: