Mailing List Archive

Re: [mythtv-commits] [MythTV/mythtv] cb9e30: Fix a problem with arbitrary, time seeks.
On 28/11/2019 06:29, David Engel wrote:
> Branch: refs/heads/master
> Home: https://github.com/MythTV/mythtv
> Commit: cb9e30759890063c589cd30254b27ae5b604aba0
> https://github.com/MythTV/mythtv/commit/cb9e30759890063c589cd30254b27ae5b604aba0
> Author: David Engel <dengel@mythtv.org>
> Date: 2019-11-28 (Thu, 28 Nov 2019)
>
> Changed paths:
> M mythtv/libs/libmythtv/tv_play.cpp
>
> Log Message:
> -----------
> Fix a problem with arbitrary, time seeks.
>
> Commit afaeef4a mistakenly changed a case that really shold use
> integer division.
>
float time = ((seek / 100) * 3600) + ((seek % 100) * 60);
float time = ((seek / 100.0F) * 3600) + ((seek % 100) * 60);
float time = (int(seek / 100) * 3600) + ((seek % 100) * 60);

Hi: Looking at all these versions, I find it difficult to see what they
are trying to do - but I'm not really familiar with the intricacies of
cpp. The top version mostly worked for me, there were quirks with the
second and I haven't tried the third.

What are the units for 'time' and 'seek', and are the constants right?

John P
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-commits] [MythTV/mythtv] cb9e30: Fix a problem with arbitrary, time seeks. [ In reply to ]
On 28/11/2019 12:40, John Pilkington wrote:
> On 28/11/2019 06:29, David Engel wrote:
>>    Branch: refs/heads/master
>>    Home:   https://github.com/MythTV/mythtv
>>    Commit: cb9e30759890063c589cd30254b27ae5b604aba0
>>
>> https://github.com/MythTV/mythtv/commit/cb9e30759890063c589cd30254b27ae5b604aba0
>>
>>    Author: David Engel <dengel@mythtv.org>
>>    Date:   2019-11-28 (Thu, 28 Nov 2019)
>>
>>    Changed paths:
>>      M mythtv/libs/libmythtv/tv_play.cpp
>>
>>    Log Message:
>>    -----------
>>    Fix a problem with arbitrary, time seeks.
>>
>> Commit afaeef4a mistakenly changed a case that really shold use
>> integer division.
>>
>   float time = ((seek / 100) * 3600) + ((seek % 100) * 60);
>   float time = ((seek / 100.0F) * 3600) + ((seek % 100) * 60);
>   float time = (int(seek / 100) * 3600) + ((seek % 100) * 60);
>
> Hi:  Looking at all these versions, I find it difficult to see what they
> are trying to do - but I'm not really familiar with the intricacies of
> cpp.   The top version mostly worked for me, there were quirks with the
> second and I haven't tried the third.
>
> What are the units for 'time' and 'seek', and are the constants right?
>
> John P

OK, seek must be a decimal integer hhhhhhmm to time in seconds.

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-commits] [MythTV/mythtv] cb9e30: Fix a problem with arbitrary, time seeks. [ In reply to ]
On Thu, Nov 28, 2019 at 01:38:56PM +0000, John Pilkington wrote:
> On 28/11/2019 12:40, John Pilkington wrote:
> > On 28/11/2019 06:29, David Engel wrote:
> > > ?? Branch: refs/heads/master
> > > ?? Home:?? https://github.com/MythTV/mythtv
> > > ?? Commit: cb9e30759890063c589cd30254b27ae5b604aba0
> > > https://github.com/MythTV/mythtv/commit/cb9e30759890063c589cd30254b27ae5b604aba0
> > >
> > > ?? Author: David Engel <dengel@mythtv.org>
> > > ?? Date:?? 2019-11-28 (Thu, 28 Nov 2019)
> > >
> > > ?? Changed paths:
> > > ???? M mythtv/libs/libmythtv/tv_play.cpp
> > >
> > > ?? Log Message:
> > > ?? -----------
> > > ?? Fix a problem with arbitrary, time seeks.
> > >
> > > Commit afaeef4a mistakenly changed a case that really shold use
> > > integer division.
> > >
> > ? float time = ((seek / 100) * 3600) + ((seek % 100) * 60);
> > ? float time = ((seek / 100.0F) * 3600) + ((seek % 100) * 60);
> > ? float time = (int(seek / 100) * 3600) + ((seek % 100) * 60);
> >
> > Hi:? Looking at all these versions, I find it difficult to see what they
> > are trying to do - but I'm not really familiar with the intricacies of
> > cpp.?? The top version mostly worked for me, there were quirks with the
> > second and I haven't tried the third.
> >
> > What are the units for 'time' and 'seek', and are the constants right?
> >
> > John P
>
> OK, seek must be a decimal integer hhhhhhmm to time in seconds.

Yes.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org