AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Add MIMETypes adapter selection mechanism

Open
#800 1 comment 0 reactions 0 assignees View on GitHub
roadmap
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

## Feature Request

- [x] New Feature
- [ ] Change Existing Behavior

## Description

A MIMEType based adapter selection mechanism would be useful for web services. This would likely entail:

1. Add an attribute like `MIMETypes` to the `PluginManifest` schema (see `suffixes` for the filename equivalent)
2. Add support in `opentimelineio.adapters` for selecting an adapter based on this
3. Defining MIMETypes for different EDL formats we support (An outdated proposal for OTIO JSON is here: https://opentimelineio.readthedocs.io/en/latest/tutorials/otio-file-format-specification.html#mime-type-uti)

## Context

Currently OTIO's allows adapters to advertise supported formats based on file extension and will automatically resolve an adapter to use based on that. In cases like web services, there is no filesystem interaction (EDLs are usually provided in `POST` payloads or retrieved as streams from an object store like Amazon S3 or or Azure Blob Storage). For the `POST` payload use case, it would be useful to have a mechanism for selecting adapters based on MIMETypes.

Defining the MIMEType for formats outside of OTIO JSON would likely be more of a community collaboration challenge than anything. Some may be able to be derived from existing [filetype UTIs in MacOS](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html#//apple_ref/doc/uid/TP40001319-CH204-SW1) by using the `application/vnd.EXISTING_UTI+suffix` form (where suffix is an existing underlying type like `json` or `xml`).

Contributor guide

Open the contributing guide

Research direction

Start by reading the PluginManifest schema, especially the existing suffixes field, and the suffix-based selection logic in opentimelineio.adapters. Work out the MIME type field, adapter lookup behavior, and format declarations described in the issue; done means web-service payloads can select an adapter without a filesystem extension, with tests covering the mechanism.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.