Details
Description
Sometimes when tuning a channel there is not PMT found.
Looking at the tve3 sources I saw the need for refactoring the PMT detection code.
The changes needed are;
1) Often the code would rely on the correctness of the bool "_graphrunning" var.
Instead of using that I decided for querying the directshow state directly using the newly added GraphRunning() method.
So all code that was using _graphrunnning is now calling GraphRunning(), should give a more true version of how the graph actually is.
2)Another small problem when the PMT is not found the code decides to wait for timeshifting file and wait for signal to become unscrambled.
Instead it should fall back with an error as soon as it finds out that no PMT is found. No need to wait further for timeshifting file and undscrambled.
3) The wait for PMT is now using a manual reset event instead of using the typical loop with thread.sleep statements.
This should boost channel change times by about 100-200 ms :)
Looking at the tve3 sources I saw the need for refactoring the PMT detection code.
The changes needed are;
1) Often the code would rely on the correctness of the bool "_graphrunning" var.
Instead of using that I decided for querying the directshow state directly using the newly added GraphRunning() method.
So all code that was using _graphrunnning is now calling GraphRunning(), should give a more true version of how the graph actually is.
2)Another small problem when the PMT is not found the code decides to wait for timeshifting file and wait for signal to become unscrambled.
Instead it should fall back with an error as soon as it finds out that no PMT is found. No need to wait further for timeshifting file and undscrambled.
3) The wait for PMT is now using a manual reset event instead of using the typical loop with thread.sleep statements.
This should boost channel change times by about 100-200 ms :)