companion "precise" skip implementation#2462
Conversation
|
I believe we should implement the |
|
on companion devices TVRC uses a hard coded default time of 10 seconds from what I can gather.
ios itself uses this feature to go to the beginning of a title (albeit as somewhat of a hack, setting the _skpS to I agree with your sentiment, though. I considered augmenting skip_forward/backward with a new parameter with the default set to the 10 seconds found in TVRC. However, it is probably worse to change the old api...
So now I looked deeper into what dmap and mrp do. Doesn't sound like much more effort, dmap and mrp only need a small amount of code to support this? If implemented as you say, the methods However, I cannot test mrp, and probably cannot test dmap. |
Skip interval is probably not consistent in all protocols, should be fixed if possible and not implemented. My suggestion is to add parameter to |
|
Adding a new parameter with default argument is also backwards compatible. |
|
Ah, ok, this makes more sense now. I'll also update to factor in the latest merge. |
|
@thiccaxe Any more changes incoming or ready for review? |
|
Should be good for review, I'm going to test a few more unusual numbers such as -infinity, NaN, see what happens on a real companion devices. Also, I learned that opack can't encode negative integers (atleast small negative integers) - later, I'm going to look through the companion code base to make sure there isn't an odd case where that happens. |
I will try to review it as soon as I can.
OPACK supports negative integers ("signed"). But you might have discovered a bug indeed. The integer range 0-39 can be encoded using a single byte (-1 has a special value as well). I'm not sure negative values are handled properly for this range. Might be worth adding some unit tests and verify. |
|
You have some linting to fix ( |
postlund
left a comment
There was a problem hiding this comment.
Minor comment you can fix if you want, but looks good otherwise 👍
|
Just want to double check that you are done with this? |
yeah, should be good. Putting it down here as a note, since these are really far out edge cases: |
implements the skip-by-behavior found in the companion protocol. I don't know if #2363 is going to get merged or not. Additionally, this skip feature is much more precise and thus utile than
fast forwardorrewindanyway.