Skip to main content

Timeshift buffer questions

6 replies [Last post]
anthony_flec
Offline
Joined: 2009-11-30
Points: 0

I have a few questions regarding timeshift buffer support:

1) The release notes for 1.1.3 state that TimeshiftProperties.setPresentation() is not supported. Is this feature planned for 1.1.4?

2) When I turn on implicit buffering I can retrieve a TimeshiftControl from the Player. However, if I create an explicit buffer via a BufferingRequest the TimeshiftControl is not available from the Player. The scenario is:

- Create service context
- Set min/max duration on service context
- Select service
- Wait for normal content event
- Extract the TimeshiftControl from the Player controls

versus:

- Create BufferingRequest
- Start buffering using OcapRecordingManager.requestBuffering()
- Create create service context
- Select service
- Wait for normal content event
- The TimeshiftControl is not in the Player control array

Is this expected behavior?

Thanks,
Anthony

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cpratt
Offline
Joined: 2008-12-18
Points: 0

Hey Anthony,

Regarding (1): Yes, setPresentation() is implemented on the head and barring something extraordinary, will be in the 1.1.4 release.

Regarding (2): That is not expected behavior - it sounds like a regression. I'll open a bug for it.

cpratt
Offline
Joined: 2008-12-18
Points: 0

Anthony,

Regarding (2), it's not listed in your scenario, but are you not calling setMinimumDuration() in this case?

Per TimeShiftProperties.setMinimumDuration() and OCAP DVR 6.2.1.3.3 (h), a TimeShiftControl is only present if setMinimumDuration() is called with a non-zero value.

anthony_flec
Offline
Joined: 2009-11-30
Points: 0

Certainly the spec is explicit that the TimeShiftControl should be removed when implicit buffering is disabled via setMinimumDuration(0). I think it's less clear that a TSC should NOT be present unless minimumDuration > 0. It seems to me that the intent is to provide the TSC when a service with an associated TSB is being presented in the service context. Does that sound reasonable? That would allow scenario #2 above to succeed w/o turning on implicit buffering in the service context.

Leaving spec parsing aside, are there any downsides if I do call setMinimumDuration() and select a service that is already buffering?

cpratt
Offline
Joined: 2008-12-18
Points: 0

Agreed that the Javadoc language has something to be desired. But it would be very inconsistent to say that disabling buffering via setMinimumDuration(0) would be behaviorally different than the initial state of TimeShiftProperties - whose initial minimum duration is designated to be 0. And the I05 text (6.2.1.3.3) is quite a bit more clear - and prefaces all time-shift playback for the SC with "If an application enables time-shifted presentation for a service context that was presenting a broadcast service" - which means setMinumumDuration() needs to be called to enable time-shifted presentation even if the buffered content is available.

There are no downsides to calling tsp.setMinimumDuration(x). It's the app essentially telling the implementation that "I have an interest in at least x seconds of content being available for presentation". If you happen to select a Service that is recording or being buffered due to a BufferingRequest, the app will simply find some already-buffered content available.And the SC's interest in the NI and associated content will be maintained even if the RecordingRequest and/or BufferingRequest are deactivated.

Can you confirm that you get a TSC after adding this call to your app?

anthony_flec
Offline
Joined: 2009-11-30
Points: 0

Yes, I see your point and I mostly agree. It's just a little inconsistent that setMinimumDuration(0) is used to indicate that buffering is disabled when the stack is buffering due to the BufferingRequest.

Anyway, let's consider this issue closed since I have an approach that solves my problem. Adding a call to setMinimumDuration to my scenario will cause the TSC to appear.

I appreciate your help on this matter.

cpratt
Offline
Joined: 2008-12-18
Points: 0

No problem.

And it isn't that setMinimumDuration() really disables the buffering - it just disables *time-shifted presentation* (I wish the spec had used this language instead of just "time shifting").

The BufferingRequest will still be honored - assuming NI/tuner availability. And a RecordingRequest with a retroactive start time or a later call to select() with setMinDuration(non-zero) will find some pre-existing content (assuming tuner availability).