pipeline: allow stopping tasks with StopTaskFrame

This commit is contained in:
Aleix Conchillo Flaqué
2024-05-14 00:30:32 -07:00
parent 922cdefee5
commit 11aa9dc803
2 changed files with 15 additions and 2 deletions

View File

@@ -205,6 +205,17 @@ class ErrorFrame(SystemFrame):
def __str__(self):
return f"{self.name}(error: {self.error})"
@dataclass
class StopTaskFrame(SystemFrame):
"""Indicates that a pipeline task should be stopped. This should inform the
pipeline processors that they should stop pushing frames but that they
should be kept in a running state.
"""
pass
#
# Control frames
#