# DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs
# Based on "crates/store/re_sdk_types/definitions/rerun/components/is_keyframe.fbs".

# You can extend this class by creating a "IsKeyframeExt" class in "is_keyframe_ext.py".

from __future__ import annotations

from .. import datatypes
from .._baseclasses import (
    ComponentBatchMixin,
    ComponentMixin,
)

__all__ = ["IsKeyframe", "IsKeyframeBatch"]


class IsKeyframe(datatypes.Bool, ComponentMixin):
    """
    **Component**: Whether a [`components.VideoSample`][rerun.components.VideoSample] contains a keyframe (also known as a sync sample or IDR).

    A keyframe in this sense must be _decoder re-entrant_: a decoder must be able to start
    decoding the stream from this sample alone, with no prior decoder state.
    Not every intra-coded frame qualifies. Some codecs have intra-only frames that may
    still reference existing decoder state and are therefore not valid sync points.
    See [`components.VideoCodec`][rerun.components.VideoCodec] for the codec-specific definition of a keyframe.
    """

    _BATCH_TYPE = None
    # You can define your own __init__ function as a member of IsKeyframeExt in is_keyframe_ext.py

    # Note: there are no fields here because IsKeyframe delegates to datatypes.Bool


class IsKeyframeBatch(datatypes.BoolBatch, ComponentBatchMixin):
    _COMPONENT_TYPE: str = "rerun.components.IsKeyframe"


# This is patched in late to avoid circular dependencies.
IsKeyframe._BATCH_TYPE = IsKeyframeBatch  # type: ignore[assignment]
