vfx-rs / openexr-bind

cppmm bindings for OpenEXR
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

Add wrapping for timecode #21

Closed scott-wilson closed 3 years ago

scott-wilson commented 3 years ago

Description

Closes #17 .

Add bindings for the time code object.

The only changes from the C++ implementation and Rust is in OpenEXR 3.0.1, the frame can be from 0 - 59, when it should be from 0 - 29 (fixed in a later commit). Also, the binary group value ranges look like they should be constrained from 0 - 15, so I added the constraint in Rust (could move fix upstream?).

CPPMM Checklist

Cppmm is our bindings generator. There are some tools in it to aid in creating safe and stable APIs.

FFI Safety Checklist

The Rustonomicon provides useful guides to prevent soundness errors in Rust. The FFI section of the document provides the source for these checklist items.

Rust API Guidelines Checklist

The checklist is heavily inspired by The Rust API Guidelines. Please check each item that applies, or note if an item is intentionally skipped (either partially or fully) with the reason.

Testing Checklist

The tests are meant to validate that the wrappers are sound and work as expected. Tests that are designed to exercise code for the wrapped library and not the bindings should be added to the wrapped library instead.