mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Link order for ffmpeg libraries
This commit is contained in:
parent
8c48eec6ec
commit
800c9aa5e5
@ -19,7 +19,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ffmpeg",
|
"name": "ffmpeg",
|
||||||
"sources": "calibre/utils/ffmpeg.c",
|
"sources": "calibre/utils/ffmpeg.c",
|
||||||
"libraries": "avcodec avutil swresample",
|
"libraries": "swresample avcodec avutil",
|
||||||
"inc_dirs": "!ffmpeg_inc_dirs",
|
"inc_dirs": "!ffmpeg_inc_dirs",
|
||||||
"lib_dirs": "!ffmpeg_lib_dirs",
|
"lib_dirs": "!ffmpeg_lib_dirs",
|
||||||
"needs_c": "99"
|
"needs_c": "99"
|
||||||
|
@ -591,6 +591,9 @@ class PiperEmbedded:
|
|||||||
self.ensure_process_started()
|
self.ensure_process_started()
|
||||||
piper_done, errors_from_piper = [], []
|
piper_done, errors_from_piper = [], []
|
||||||
last_output_at = monotonic()
|
last_output_at = monotonic()
|
||||||
|
needs_conversion = sample_rate != self._current_audio_rate
|
||||||
|
if needs_conversion:
|
||||||
|
from calibre_extensions.ffmpeg import resample_raw_audio_16bit
|
||||||
|
|
||||||
def callback(ok, payload):
|
def callback(ok, payload):
|
||||||
nonlocal last_output_at
|
nonlocal last_output_at
|
||||||
@ -623,10 +626,8 @@ class PiperEmbedded:
|
|||||||
buf.append(data)
|
buf.append(data)
|
||||||
else:
|
else:
|
||||||
stderr_data = detect_end_of_data(stderr_data + data, callback)
|
stderr_data = detect_end_of_data(stderr_data + data, callback)
|
||||||
needs_conversion = sample_rate != self._current_audio_rate
|
|
||||||
raw_data = b''.join(buf)
|
raw_data = b''.join(buf)
|
||||||
if needs_conversion:
|
if needs_conversion:
|
||||||
from calibre_extensions.ffmpeg import resample_raw_audio_16bit
|
|
||||||
raw_data = resample_raw_audio_16bit(raw_data, self._current_audio_rate, sample_rate)
|
raw_data = resample_raw_audio_16bit(raw_data, self._current_audio_rate, sample_rate)
|
||||||
yield raw_data
|
yield raw_data
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user