You.i Engine
CYIBif Class Reference

Detailed Description

Encapulates and provides services for getting the data in BIF (Base Index Frames) file archives.

Overview of BIF File Specification

The following specification describes the implementation of the BIF (Base Index Frames) file archive. The BIF archive is used to encapsulate a set of still images for supporting video trick modes (e.g. FF/REW) on the Streaming Player. This format has been optimized for the usage pattern inherent in this model and is well-suited and capable of facilitating those patterns in an efficient manner.

#include <asset/YiBifParser.h>

Public Member Functions

 CYIBif ()
 CYIBif (const CYIString &path)
 ~CYIBif ()
bool Open (const CYIString &path)
bool Open (const uint8_t *pData, size_t size)
bool IsBifData (const uint8_t *pData, size_t size)
uint32_t GetTimeStampMultiplier () const
size_t GetEntryCount () const
bool GetImageDataAtIndex (size_t index, std::vector< uint8_t > *pImageData) const
size_t GetImageIndexAtTime (uint64_t time) const
size_t GetDataSize () const

Constructor & Destructor Documentation

◆ CYIBif() [1/2]

CYIBif::CYIBif ( )

◆ CYIBif() [2/2]

CYIBif::CYIBif ( const CYIString path)

◆ ~CYIBif()

CYIBif::~CYIBif ( )

Member Function Documentation

◆ GetDataSize()

size_t CYIBif::GetDataSize ( ) const

Returns the appoxmate size of the data in bytes.

◆ GetEntryCount()

size_t CYIBif::GetEntryCount ( ) const

Returns the number of image entries in the BIF.

◆ GetImageDataAtIndex()

bool CYIBif::GetImageDataAtIndex ( size_t  index,
std::vector< uint8_t > *  pImageData 
) const

Returns the image data at index. The buffer and its size are returned in pImageData

To avoid performance penalty associated with reading the image data from the file using this API, we recommend that user maintains a list of images requested. When GetImageIndexAtTime() returns an index that is already available to the user, user can avoid repeating the call to GetImageDataAtIndex().

◆ GetImageIndexAtTime()

size_t CYIBif::GetImageIndexAtTime ( uint64_t  time) const

Returns the index of the image at time in milliseconds.

User should be aware that a range of time values will map to an index and from a performance point of view, it is desirable to externally verify if that particular index has already been requested using GetImageDataAtIndex().

◆ GetTimeStampMultiplier()

uint32_t CYIBif::GetTimeStampMultiplier ( ) const

Returns the time in milliseconds between each image.

◆ IsBifData()

bool CYIBif::IsBifData ( const uint8_t *  pData,
size_t  size 

Opens a BIF data stream that is size bytes long starting at address pData .

◆ Open() [1/2]

bool CYIBif::Open ( const CYIString path)

Opens a BIF file for parsing.

◆ Open() [2/2]

bool CYIBif::Open ( const uint8_t *  pData,
size_t  size 

Uses a data buffer as BIF content for parsing.

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