[mythtv-users] Events at the beginning of a recording

Jay Harbeston jharbestonus at gmail.com
Mon Feb 6 21:38:25 UTC 2023


What happened to the threading for this topic, all the messages are separate from the rest of the conversation?

> On Feb 6, 2023, at 4:27 PM, Klaas de Waal <klaas.de.waal at gmail.com> wrote:
> 
> 
> 
> On Mon, 6 Feb 2023 at 14:08, Paul Harrison <mythtv at mythqml.net <mailto:mythtv at mythqml.net>> wrote:
>> On 06/02/2023 11:17, Jan Ceuleers wrote:
>> 
>> > On 05/02/2023 23:13, Klaas de Waal wrote:
>> >>      I think ideally you have to have WakeUpThreshold >= global pre-roll +
>> >>      120. So with your 250 seconds pre-roll I would try something like
>> >>      370 or
>> >>      400 for WakeUpThreshold. That should give you about 120 seconds between
>> >>      events if I understand the problem properly.
>> >>
>> >> Yes, I share your understanding of the logic but the HandleWakeSlave is
>> >> not called early enough.
>> >> My logs show most of the time only two REC_PENDING events, one on 60
>> >> seconds and one on 30 seconds.
>> >> I think I found where this comes from but I as this is the scheduler I
>> >> need to be very careful....
>> > I have changed the WakeUpThreshold to 600 (just to be on the safe side),
>> > and I still only get two REC_PENDING events (at 60 and 29 seconds), same
>> > as Klaas reports.
>> >
>> > Cheers, Jan
>> 
>> 
>> OK thanks for testing.
>> 
>> 
>> The problem must be further up the code in the main scheduler loop which 
>> is not calling HandleWakeSlave early or often enough for the code that 
>> sends the REC_PENDING events to work properly. When it's working 
>> properly it should be sending events at approximately 120, 90, 60 and 30 
>> seconds before recording starts.
>> 
> There is the constant kSleepCheck = 300 and this is the maximum number of
> seconds to wait between scheduler runs.
> See commit 81dffd5ab6becb75f9e004ffe771519d23a58d87
> Lawrence Rust authored and Paul Harrison committed on Jul 15, 2014 
> where this was changed from a hardcoded 300 to the constant.
> When kSleepCheck is changed to 30 seconds then there is always one REC_PENDING
> in the first time window, from  120 to 90 seconds.
> Paul, do you think that it is a problem for the scheduler to wake up every 30 seconds?
> 
>> 
>> Klaas I wonder if we should be setting the  default for WakeUpThresold 
>> to pre-roll + 120 instead of 5 minutes if that setting is not present in 
>> the DB?
>  
> I think that this is a good idea because if we do not do this then there is a constraint
> on the RecordPreRoll value that is both unwanted and difficult to explain to the casual user.
> And there is no GUI option to change the WakeUpThreshold as far as I know.
> In the slightly longer run we may consider separating WakeUpThreshold and REC_PENDING events;
> the WakeUpThreshold is about starting slave backends and that is not necessarily related to REC_PENDING events.
> 
> Klaas.
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org <https://forum.mythtv.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230206/a3173a1c/attachment.htm>


More information about the mythtv-users mailing list