Skip to main content

TimeShiftControl is enabled even before buffering is started,

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
shobanapeter
Offline
Joined: 2006-07-29

TimseShiftControl is enabled in RI even before the buffering is started. This allows the app to call setRate() even before a valid TSB is present which results in an IllegalStateException and a black screen. I believe the TimeShiftControl should be enabled (ie) setBufferimgMode() be called only after the native buffering starts. Can you please share your thoughts on this.
[m_java][16/Apr/2013 16:35:26.774]java.lang.IllegalStateException: Buffering never started
[m_java][16/Apr/2013 16:35:26.787]^Iat org/cablelabs/impl/manager/timeshift/TimeShiftBufferImpl.getContentEndTimeInMediaTime()J(TimeShiftBufferImpl.java:515)
[m_java][16/Apr/2013 16:35:26.798]^Iat org/cablelabs/impl/media/presentation/TSBServicePresentation.getEffectiveMediaTimeNanos(Ljavax/media/Time;Lorg/cablelabs/impl/manager/TimeShiftBuffer;)J(TSBServicePresentation.java:651)
[m_java][16/Apr/2013 16:35:26.813]^Iat org/cablelabs/impl/media/presentation/TSBServicePresentation.updateSelectionDetails(Lorg/cablelabs/impl/media/presentation/Selection;Ljavax/media/Time;F)V(TSBServicePresentation.java:494)
[m_java][16/Apr/2013 16:35:26.824]^Iat org/cablelabs/impl/media/presentation/AbstractServicePresentation.startNewSession(Lorg/cablelabs/impl/media/presentation/Selection;Lorg/ocap/media/MediaPresentationEvaluationTrigger;Ljavax/media/Time;FZZ)V(AbstractServicePresentation.java:983)
[m_java][16/Apr/2013 16:35:26.837]^Iat org/cablelabs/impl/media/presentation/AbstractDVRServicePresentation.doSwitchToTimeshift(Ljavax/media/Time;FZZ)V(AbstractDVRServicePresentation.java:692)
[m_java][16/Apr/2013 16:35:26.847]^Iat org/cablelabs/impl/media/presentation/AbstractDVRServicePresentation.switchToTimeshift(Ljavax/media/Time;FZZ)V(AbstractDVRServicePresentation.java:656)
[m_java][16/Apr/2013 16:35:26.859]^Iat org/cablelabs/impl/media/presentation/TSBServicePresentation.switchToTimeshift(Ljavax/media/Time;FZZ)V(TSBServicePresentation.java:1928)
[m_java][16/Apr/2013 16:35:26.884]^Iat org/cablelabs/impl/media/presentation/AbstractDVRServicePresentation.doSetRate(F)F(AbstractDVRServicePresentation.java:604)
[m_java][16/Apr/2013 16:35:26.897]^Iat org/cablelabs/impl/media/presentation/AbstractPresentation.setRate(F)F(AbstractPresentation.java:175)
[m_java][16/Apr/2013 16:35:26.910]^Iat org/cablelabs/impl/media/player/AbstractPlayer.setRate(F)F(AbstractPlayer.java:1218)
[m_java][16/Apr/2013 16:35:26.922]^Iat org/cablelabs/impl/media/player/AbstractDVRServicePlayer.setRate(F)F(AbstractDVRServicePlayer.java:337)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
scottdeboy
Offline
Joined: 2009-02-02

The TimeShiftBuffer implementation does need a change to correctly check that a native handle is available, instead of checking the time as it is currently. Can you file a bug?

As for when a TimeShiftControl is exposed, the DVR I08 JavaDoc for TimeShiftProperties#setMinimumDuration says we are required to expose a TimeShiftControl once setMinimumDuration is called. From the JavaDoc:

When enabling of time shifting by changing the minimum duration from zero to a positive value takes effect, a TimeShiftControl SHALL be added to the associated JMF player. When time shifting is disabled by changing the minimum duration to zero any existing TimeShiftControl SHALL be removed from the associated JMF player.

shobanapeter
Offline
Joined: 2006-07-29

My interpretation of those lines are only when changing the minimum duration from zero to a positive value takes effect (ie) when buffering is started and is usable, the TSC can be added to the player. Can you share your thoughts on this?

scottdeboy
Offline
Joined: 2009-02-02

I am interpreting the text literally - as soon as the minimum duration has been set to a non-zero value, the control SHALL be enabled.

I am working on a fix for the buffering timing issue.

shobanapeter
Offline
Joined: 2006-07-29

Jira created for the issue.

https://java.net/jira/browse/OCAP_RI-704