Skip to content

Commit

Permalink
core.controller: add debug info for snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
oaubert committed Aug 27, 2024
1 parent a1cbc94 commit 60589d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/advene/core/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import atexit
from gi.repository import GObject
import html
import inspect
import itertools
import json
import operator
Expand Down Expand Up @@ -1210,14 +1211,14 @@ def update_snapshot (self, position=None, media=None, force=False):

# Check if the player has async_snapshot capability.
if 'async-snapshot' in self.player.player_capabilities:
logger.debug("Calling async_snapshot %d", position)
logger.debug(f"Calling async_snapshot {position} from {inspect.currentframe().f_back.f_code.co_qualname}")
self.player.async_snapshot(position, self.snapshot_taken)
return True
elif 'snapshot' in self.player.player_capabilities:
# only 0-relative position for the moment
try:
i = self.player.snapshot(position)
except:
except Exception:
logger.exception("Exception in snapshot", exc_info=True)
return True
if i is not None and i.height != 0:
Expand Down Expand Up @@ -1256,6 +1257,7 @@ def get_snapshot(self, position=None, annotation=None, media=None, precision=Non
If position is specified without a media, then the default
(current) media will be used.
"""
logger.debug(f"Calling get_snapshot {position} from {inspect.currentframe().f_back.f_code.co_qualname}")
# Determine appropriate imagecache:
# In any case, fallback on current imagecache if nothing is specified
if media:
Expand Down

0 comments on commit 60589d5

Please sign in to comment.