AVPKit
com::avpkit::core::IMediaData Class Referenceabstract

The parent class of all media objects than can be gotten from an IStream. More...

#include <IMediaData.h>

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

Public Member Functions

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...
 

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

The parent class of all media objects than can be gotten from an IStream.

Definition at line 33 of file IMediaData.h.

Member Function Documentation

◆ getData()

virtual com::avpkit::ferry::IBuffer* com::avpkit::core::IMediaData::getData ( )
pure virtual

Get any underlying raw data available for this object.

Returns
The raw data, or null if not accessible.

Implemented in com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::MediaDataWrapper, and com::avpkit::core::AudioSamples.

Referenced by com::avpkit::core::IPixelFormat::getYUV420PPixel(), and com::avpkit::core::IPixelFormat::setYUV420PPixel().

◆ getSize()

virtual int32_t com::avpkit::core::IMediaData::getSize ( )
pure virtual

Get the size in bytes of the raw data available for this object.

Returns
the size in bytes, or -1 if it cannot be computed.

Implemented in com::avpkit::core::IVideoPicture, com::avpkit::core::IPacket, com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::MediaDataWrapper, and com::avpkit::core::AudioSamples.

◆ getTimeBase()

virtual IRational* com::avpkit::core::IMediaData::getTimeBase ( )
pure virtual

Get the time base that time stamps of this object are represented in.

Caller must release the returned value.

Returns
the time base.

Implemented in com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::MediaDataWrapper, and com::avpkit::core::AudioSamples.

Referenced by com::avpkit::core::Stream::stampOutputPacket(), and com::avpkit::core::MediaDataWrapper::wrap().

◆ getTimeStamp()

virtual int64_t com::avpkit::core::IMediaData::getTimeStamp ( )
pure virtual

◆ isKey()

virtual bool com::avpkit::core::IMediaData::isKey ( )
pure virtual

Is this object a key object? i.e.

it can be interpreted without needing any other media objects

Returns
true if it's a key, false if not

Implemented in com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::MediaDataWrapper, and com::avpkit::core::AudioSamples.

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

◆ setData()

virtual void com::avpkit::core::IMediaData::setData ( com::avpkit::ferry::IBuffer buffer)
pure virtual

Sets the underlying buffer used by this object.

This is an advanced method and is not recommended for use by those who don't fully understand how IBuffers work. Implementations of IMediaData may behave in undefined ways if the buffer you pass in is not big enough for what you ask them to do (e.g. they may discard your buffer and allocate a larger one if they need more space). It is up to the caller to ensure the buffer passed in is large enough, and is not simultaneously in use by another part of the system.

Parameters
bufferThe buffer to set. If null, this method is ignored.

Implemented in com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::AudioSamples, and com::avpkit::core::MediaDataWrapper.

◆ setTimeBase()

virtual void com::avpkit::core::IMediaData::setTimeBase ( IRational aBase)
pure virtual

Set the time base that time stamps of this object are represented in.

Parameters
aBasethe new time base. If null an exception is thrown.

Implemented in com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::MediaDataWrapper, and com::avpkit::core::AudioSamples.

Referenced by com::avpkit::core::Stream::stampOutputPacket().

◆ setTimeStamp()

virtual void com::avpkit::core::IMediaData::setTimeStamp ( int64_t  aTimeStamp)
pure virtual

Set the time stamp for this object in getTimeBase() units.

Parameters
aTimeStampThe time stamp

Implemented in com::avpkit::core::VideoPicture, com::avpkit::core::Packet, com::avpkit::core::MediaDataWrapper, and com::avpkit::core::AudioSamples.


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