Giter VIP home page Giter VIP logo

vtc-py's People

Contributors

open-cinema avatar peake100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vtc-py's Issues

Add Frame Range Type

Frame ranges would allow us to do things like check if other Timecodes are within a range with contains, and check if two frame ranges overlap (and if so, how much)

Add support for inexact frame mode

Currently when two Timecode instances are added together, the result is rounded to the nearest frame of the new Timecode value's rate.

There are instances where one might want to keep fractional frame values. We may want to have a setting where this rounding does not occur.

To support a partial-frame mode, we should probably also implement the following magic methods:

  • __round__
  • __ceil__
  • __floor__

Custom Error Types

It would be nice to use error types for differentiating between our errors.

They should likely all inherit from a single lib type, then specialize from there.

Add Timecode Generator

For things like:

for tc in vtc.generate(start=vtc.Timecode("01:00:00:00", rate=vtc.RATE.24)):
    print(tc)

Python 3.11 incompatability Framerate error: for field F23_98 is not allowed: use default_factory

Receiving this error in Python3.11.

  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1210, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'vtc._framerate.Framerate'> for field F23_98 is not allowed: use default_factory

Works fine in Python 3.10. Looks like something may have broken in 3.11.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.