MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / audio_worker

Method audio_worker

lightx2v/utils/va_reader.py:127–139  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

125 raise
126
127 def audio_worker(self):
128 logger.info("Audio pull worker thread started")
129 try:
130 while True:
131 if not self.ffmpeg_process or self.ffmpeg_process.poll() is not None:
132 logger.warning("FFmpeg process exited, audio worker thread stopped")
133 break
134 self.fetch_audio_data()
135 time.sleep(0.01)
136 except: # noqa
137 logger.error(f"Audio pull worker error: {traceback.format_exc()}")
138 finally:
139 logger.warning("Audio pull worker thread stopped")
140
141 def fetch_audio_data(self):
142 """Fetch audio data from ffmpeg process"""

Callers

nothing calls this directly

Calls 5

fetch_audio_dataMethod · 0.95
infoMethod · 0.80
warningMethod · 0.80
errorMethod · 0.80
pollMethod · 0.45

Tested by

no test coverage detected