Class IMediaDataWrapper


  • public class IMediaDataWrapper
    extends IMediaData
    This class wraps an IMediaData object, but then allows you to set
    new TimeStamps and TimeBases.

    The underlying wrapped object's time stamps and time bases do not change. This
    can be useful when you need to use a IMediaObject in a time space that has
    different time bases than the frame originally expected, and you don't
    want to change the actual object.
    • Constructor Detail

      • IMediaDataWrapper

        protected IMediaDataWrapper​(long cPtr,
                                    boolean cMemoryOwn)
        Internal Only.
      • IMediaDataWrapper

        protected IMediaDataWrapper​(long cPtr,
                                    boolean cMemoryOwn,
                                    java.util.concurrent.atomic.AtomicLong ref)
        Internal Only.
    • Method Detail

      • getCPtr

        public static long getCPtr​(IMediaDataWrapper obj)
        Internal Only. Not part of public API. Get the raw value of the native object that obj is proxying for.
        Parameters:
        obj - The java proxy object for a native object.
        Returns:
        The raw pointer obj is proxying for.
      • getMyCPtr

        public long getMyCPtr()
        Internal Only. Not part of public API. Get the raw value of the native object that we're proxying for.
        Overrides:
        getMyCPtr in class IMediaData
        Returns:
        The raw pointer we're proxying for.
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares two values, returning true if the underlying objects in native code are the same object. That means you can have two different Java objects, but when you do a comparison, you'll find out they are the EXACT same object.
        Overrides:
        equals in class IMediaData
        Returns:
        True if the underlying native object is the same. False otherwise.
      • hashCode

        public int hashCode()
        Get a hashable value for this object.
        Overrides:
        hashCode in class IMediaData
        Returns:
        the hashable value.
      • get

        public IMediaData get()
        Return the object being wrapped
        Returns:
        the wrapped object
      • unwrap

        public IMediaData unwrap()
        Gets the non IMediaDataWrapper object ultimately wrapped in this wrapper, or null if there isn't one.
        Returns:
        The non IMediaDataWrapper object ultimately wrapped
      • wrap

        public void wrap​(IMediaData aObj)
        Set an object to wrap, or null to release the old object.

        Parameters:
        aObj - The object to wrap; null just releases the last object
      • setKey

        public void setKey​(boolean aIsKey)
        Allows you to reset whether the wrapper things this is key or not.

        Note the underlying wrapped object will continue to keep it's prior setting.

        Parameters:
        aIsKey - The new key value.
      • make

        public static IMediaDataWrapper make​(IMediaData obj)
        Create a new IMediaDataWrapper object that wraps the given obj.

        Parameters:
        obj - The object to wrap.
        Returns:
        a new object or null on error.