Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for negative time strings when converting a negative #605

Merged
merged 1 commit into from Oct 25, 2019

Conversation

@stefanschulze
Copy link
Collaborator

stefanschulze commented Oct 23, 2019

RationalTime object to a string.

Before this change, doing

negativeRationalTime = otio.opentime.RationalTime(-24,24)
timeString = otio.opentime.to_time_string(negativeRationalTime)

timeString would be -1:-1:-10, which is not a useful time string.

This change introduces a 'negative' time string, i.e. generate the
same string value as a positive RationalTime value would do but
with a '-' sign in front of the string:

timeString is now: -00:00:01.0

This is actually a valid string format for ffmpeg and useful if you
for example want to add silence to an audio file at the beginning.

RationalTime object to a string.

Before this change, doing

negativeRationalTime = otio.opentime.RationalTime(-24,24)
timeString = otio.opentime.to_time_string(negativeRationalTime)

timeString would be "-1👎-10", which is not a useful time string.

This change will create a 'negative' time string, i.e. generate the
same string value as a positive RationalTime value would do but
with a '-' sign in front of the string:

timeString is now: '-00:00:01.0'

This is actually a valid string format for ffmpeg and useful if you
for example want to add silence to an audio file at the beginning.
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 23, 2019

Codecov Report

Merging #605 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #605      +/-   ##
==========================================
+ Coverage   81.67%   81.69%   +0.02%     
==========================================
  Files          72       72              
  Lines        2729     2732       +3     
==========================================
+ Hits         2229     2232       +3     
  Misses        500      500
Flag Coverage Δ
#py27 81.67% <100%> (+0.02%) ⬆️
#py36 81.67% <100%> (+0.02%) ⬆️
#py37 81.67% <100%> (+0.02%) ⬆️
Impacted Files Coverage Δ
src/opentime/rationalTime.cpp 85.85% <100%> (+0.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce13d17...1e23e1d. Read the comment docs.

Copy link
Member

ssteinbach left a comment

This looks great, thanks!

@ssteinbach ssteinbach added this to the Public Beta 12 milestone Oct 25, 2019
@ssteinbach ssteinbach merged commit 274d748 into PixarAnimationStudios:master Oct 25, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
@jminor

This comment has been minimized.

Copy link
Collaborator

jminor commented Oct 28, 2019

@stefanschulze FYI I edited the description above to use backticks so we get -1:-1:-10 instead of -1👎-10 with an emoji in it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.