I've been looking and testing and testing these annoying NoVideoAudio & Channel is scrambled
that are popped every now or then. There is also some wreid hangs after channel change,
when one must manually use skip button to skip to the end of timeshifting before live tv starts
again. these problems are related to the communication between TsWriter filter and Timeshifter.cs codeblock.
When TimeShifter.cs starts to wait for audio video pids in line 587 for radio and for tv in line 607,
things too often starts to go wrong. This is mainly because, events are not triggered, even when
tswriter filter sends them, they never arrive to TimeShifter.cs codeblock. very quick&dirty hack is to comment out
this waiting part and manually reset these events. For me it works. i made this small change and tested it with stress tesing by doing 600 channell changes and i got picture every time, with no errors. It should not affect for detecting scrambled channels, but it's not yet tested. it reduced average zapping time close to 1 second.
testing was done with FTA channels.
Of course In real releases this should be fixed by more sophisticated way. Shoud there be for example a blocking direct function call to filter through interface or what ?, i don't know, but current solution is not performing wery well.
// changed in TimeShifter.cs
//if (isRadio)
//{
// Log.Write("card: WaitForTimeShiftFile - waiting _eventAudio");
// // wait for audio PID to be seen
// if (_eventAudio.WaitOne(waitForEvent, true))
// {
// // start of the video & audio is seen
// Log.Write("card: WaitForTimeShiftFile - start of audio is seen");
// _eventVideo.Reset();
// _eventAudio.Reset();
// // give some breathing room for TsReader
// Thread.Sleep(200);
// return true;
// }
//}
//else
//{
Log.Write("card: WaitForTimeShiftFile - waiting _eventAudio & _eventVideo");
// block until video & audio PIDs are seen or the timeout is reached
//if (_eventAudio.WaitOne(waitForEvent, true))
//{
// _eventAudio.Reset();
// if (_eventVideo.WaitOne(waitForEvent, true))
// {
// // start of the video & audio is seen
// Log.Write("card: WaitForTimeShiftFile - start of the video & audio is seen");
// _eventVideo.Reset();
// // give some breathing room for TsReader
// Thread.Sleep(200);
// return true;
// }
//}
_eventAudio.Reset();
_eventVideo.Reset();
//}
added:
return true; // a teh end of method..... :-(
regs,
te3hpurp
that are popped every now or then. There is also some wreid hangs after channel change,
when one must manually use skip button to skip to the end of timeshifting before live tv starts
again. these problems are related to the communication between TsWriter filter and Timeshifter.cs codeblock.
When TimeShifter.cs starts to wait for audio video pids in line 587 for radio and for tv in line 607,
things too often starts to go wrong. This is mainly because, events are not triggered, even when
tswriter filter sends them, they never arrive to TimeShifter.cs codeblock. very quick&dirty hack is to comment out
this waiting part and manually reset these events. For me it works. i made this small change and tested it with stress tesing by doing 600 channell changes and i got picture every time, with no errors. It should not affect for detecting scrambled channels, but it's not yet tested. it reduced average zapping time close to 1 second.
testing was done with FTA channels.
Of course In real releases this should be fixed by more sophisticated way. Shoud there be for example a blocking direct function call to filter through interface or what ?, i don't know, but current solution is not performing wery well.
// changed in TimeShifter.cs
//if (isRadio)
//{
// Log.Write("card: WaitForTimeShiftFile - waiting _eventAudio");
// // wait for audio PID to be seen
// if (_eventAudio.WaitOne(waitForEvent, true))
// {
// // start of the video & audio is seen
// Log.Write("card: WaitForTimeShiftFile - start of audio is seen");
// _eventVideo.Reset();
// _eventAudio.Reset();
// // give some breathing room for TsReader
// Thread.Sleep(200);
// return true;
// }
//}
//else
//{
Log.Write("card: WaitForTimeShiftFile - waiting _eventAudio & _eventVideo");
// block until video & audio PIDs are seen or the timeout is reached
//if (_eventAudio.WaitOne(waitForEvent, true))
//{
// _eventAudio.Reset();
// if (_eventVideo.WaitOne(waitForEvent, true))
// {
// // start of the video & audio is seen
// Log.Write("card: WaitForTimeShiftFile - start of the video & audio is seen");
// _eventVideo.Reset();
// // give some breathing room for TsReader
// Thread.Sleep(200);
// return true;
// }
//}
_eventAudio.Reset();
_eventVideo.Reset();
//}
added:
return true; // a teh end of method..... :-(
regs,
te3hpurp