Skip to content

Commit 866171d

Browse files
committed
get timeshift from remote
1 parent 023e9a6 commit 866171d

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

linux/x86-64/stream.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def run(self):
209209
acr_id = self._stream_info['acr_id']
210210
self._logger.info(acr_id + " ProcessFingerprintWorker running!")
211211
self._is_stop = False
212+
timeshift = self._stream_info.get('timeshift', 0);
212213
while not self._is_stop:
213214
try:
214215
live_upload = True
@@ -225,7 +226,7 @@ def run(self):
225226
if live_upload and len(last_buf) > doc_pre_time*16000:
226227
last_buf = last_buf[-1*doc_pre_time*16000:]
227228

228-
if self._record_upload == 1:
229+
if self._record_upload == 1 or timeshift:
229230
record_last_buf = record_last_buf + now_buf
230231
if len(record_last_buf) > self._record_upload_interval * 16000:
231232
record_fp = acrcloud_stream_decode.create_fingerprint(record_last_buf, False)

windows/win32/stream.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def run(self):
209209
acr_id = self._stream_info['acr_id']
210210
self._logger.info(acr_id + " ProcessFingerprintWorker running!")
211211
self._is_stop = False
212+
timeshift = self._stream_info.get('timeshift', 0);
212213
while not self._is_stop:
213214
try:
214215
live_upload = True
@@ -225,7 +226,7 @@ def run(self):
225226
if live_upload and len(last_buf) > doc_pre_time*16000:
226227
last_buf = last_buf[-1*doc_pre_time*16000:]
227228

228-
if self._record_upload == 1:
229+
if self._record_upload == 1 or timeshift:
229230
record_last_buf = record_last_buf + now_buf
230231
if len(record_last_buf) > self._record_upload_interval * 16000:
231232
record_fp = acrcloud_stream_decode.create_fingerprint(record_last_buf, False)

windows/win64/stream.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def run(self):
209209
acr_id = self._stream_info['acr_id']
210210
self._logger.info(acr_id + " ProcessFingerprintWorker running!")
211211
self._is_stop = False
212+
timeshift = self._stream_info.get('timeshift', 0);
212213
while not self._is_stop:
213214
try:
214215
live_upload = True
@@ -225,7 +226,7 @@ def run(self):
225226
if live_upload and len(last_buf) > doc_pre_time*16000:
226227
last_buf = last_buf[-1*doc_pre_time*16000:]
227228

228-
if self._record_upload == 1:
229+
if self._record_upload == 1 or timeshift:
229230
record_last_buf = record_last_buf + now_buf
230231
if len(record_last_buf) > self._record_upload_interval * 16000:
231232
record_fp = acrcloud_stream_decode.create_fingerprint(record_last_buf, False)

0 commit comments

Comments
 (0)