Skip to main content

fseek error observed in RI 1.2 while TSB conversion

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
srinivasrk
Offline
Joined: 2011-10-31

Before starting the TSB conversion RI is checking for below condition in tsbConversionStateStarting function of tsb.c
// check that there is data to convert...
if ((0 != pIfsHandleInfo->begClock) && (0 != pIfsHandleInfo->endClock))
........
These begClock and endClock will be set by GStreamer thread while writing the content to TSB file. begClock will be set only once and endClock will be updated for each and every write call. The above condition works fine for fresh (new) TSB. But the recording which uses the existing TSB is getting the fseek error. It is an intermittent issue.
Reason:
begClock and endClock are already set in case of existing TSB. By the time the tsbConversionStateStarting function is invoked the TSB endClock may not reached the recording's start time (lag by around 100 milliseconds is observed). This lag may happen because of the environmental issues like the GStreamer thread is not getting the control to execute etc. In this case, the conversion starts as the condition passes, but actual TSB has not reached the recording's start time. It will try to seek the TSB file to recording's start time which results in fseek error. I am getting the below error from IfsImpl.c.
..............................
RI.IFS- IfsReturnCodeSeekOutsideFile: 1322480387.225000000 > 1322480387.209875000 (endClock) in line 2627 of IfsImpl.c
RI.Pipeline.TSB- tsbConversionStateStarting -- IfsConvert error: Seek Outside File
..............................
I have changed this condition as below and tested. Now I am not getting the error.
// check that there is data to convert...
if ((0 != pIfsHandleInfo->begClock) && (pIfsHandleInfo->endClock >= pTsbItem->pTsb->requested_convert_start_time_ns))
........
Please confirm whether it is a valid bug or not?

There is a previous post in the forum because of which the IT490 is raised.

http://www.java.net/forum/topic/mobile-embedded/ocap-ri-users/timeshift-...

Please confirm whether the above issue is related to this issue.

Reply viewing options

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

I think it is siilar enough to IT-490 to reopen it...