diff options
author | Devaraj Rangasamy <dev@ti.com> | 2011-09-21 16:21:58 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-09-21 16:49:43 -0700 |
commit | b8923d57614400f11c61a524e15f040dd68d25bc (patch) | |
tree | 1b7b0ee0f11fd585ddee9ecfb81a9e36005be27a /camera/OMXCameraAdapter | |
parent | 2f15c6a9f1d24904705ddab6a6c005126e8846dd (diff) | |
download | hardware_ti_omap4xxx-b8923d57614400f11c61a524e15f040dd68d25bc.zip hardware_ti_omap4xxx-b8923d57614400f11c61a524e15f040dd68d25bc.tar.gz hardware_ti_omap4xxx-b8923d57614400f11c61a524e15f040dd68d25bc.tar.bz2 |
OMXCameraAdapter: Update timstamp calculation and comment
In timestamp calculation, latency incurred in Ducati camera buffer
reaching CameraHal should be considered
Patchset 2:
- Updated variable name, migrated to header file
- Update comment description
Change-Id: Icc93c27a66477867e9c415b139a331646eb2fba8
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r-- | camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index 2c1af45..3e94d1d 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -3149,16 +3149,17 @@ status_t OMXCameraAdapter::initCameraFrame( CameraFrame &frame, frame.mWidth = port->mWidth; frame.mHeight = port->mHeight; - // Calculating the time source delta of Ducati & system time only once at the start of camera. - // It's seen that there is a one-time constant diff between the ducati source clock & - // System monotonic timer, although both derived from the same 32KHz clock. - // This delta is offsetted to/from ducati timestamp to match with system time so that - // video timestamps are aligned with Audio with a periodic timestamp intervals. - // Do timeset offset calculation only when recording is in progress, when nTimestamp - // will be populated by Camera + // Timestamp in pBuffHeader->nTimeStamp is derived on DUCATI side, which is + // is not same time value as derived using systemTime. It would be ideal to use + // exactly same time source across Android and Ducati, which is limited by + // system now. So, workaround for now is to find the time offset between the two + // time sources and compensate the difference, along with the latency involved + // in camera buffer reaching CameraHal. Also, Do timeset offset calculation only + // when recording is in progress, when nTimestamp will be populated by Camera if ( onlyOnce && mRecording ) { mTimeSourceDelta = (pBuffHeader->nTimeStamp * 1000) - systemTime(SYSTEM_TIME_MONOTONIC); + mTimeSourceDelta += kCameraBufferLatencyNs; onlyOnce = false; } |