Skip to content
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

permanent artifacts with commit 410b47f #207

Open
nikolauzi11 opened this issue Jan 12, 2024 · 5 comments
Open

permanent artifacts with commit 410b47f #207

nikolauzi11 opened this issue Jan 12, 2024 · 5 comments

Comments

@nikolauzi11
Copy link

Hi @Barracuda09

First of all, I would like to wish you all the best for the New Year.
Unfortunately there are permanent artifacts with the last commit(410b47f).
The client is still the VDR.

@Barracuda09
Copy link
Owner

Hi @nikolauzi11

Yes, you too have a great new year,

So the commit before this was beter? or is this stiil as #181

@nikolauzi11
Copy link
Author

Hi @Barracuda09

With commit bdab5f2 it still looks good. I always try to stay somewhat up to date.

@Barracuda09
Copy link
Owner

Hi @nikolauzi11

Thanks for your support! it is appreciated.

Could you try for testing, to modify Filter.h in:

SATPI/src/mpegts/Filter.h

Lines 205 to 215 in 410b47f

/// Open requesed PID filter
/// @param feID specifies the frontend ID
/// @param pid specifies the PID to open with openPid
/// @param openPid specifies the lambda function to use to open the PID with
template<typename OPEN_FUNC>
void openPIDFilter_L(const FeID feID, const int pid, OPEN_FUNC openPid) {
const bool done = openPid(pid);
if (done) {
_pidTable.setPIDOpened(pid);
SI_LOG_DEBUG("Frontend: @#1, Set filter PID: @#2@#3",
feID, PID(pid),

And change Line 211 to:

			_mutex.unlock();
			const bool done = openPid(pid);
			_mutex.tryLock(15000);

And at this place:

SATPI/src/mpegts/Filter.h

Lines 220 to 230 in 410b47f

/// Close requesed PID filter
/// @param feID specifies the frontend ID
/// @param pid specifies the PID to close with closePid
/// @param closePid specifies the lambda function to use to close the PID with
template<typename CLOSE_FUNC>
void closePIDFilter_L(const FeID feID, const int pid, CLOSE_FUNC closePid) {
const bool done = closePid(pid);
if (done) {
SI_LOG_DEBUG("Frontend: @#1, Remove filter PID: @#2 - Packet Count: @#3:@#4@#5",
feID, PID(pid),
DIGIT(_pidTable.getPacketCounter(pid), 9),

And change Line 226 to:

			_mutex.unlock();
			const bool done = closePid(pid);
			_mutex.tryLock(15000);

@nikolauzi11
Copy link
Author

Hi @Barracuda09

This makes it work again.
Thanks!

@Barracuda09
Copy link
Owner

Hi @nikolauzi11

That is nice, thanks for trying this. Then we found a permanent solution for this problem.

The problem is (probably) the combination of VDR, Sundtek tuner and this locking in SatPI.
VDR request PIDs (or scans PMT) very often when tuned to a specific frequency, and open/close PIDs takes more time for the Sundtek tuner. So this lock (during open/close PIDs) was locking the read of TS data from tuner, now by unlocking the mutex during open/close PID the read can then continue.

I do not see this behavior on my Vu+ receiver, there the open/close of PIDs does not take much time. But testing with the Sundtek tuner I saw this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants