"""Base class for object detection processors."""

from abc import ABC
from mini_videorag.core.processor import BaseVideoProcessor


class BaseObjectDetectionProcessor(BaseVideoProcessor, ABC):
    """
    Abstract base class for object detection processors.

    All object detection implementations should inherit from this class.
    This provides a common interface while allowing different providers
    (YOLO, Detectron2, TensorFlow Object Detection API, etc.).

    Attributes:
        name: Should be "object_detection" for all implementations
        is_frame_based: True (object detection analyzes per frame)
    """

    is_frame_based = True  # Object detection produces one result per frame

    @property
    def name(self) -> str:
        """All object detection processors use the same identifier."""
        return "object_detection"

    @property
    def requires_audio(self) -> bool:
        """Object detection doesn't require audio."""
        return False

    @property
    def requires_video(self) -> bool:
        """Object detection requires video frames."""
        return True
