Closed koush closed 3 years ago
Typically "Format" is shown in the official apple docs as "Length"
That is correct. Not sure why I choose to not be consistent there 🤔Did they use Format
in the older specs?
Is the Prebuffer Length the milliseconds or multiple? It is ambiguous. Ie, if the Fragment Length was 4000, and you wanted a 8000 millisecond Prebuffer Length, what would the value be? 2 (ie, 4000 * 2) or 8000? Afaik it doesn't need to be a multiple of the fragment length. At least what I seen in the past doesn't verify the claim I made there. But it must be at least 4000ms of prebuffer available.
The number must be given in milliseconds. Thinking about it, 1 Byte doesn't make sense there . This must be 4 bytes like in the Fragment Length
field.
Event Trigger Options is indicated to be a bitmask, but Format is shown as "8". Wouldn't it be "1", aka 8 bits?
Its 64 Bits = 8* 1 Byte
I'm unsure if it was Format or Length in the previous older specs. It is Length in the current spec as you noted.
Thanks for the clarifications and correction on the Prebuffer Length!
Its 64 Bits = 8* 1 Byte
This unfortunately is confusing me even more :)
The event trigger options are 0x00 (motion) and 0x01 (doorbell). Could you provide an example of how a mask of both options would show up in a 64 bit field?
would it be the bytes:
0x01 0x02 0x00 0x00 0x00 0x00 0x00 0x00
or the mask:
0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Or maybe both of those are incorrect?
Realizing you mean it could be a mask in an int64.
It's a 64 bit long bit mask. Where motion is the least significant bit (0x01) and doorbell the next bit (0x02). So ANDing 0x01 and 0x02 gives 0x03 (= 11_ 2; two ones) meaning both motion and doorbell events are enables. To my memory, everything in TLVs is Little endian.
If you need it, I can provide some more detailed examples later.
Typically "Format" is shown in the official apple docs as "Length". I had a couple questions about your table above.
Is the Prebuffer Length the milliseconds or multiple? It is ambiguous. Ie, if the Fragment Length was 4000, and you wanted a 8000 millisecond Prebuffer Length, what would the value be? 2 (ie, 4000 * 2) or 8000?
Event Trigger Options is indicated to be a bitmask, but Format is shown as "8". Wouldn't it be "1", aka 8 bits?