"""Base class for music detection processors."""

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


class BaseMusicDetectionProcessor(BaseVideoProcessor, ABC):
    """
    Abstract base class for music detection processors.

    All music detection implementations should inherit from this class.
    This provides a common interface while allowing different providers
    (Shazam, AudD, ACRCloud, etc.).

    Attributes:
        name: Should be "music_detection" for all implementations
        is_frame_based: False (music detection analyzes entire video audio)
    """

    is_frame_based = False  # Music detection analyzes full audio, not per frame

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

    @property
    def requires_audio(self) -> bool:
        """Music detection requires audio track."""
        return True

    @property
    def requires_video(self) -> bool:
        """Music detection doesn't need video frames."""
        return False
