Use warnings for debug output
This commit is contained in:
@@ -175,13 +175,13 @@ def create_cid_primitives(actor_id: Optional[str] = None):
|
||||
|
||||
Returns dict of primitives that resolve CIDs before creating sources.
|
||||
"""
|
||||
import sys
|
||||
import warnings
|
||||
def prim_make_video_source_cid(cid: str, fps: float = 30):
|
||||
print(f"DEBUG: CID-aware make-video-source called: cid={cid}, fps={fps}, actor_id={actor_id}", file=sys.stderr)
|
||||
warnings.warn(f"DEBUG: CID-aware make-video-source: cid={cid}, actor_id={actor_id}")
|
||||
return CIDVideoSource(cid, fps, actor_id)
|
||||
|
||||
def prim_make_audio_analyzer_cid(cid: str):
|
||||
print(f"DEBUG: CID-aware make-audio-analyzer called: cid={cid}, actor_id={actor_id}", file=sys.stderr)
|
||||
warnings.warn(f"DEBUG: CID-aware make-audio-analyzer: cid={cid}, actor_id={actor_id}")
|
||||
return CIDAudioAnalyzer(cid, actor_id)
|
||||
|
||||
return {
|
||||
@@ -274,11 +274,11 @@ def run_stream(
|
||||
|
||||
# Override primitives with CID-aware versions
|
||||
cid_prims = create_cid_primitives(actor_id)
|
||||
import sys
|
||||
print(f"DEBUG: Overriding primitives with CID-aware versions: {list(cid_prims.keys())}", file=sys.stderr)
|
||||
print(f"DEBUG: Current primitives before update: {list(interp.primitives.keys())[:10]}...", file=sys.stderr)
|
||||
import warnings
|
||||
warnings.warn(f"DEBUG: Overriding primitives: {list(cid_prims.keys())}")
|
||||
warnings.warn(f"DEBUG: Primitives before: {list(interp.primitives.keys())[:10]}...")
|
||||
interp.primitives.update(cid_prims)
|
||||
print(f"DEBUG: streaming:make-video-source is now: {interp.primitives.get('streaming:make-video-source')}", file=sys.stderr)
|
||||
warnings.warn(f"DEBUG: streaming:make-video-source is now: {type(interp.primitives.get('streaming:make-video-source'))}")
|
||||
|
||||
# Run rendering to file
|
||||
logger.info(f"Rendering to {output_path}")
|
||||
|
||||
Reference in New Issue
Block a user