get debug infos about un-sync node
This commit is contained in:
parent
7d23bbb907
commit
25ec4f837e
@ -31,7 +31,7 @@ from threading import Thread
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
from .filters.default import build_filtergraph
|
from .filters.default import build_filtergraph
|
||||||
from .utils import (MediaProbe, check_sync, gen_filler, get_date, get_delta,
|
from .utils import (MediaProbe, check_sync, get_date, get_delta,
|
||||||
get_float, get_time, messenger, playlist, sec_to_time,
|
get_float, get_time, messenger, playlist, sec_to_time,
|
||||||
src_or_dummy, stdin_args, storage, sync_op, valid_json)
|
src_or_dummy, stdin_args, storage, sync_op, valid_json)
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ def timed_source(node, last):
|
|||||||
if not stdin_args.loop and playlist.length:
|
if not stdin_args.loop and playlist.length:
|
||||||
messenger.debug(f'delta: {delta:f}')
|
messenger.debug(f'delta: {delta:f}')
|
||||||
messenger.debug(f'total_delta: {total_delta:f}')
|
messenger.debug(f'total_delta: {total_delta:f}')
|
||||||
check_sync(delta)
|
check_sync(delta, node)
|
||||||
|
|
||||||
if (total_delta > node['out'] - node['seek'] and not last) \
|
if (total_delta > node['out'] - node['seek'] and not last) \
|
||||||
or stdin_args.loop or not playlist.length:
|
or stdin_args.loop or not playlist.length:
|
||||||
|
@ -812,7 +812,7 @@ def valid_json(file):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def check_sync(delta):
|
def check_sync(delta, node=None):
|
||||||
"""
|
"""
|
||||||
check that we are in tolerance time
|
check that we are in tolerance time
|
||||||
"""
|
"""
|
||||||
@ -826,6 +826,7 @@ def check_sync(delta):
|
|||||||
messenger.error(
|
messenger.error(
|
||||||
f'Sync tolerance value exceeded with {delta:.2f} seconds,\n'
|
f'Sync tolerance value exceeded with {delta:.2f} seconds,\n'
|
||||||
'program terminated!')
|
'program terminated!')
|
||||||
|
messenger.debug(f'Terminate on node: {node}')
|
||||||
terminate_processes()
|
terminate_processes()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user