update buffer
This commit is contained in:
@@ -10,6 +10,7 @@ Architecture:
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from queue import Queue, Empty
|
from queue import Queue, Empty
|
||||||
@@ -266,8 +267,11 @@ class StreamManager:
|
|||||||
frame_num = start_number
|
frame_num = start_number
|
||||||
offset = self.current_global_offset
|
offset = self.current_global_offset
|
||||||
buf = b""
|
buf = b""
|
||||||
|
raw_fd = proc.stdout.fileno()
|
||||||
while True:
|
while True:
|
||||||
chunk = proc.stdout.read(4096)
|
# os.read on the raw fd returns as soon as ANY data is available
|
||||||
|
# (no Python buffered-IO blocking waiting to fill a buffer)
|
||||||
|
chunk = os.read(raw_fd, 65536)
|
||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
buf += chunk
|
buf += chunk
|
||||||
|
|||||||
Reference in New Issue
Block a user