[mythtv] This piece of code is driving me nuts!

roger roger at beardandsandals.co.uk
Fri Nov 18 20:28:38 UTC 2016



On 18/11/16 20:10, roger wrote:
>
>
> On 18/11/16 19:31, Gary Buhrmaster wrote:
>> On Fri, Nov 18, 2016 at 5:53 PM, roger <roger at beardandsandals.co.uk> 
>> wrote:
>>> This piece of code in mpgestreamdata.cpp is driving me nuts.
>> I suspect that you have not looked at the implementation
>> of a Qt vector resize method, which only sets values for
>> new elements.  So, from quick look, it sets the initial
>> (0-31, depending on endz) elements to 0x00, and than
>> the rest (to 32) to 0xff.
>>
>> Or maybe I am as confused as you are.
>>
>
> Hi Gary,
>
> Unfortunately, sections_t is a std::vector not Qt QVector.
>
> However, I have got a bit further.
>
> I worked out the number. Start off with 0xff and zeroise bits starting 
> from the least significant.
>
> 11111110 0xfe
> 11111110 0xfc
> 11111000 0xf8
> 11110000 0xf0
> 11100000 0xe0
> 11000000 0xc0
> 10000000 0x80
> 00000000 0x00
>
> I still think the extra resize is a red herring.
>
> So I assume you knock out the bits of the whole array as sections are 
> received. When they are all zeroed you have a complete table. Only 
> problem is this does not work  for segmented DVB tables such as the 
> EIT schedule table, because they can have gaps in them.
>
> Roger
> _______________________________________________

Forget the bit about the segmented tables. I thought the code might be 
using this it map to detect when a table version change was complete. It 
does not.

Roger


More information about the mythtv-dev mailing list