opentimelineio.adapters.adapter

Implementation of the OTIO internal Adapter system.

For information on writing adapters, please consult: https://opentimelineio.readthedocs.io/en/latest/tutorials/write-an-adapter.html # noqa

class opentimelineio.adapters.adapter.Adapter

Adapters convert between OTIO and other formats.

Note that this class is not subclassed by adapters. Rather, an adapter is a python module that implements at least one of the following functions:

write_to_string(input_otio)
write_to_file(input_otio, filepath) (optionally inferred)
read_from_string(input_str)
read_from_file(filepath) (optionally inferred)

…as well as a small json file that advertises the features of the adapter to OTIO. This class serves as the wrapper around these modules internal to OTIO. You should not need to extend this class to create new adapters for OTIO.

For more information: https://opentimelineio.readthedocs.io/en/latest/tutorials/write-an-adapter.html. # noqa

has_feature(feature_string)

return true if adapter supports feature_string, which must be a key of the _FEATURE_MAP dictionary.

Will trigger a call to PythonPlugin.module(), which imports the plugin.

plugin_info_map()

Adds extra adapter-specific information to call to the parent fn.

read_from_file(filepath, media_linker_name='__default', media_linker_argument_map=None, hook_function_argument_map=None, **adapter_argument_map)

Execute the read_from_file function on this adapter.

If read_from_string exists, but not read_from_file, execute that with a trivial file object wrapper.

read_from_string(input_str, media_linker_name='__default', media_linker_argument_map=None, hook_function_argument_map=None, **adapter_argument_map)

Call the read_from_string function on this adapter.

property suffixes

File suffixes associated with this adapter.

write_to_file(input_otio, filepath, hook_function_argument_map=None, **adapter_argument_map)

Execute the write_to_file function on this adapter.

If write_to_string exists, but not write_to_file, execute that with a trivial file object wrapper.

write_to_string(input_otio, hook_function_argument_map=None, **adapter_argument_map)

Call the write_to_string function on this adapter.