AVPKit
com::avpkit::core::IMediaDataWrapper Class Referenceabstract

This class wraps an IMediaData object, but then allows you to set new TimeStamps and TimeBases. More...

#include <IMediaDataWrapper.h>

Inheritance diagram for com::avpkit::core::IMediaDataWrapper:
Collaboration diagram for com::avpkit::core::IMediaDataWrapper:

Public Member Functions

virtual IMediaDataget ()=0
 Return the object being wrapped. More...
 
virtual void wrap (IMediaData *aObj)=0
 Set an object to wrap, or null to release the old object. More...
 
virtual void setKey (bool aIsKey)=0
 Allows you to reset whether the wrapper things this is key or not. More...
 
virtual IMediaDataunwrap ()=0
 Gets the non IMediaDataWrapper object ultimately wrapped in this wrapper, or null if there isn't one. More...
 
- Public Member Functions inherited from com::avpkit::core::IMediaData
virtual int64_t getTimeStamp ()=0
 Get the time stamp of this object in getTimeBase() units. More...
 
virtual void setTimeStamp (int64_t aTimeStamp)=0
 Set the time stamp for this object in getTimeBase() units. More...
 
virtual IRationalgetTimeBase ()=0
 Get the time base that time stamps of this object are represented in. More...
 
virtual void setTimeBase (IRational *aBase)=0
 Set the time base that time stamps of this object are represented in. More...
 
virtual com::avpkit::ferry::IBuffergetData ()=0
 Get any underlying raw data available for this object. More...
 
virtual int32_t getSize ()=0
 Get the size in bytes of the raw data available for this object. More...
 
virtual bool isKey ()=0
 Is this object a key object? i.e. More...
 
virtual void setData (com::avpkit::ferry::IBuffer *buffer)=0
 Sets the underlying buffer used by this object. More...
 
- Public Member Functions inherited from com::avpkit::ferry::RefCounted
virtual int32_t acquire ()
 Internal Only. More...
 
virtual int32_t release ()
 Internal Only. More...
 
virtual RefCountedcopyReference ()
 Create a new Java object that refers to the same native object. More...
 
virtual int32_t getCurrentRefCount ()
 Return the current reference count on this object. More...
 
void setJavaAllocator (void *allocator)
 This method is public but not part of the standard API. More...
 
void * getJavaAllocator ()
 This method is public but not part of the standard API. More...
 

Static Public Member Functions

static IMediaDataWrappermake (IMediaData *obj)
 Create a new IMediaDataWrapper object that wraps the given obj. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com::avpkit::ferry::RefCounted
virtual void destroy ()
 This method is called by RefCounted objects when their Ref Count reaches zero and they are about to be destroyed.
 
- Protected Attributes inherited from com::avpkit::ferry::RefCounted
AtomicIntegermRefCount
 This is the internal reference count, represented as an AtomicInteger to make sure it is thread safe.
 
void * mAllocator
 Not part of public API.
 

Detailed Description

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.

Definition at line 37 of file IMediaDataWrapper.h.

Member Function Documentation

◆ get()

virtual IMediaData* com::avpkit::core::IMediaDataWrapper::get ( )
pure virtual

Return the object being wrapped.

Returns
the wrapped object

Implemented in com::avpkit::core::MediaDataWrapper.

Referenced by com::avpkit::core::MediaDataWrapper::wrap().

◆ make()

IMediaDataWrapper * com::avpkit::core::IMediaDataWrapper::make ( IMediaData obj)
static

Create a new IMediaDataWrapper object that wraps the given obj.

Parameters
objThe object to wrap.
Returns
a new object or null on error.

Definition at line 35 of file IMediaDataWrapper.cpp.

36 {
37  Global::init();
38  return MediaDataWrapper::make(obj);
39 }
static void init()
Internal Only.
Definition: Global.cpp:157
static MediaDataWrapper * make(IMediaData *obj)
Create a new IMediaDataWrapper that wraps a given object.

References com::avpkit::core::Global::init(), and com::avpkit::core::MediaDataWrapper::make().

◆ setKey()

virtual void com::avpkit::core::IMediaDataWrapper::setKey ( bool  aIsKey)
pure virtual

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
aIsKeyThe new key value.

Implemented in com::avpkit::core::MediaDataWrapper.

◆ unwrap()

virtual IMediaData* com::avpkit::core::IMediaDataWrapper::unwrap ( )
pure virtual

Gets the non IMediaDataWrapper object ultimately wrapped in this wrapper, or null if there isn't one.

Returns
The non IMediaDataWrapper object ultimately wrapped

Implemented in com::avpkit::core::MediaDataWrapper.

◆ wrap()

virtual void com::avpkit::core::IMediaDataWrapper::wrap ( IMediaData aObj)
pure virtual

Set an object to wrap, or null to release the old object.

Parameters
aObjThe object to wrap; null just releases the last object

Implemented in com::avpkit::core::MediaDataWrapper.


The documentation for this class was generated from the following files: