* @brief Starts CSV playback at the original capture speed. */
| 150 | * @brief Starts CSV playback at the original capture speed. |
| 151 | */ |
| 152 | void CSV::Player::play() |
| 153 | { |
| 154 | Q_ASSERT(isOpen()); |
| 155 | Q_ASSERT(!m_csvData.isEmpty()); |
| 156 | |
| 157 | if (frameCount() <= 0) |
| 158 | return; |
| 159 | |
| 160 | if (m_framePos >= frameCount() - 1) |
| 161 | m_framePos = 0; |
| 162 | |
| 163 | m_startTimestamp = getDateTime(m_framePos); |
| 164 | m_elapsedTimer.start(); |
| 165 | |
| 166 | if (m_useHighPrecisionTimestamps && m_framePos < m_timestampCache.size()) |
| 167 | m_startTimestampSeconds = m_timestampCache[m_framePos]; |
| 168 | |
| 169 | m_playing = true; |
| 170 | Q_EMIT playerStateChanged(); |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * @brief Pauses CSV playback. |