Jon Taylor commited on
Commit
effcc86
·
1 Parent(s): d0bc075

added params buffer

Browse files
Files changed (1) hide show
  1. app/bot.py +5 -4
app/bot.py CHANGED
@@ -33,6 +33,7 @@ class DailyVision(EventHandler):
33
  #self.__queue = queue.Queue()
34
  self.__app_quit = False
35
  self.__image_buffer = None
 
36
  self.__bot_name = bot_name
37
  self.__room_url = room_url
38
  self.__room_name = room_name
@@ -128,14 +129,14 @@ class DailyVision(EventHandler):
128
  # Process ~15 frames per second (considering incoming frames at 30fps).
129
  if time.time() - self.__time > float(os.getenv("FPS_CAP", 0.0333)):
130
  self.__time = time.time()
131
- #self.__image_buffer = video_frame
 
132
  #self.__queue.put(video_frame)
133
 
134
  def on_app_message(self, message, sender):
135
  # Update pipeline settings based on message data
136
- #print(message)
137
- #self.__params = self.__pipeline.InputParams(**message)
138
- print(self.__pipeline.InputParams().model_dump_json())
139
  return
140
 
141
  def wave(self):
 
33
  #self.__queue = queue.Queue()
34
  self.__app_quit = False
35
  self.__image_buffer = None
36
+ self.__params_buffer = Pipeline.InputParams()
37
  self.__bot_name = bot_name
38
  self.__room_url = room_url
39
  self.__room_name = room_name
 
129
  # Process ~15 frames per second (considering incoming frames at 30fps).
130
  if time.time() - self.__time > float(os.getenv("FPS_CAP", 0.0333)):
131
  self.__time = time.time()
132
+ self.__params = self.__pipeline.InputParams(self.__params_buffer)
133
+ self.__image_buffer = video_frame
134
  #self.__queue.put(video_frame)
135
 
136
  def on_app_message(self, message, sender):
137
  # Update pipeline settings based on message data
138
+ self.__params_buffer = message
139
+ # self.__params = self.__pipeline.InputParams(**message)
 
140
  return
141
 
142
  def wave(self):