Skip to content

Add tfSamplingMode universal parameter #277

Description

@keighrim

New Feature Summary

mmif-python will provides SamplingMode enum and extract_frames_by_mode() in video_document_helper (mmif-python PR #373). This issue tracks the clams-python side integration.

Changes

  • Import SamplingMode, SAMPLING_MODE_DESCRIPTIONS, SAMPLING_MODE_DEFAULT, and _sampling_mode from new mmif.utils.video_document_helper
    • Three modes: representatives (default), single, all
  • Add tfSamplingMode to ClamsApp.universal_parameters, built from the imported enum values and descriptions
  • In annotate(), pop tfSamplingMode from refined params and set the _sampling_mode context variable before calling _annotate()
    • Uses contextvars for thread-safe propagation — app developers don't need to handle sampling mode;
  • Bump mmif-python dependency to the version that includes the new API
    extract_frames_by_mode() reads the mode automatically

Related

No response

Alternatives

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨NNew feature or request

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions