Giter VIP home page Giter VIP logo

Comments (3)

mutantbob avatar mutantbob commented on May 30, 2024

One thing I would point out is that ClockTime has methods like fromMillis and fromMicros. If you decide to get rid of ClockTime, all the javadocs (and parameter names) should make it clear that the long is expressed in nanoseconds (or whatever unit is appropriate). I would even go so far as to rename ClockTime.value to ClockTime.nanos .

from gst1-java-core.

neilcsmith-net avatar neilcsmith-net commented on May 30, 2024

Agreed, and ClockTime might persist in some capacity as a utility class (or we just refer people to TimeUnit). The key thing is to make Structure::getValue consistent with other uses, and remove ClockTIme from the lowlevel mappings so we're not creating unnecessary objects - not cheap there!

ClockTime is just an unsigned 64-bit long in GStreamer - this change would be (mostly) consistent with upstream.

from gst1-java-core.

neilcsmith-net avatar neilcsmith-net commented on May 30, 2024

OK, ClockTime will be replaced by long for all parameters and return types. The type information is just not available from the native layer to make this consistent. But do we switch to TimeUnit for conversion, or make ClockTime a similar enum and utility holder wrapping TimeUnit? And potentially handling the fact that the value is an unsigned long - although wrapping shouldn't be an issue any time soon! 😄

from gst1-java-core.

Related Issues (20)

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.