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

Source: http://sdkdocs.roku.com/display/sdkdoc/BIFFileSpecification

#include <asset/YiBifParser.h>

Public Member Functions

 CYIBif ()
 
 CYIBif (const CYIString &path)
 
 ~CYIBif ()
 
bool Open (const CYIString &path)
 
bool Open (const uint8_t *pData, uint32_t nSize)
 
bool IsBifData (const uint8_t *pData, uint32_t uSize)
 
uint32_t GetTimeStampMultiplier () const
 
uint32_t GetEntryCount () const
 
bool GetImageDataAtIndex (uint32_t uIndex, std::vector< uint8_t > *pImageData) const
 
uint32_t GetImageIndexAtTime (uint64_t uTime) const
 
uint32_t GetDataSize () const
 

Constructor & Destructor Documentation

CYIBif::CYIBif ( )
CYIBif::CYIBif ( const CYIString path)
CYIBif::~CYIBif ( )

Member Function Documentation

uint32_t CYIBif::GetDataSize ( ) const

Returns the appoxmate size of the data in bytes.

uint32_t CYIBif::GetEntryCount ( ) const
inline

Returns the number of image entries in the BIF.

bool CYIBif::GetImageDataAtIndex ( uint32_t  uIndex,
std::vector< uint8_t > *  pImageData 
) const

Returns the image data at uIndex. 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().

uint32_t CYIBif::GetImageIndexAtTime ( uint64_t  uTime) const

Returns the index of the image at uTime in milliseconds.

User should be aware that a range of uTime 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().

uint32_t CYIBif::GetTimeStampMultiplier ( ) const
inline

Returns the time in milliseconds between each image.

bool CYIBif::IsBifData ( const uint8_t *  pData,
uint32_t  uSize 
)

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

bool CYIBif::Open ( const CYIString path)

Opens a BIF file for parsing.

bool CYIBif::Open ( const uint8_t *  pData,
uint32_t  nSize 
)

Uses a data buffer as BIF content for parsing.


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