heif  3.7.0
About: HEIF (High Efficiency Image File Format) is a visual media container format for images and image sequences (MPEG-standard). This HEIF engine demonstrates its powerful features and capabilities (under Nokia HEIF license).
  Fossies Dox: heif-3.7.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

HEIF::Reader Class Referenceabstract

#include <heifreader.h>

Inheritance diagram for HEIF::Reader:
Collaboration diagram for HEIF::Reader:

Public Member Functions

virtual ErrorCode initialize (const char *fileName)=0
 
virtual ErrorCode initialize (StreamInterface *input)=0
 
virtual void close ()=0
 
virtual ErrorCode getMajorBrand (FourCC &majorBrand) const =0
 
virtual ErrorCode getMinorVersion (uint32_t &minorVersion) const =0
 
virtual ErrorCode getCompatibleBrands (Array< FourCC > &compatibleBrands) const =0
 
virtual ErrorCode getCompatibleBrandCombinations (Array< Array< FourCC > > &compatibleBrandCombinations) const =0
 
virtual ErrorCode getFileInformation (FileInformation &fileinfo) const =0
 
virtual ErrorCode getTrackInformations (Array< TrackInformation > &trackInfos) const =0
 
virtual ErrorCode getDisplayWidth (const SequenceId &sequenceId, uint32_t &displayWidth) const =0
 
virtual ErrorCode getDisplayHeight (const SequenceId &sequenceId, uint32_t &displayHeight) const =0
 
virtual ErrorCode getWidth (const ImageId &imageId, uint32_t &width) const =0
 
virtual ErrorCode getWidth (const SequenceId &sequenceId, const SequenceImageId &imageId, uint32_t &width) const =0
 
virtual ErrorCode getHeight (const ImageId &imageId, uint32_t &height) const =0
 
virtual ErrorCode getHeight (const SequenceId &sequenceId, const SequenceImageId &imageId, uint32_t &height) const =0
 
virtual ErrorCode getMatrix (Array< int32_t > &matrix) const =0
 
virtual ErrorCode getMatrix (const SequenceId &sequenceId, Array< int32_t > &matrix) const =0
 
virtual ErrorCode getPlaybackDurationInSecs (const SequenceId &sequenceId, double &duration) const =0
 
virtual ErrorCode getItemListByType (const FourCC &itemType, Array< ImageId > &imageIds) const =0
 
virtual ErrorCode getItemListByType (const SequenceId &sequenceId, const TrackSampleType &itemType, Array< SequenceImageId > &imageIds) const =0
 
virtual ErrorCode getMasterImages (Array< ImageId > &imageIds) const =0
 
virtual ErrorCode getMasterImages (const SequenceId &sequenceId, Array< SequenceImageId > &imageIds) const =0
 
virtual ErrorCode getItemType (const ImageId &itemId, FourCC &type) const =0
 
virtual ErrorCode getItemType (const SequenceId &sequenceId, const SequenceImageId &imageId, FourCC &type) const =0
 
virtual ErrorCode getReferencedFromItemListByType (const ImageId &fromItemId, const FourCC &referenceType, Array< ImageId > &itemIds) const =0
 
virtual ErrorCode getReferencedToItemListByType (const ImageId &toItemId, const FourCC &referenceType, Array< ImageId > &itemIds) const =0
 
virtual ErrorCode getPrimaryItem (ImageId &imageId) const =0
 
virtual ErrorCode getItemData (const ImageId &imageId, uint8_t *memoryBuffer, uint64_t &memoryBufferSize, bool bytestreamHeaders=true) const =0
 
virtual ErrorCode getItemData (const SequenceId &sequenceId, const SequenceImageId &imageId, uint8_t *memoryBuffer, uint64_t &memoryBufferSize, bool bytestreamHeaders=true)=0
 
virtual ErrorCode getItem (const ImageId &imageId, Overlay &iovlItem) const =0
 
virtual ErrorCode getItem (const ImageId &imageId, Grid &gridItem) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, Mirror &imir) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, Rotate &irot) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, Scale &iscl) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, RelativeLocation &rloc) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, PixelInformation &pixi) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, ColourInformation &colr) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, PixelAspectRatio &pasp) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, CleanAperture &clap) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, AuxiliaryType &auxC) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, RequiredReferenceTypes &rref) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, UserDescription &udes) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, AccessibilityText &altt) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, CreationTimeInformation &crtt) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, ModificationTimeInformation &mdft) const =0
 
virtual ErrorCode getProperty (const PropertyId &index, RawProperty &property) const =0
 
virtual ErrorCode getProperty (const SequenceId &sequenceId, const uint32_t index, CleanAperture &clap) const =0
 
virtual ErrorCode getProperty (const SequenceId &sequenceId, const uint32_t index, AuxiliaryType &auxi) const =0
 
virtual ErrorCode getItemProperties (const ImageId &imageId, Array< ItemPropertyInfo > &propertyTypes) const =0
 
virtual ErrorCode getItemProperties (const GroupId &groupId, Array< ItemPropertyInfo > &propertyTypes) const =0
 
virtual ErrorCode getItemDataWithDecoderParameters (const ImageId &imageId, uint8_t *memoryBuffer, uint64_t &memoryBufferSize) const =0
 
virtual ErrorCode getItemDataWithDecoderParameters (const SequenceId &sequenceId, const SequenceImageId &imageId, uint8_t *memoryBuffer, uint64_t &memoryBufferSize)=0
 
virtual ErrorCode getItemProtectionScheme (const ImageId &imageId, uint8_t *memoryBuffer, uint64_t &memoryBufferSize) const =0
 
virtual ErrorCode getItemTimestamps (const SequenceId &sequenceId, Array< TimestampIDPair > &timestamps) const =0
 
virtual ErrorCode getTimestampsOfItem (const SequenceId &sequenceId, const SequenceImageId &imageId, Array< int64_t > &timestamps) const =0
 
virtual ErrorCode getItemsInDecodingOrder (const SequenceId &sequenceId, Array< TimestampIDPair > &decodingOrder) const =0
 
virtual ErrorCode getDecodeDependencies (const SequenceId &sequenceId, const SequenceImageId &imageId, Array< SequenceImageId > &dependencies) const =0
 
virtual ErrorCode getDecodeDependencies (const ImageId &imageId, Array< ImageId > &dependencies) const =0
 
virtual ErrorCode getDecoderCodeType (const ImageId &imageId, FourCC &type) const =0
 
virtual ErrorCode getDecoderCodeType (const SequenceId &sequenceId, const SequenceImageId &imageId, FourCC &type) const =0
 
virtual ErrorCode getDecoderParameterSets (const ImageId &imageId, DecoderConfiguration &decoderInfos) const =0
 
virtual ErrorCode getDecoderParameterSets (const SequenceId &sequenceId, const SequenceImageId &imageId, DecoderConfiguration &decoderInfos) const =0
 
virtual ErrorCode parseInitializationSegment (StreamInterface *streamInterface)=0
 
virtual ErrorCode parseSegment (StreamInterface *streamInterface, SegmentId segmentId, uint64_t earliestPTSinTS=UINT64_MAX)=0
 
virtual ErrorCode invalidateSegment (SegmentId segmentId)=0
 
virtual ErrorCode getSegmentIndex (Array< SegmentInformation > &segmentIndex)=0
 
virtual ErrorCode parseSegmentIndex (StreamInterface *streamInterface, Array< SegmentInformation > &segmentIndex)=0
 

Static Public Member Functions

static ReaderCreate ()
 
static void Destroy (Reader *imageFileInterface)
 
static ErrorCode SetCustomAllocator (CustomAllocator *customAllocator)
 
static const char * GetVersion ()
 

Protected Member Functions

virtual ~Reader ()=default
 

Detailed Description

Interface for reading an High Efficiency Image File Format (HEIF) file.

Definition at line 28 of file heifreader.h.

Constructor & Destructor Documentation

◆ ~Reader()

virtual HEIF::Reader::~Reader ( )
protectedvirtualdefault

Member Function Documentation

◆ close()

virtual void HEIF::Reader::close ( )
pure virtual

Reset reader internal state.

Implemented in HEIF::HeifReaderImpl.

◆ Create()

Reader * HEIF::Reader::Create ( )
static

Make an instance of HeifReader

If a custom memory allocator has not been set with SetCustomAllocator prior to calling this, the default allocator will be set into use.

Definition at line 403 of file heifreaderimpl.cpp.

References CUSTOM_NEW.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ Destroy()

void HEIF::Reader::Destroy ( Reader imageFileInterface)
static

Destroy the instance returned by Create

Definition at line 408 of file heifreaderimpl.cpp.

References CUSTOM_DELETE.

Referenced by HEIFPP::Heif::load(), HEIFPP::Heif::reset(), and HEIFPP::Heif::save().

Here is the caller graph for this function:

◆ getCompatibleBrandCombinations()

virtual ErrorCode HEIF::Reader::getCompatibleBrandCombinations ( Array< Array< FourCC > > &  compatibleBrandCombinations) const
pure virtual
Parameters
[out]compatibleBrandCombinationsCompatible brand combinations from the (optional)root-level Extended Type Box.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

◆ getCompatibleBrands()

virtual ErrorCode HEIF::Reader::getCompatibleBrands ( Array< FourCC > &  compatibleBrands) const
pure virtual
Parameters
[out]compatibleBrandsCompatible brands list from the File Type Box
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ getDecodeDependencies() [1/2]

virtual ErrorCode HEIF::Reader::getDecodeDependencies ( const ImageId imageId,
Array< ImageId > &  dependencies 
) const
pure virtual

Retrieve decoding dependencies for given image id, in decoding order. Information here comes from "pred" item references referenced from itemId.

Parameters
[in]imageIdIdentifier of an image.
[out]dependenciesArray including direct and indirect decoding dependencies. Parameter imageId itself is not included in the array. An empty array indicates imageId in independently decodable.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getDecodeDependencies() [2/2]

virtual ErrorCode HEIF::Reader::getDecodeDependencies ( const SequenceId sequenceId,
const SequenceImageId imageId,
Array< SequenceImageId > &  dependencies 
) const
pure virtual

Retrieve decoding dependencies for given imageId, in decoding order. This method should be used to retrieve referenced samples of a sample in a track.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]dependenciesArray including dependent item IDs: For images that has no dependencies, this method returns imageId itself.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ getDecoderCodeType() [1/2]

virtual ErrorCode HEIF::Reader::getDecoderCodeType ( const ImageId imageId,
FourCC type 
) const
pure virtual

Get coding type for image collection image.

Parameters
[in]imageIdIdentifier of an image item.
[out]typeDecoder code type, e.g. "hvc1" or "avc1".
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID. INVALID_ITEM_ID is also returned in case the item ID exists, but it is a grid or overlay image item without own encoded data.

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::constructDecoderConfig(), and HEIFPP::Sample::load().

Here is the caller graph for this function:

◆ getDecoderCodeType() [2/2]

virtual ErrorCode HEIF::Reader::getDecoderCodeType ( const SequenceId sequenceId,
const SequenceImageId imageId,
FourCC type 
) const
pure virtual

Get decoder code type for an image/sample.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]typeDecoder code type, e.g. "hvc1" or "avc1".
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID.

Implemented in HEIF::HeifReaderImpl.

◆ getDecoderParameterSets() [1/2]

virtual ErrorCode HEIF::Reader::getDecoderParameterSets ( const ImageId imageId,
DecoderConfiguration decoderInfos 
) const
pure virtual

Get decoder configuration record parameter sets. The item must be a decodable image item, e.g. 'hvc1', 'avc1'. This method should not be called for items which have no own encoded data, like identity derived images (type 'iden'), image overlay and grid derived images. Calling the method for such item id will return error code INVALID_ITEM_ID.

Parameters
[in]imageIdIdentifier of an image item.
[out]decoderInfosDecoderConfiguration struct containing: DecoderConfigId Property Id for decoder configs Array<DecoderSpecificInfo> Array of decoder configs with type DecoderSpecInfoType and actual payload for each.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::constructDecoderConfig().

Here is the caller graph for this function:

◆ getDecoderParameterSets() [2/2]

virtual ErrorCode HEIF::Reader::getDecoderParameterSets ( const SequenceId sequenceId,
const SequenceImageId imageId,
DecoderConfiguration decoderInfos 
) const
pure virtual

Get decoder configuration record parameter sets.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]decoderInfosDecoderConfiguration struct containing: DecoderConfigId Property Id for decoder configs (only unique within same SequenceId) Array<DecoderSpecificInfo> Array of decoder configs with type
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getDisplayHeight()

virtual ErrorCode HEIF::Reader::getDisplayHeight ( const SequenceId sequenceId,
uint32_t &  displayHeight 
) const
pure virtual

Get maximum display height from track headers.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]displayHeightMaximum display height in pixels.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::VideoTrack::load().

Here is the caller graph for this function:

◆ getDisplayWidth()

virtual ErrorCode HEIF::Reader::getDisplayWidth ( const SequenceId sequenceId,
uint32_t &  displayWidth 
) const
pure virtual

Get maximum display width from track headers.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]displayWidthMaximum display width in pixels.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::VideoTrack::load().

Here is the caller graph for this function:

◆ getFileInformation()

virtual ErrorCode HEIF::Reader::getFileInformation ( FileInformation fileinfo) const
pure virtual

Get file information. This information can be used to further initialize the presentation of the data in the file. Information also give hints about the way and means to request data from the file.

Precondition
initialize() has been called successfully.
Parameters
[out]fileinfoFileInformation struct that hold file information.
Returns
ErrorCode: OK or UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ getHeight() [1/2]

virtual ErrorCode HEIF::Reader::getHeight ( const ImageId imageId,
uint32_t &  height 
) const
pure virtual

Get height of an image item.

Parameters
[in]imageIdAn image item in the metabox
[out]heightHeight in pixels.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::ImageItem::load(), and HEIFPP::VideoSample::load().

Here is the caller graph for this function:

◆ getHeight() [2/2]

virtual ErrorCode HEIF::Reader::getHeight ( const SequenceId sequenceId,
const SequenceImageId imageId,
uint32_t &  height 
) const
pure virtual

Get height of an image/sample.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]heightHeight in pixels.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getItem() [1/2]

virtual ErrorCode HEIF::Reader::getItem ( const ImageId imageId,
Grid gridItem 
) const
pure virtual

Get data of an image grid item (item type 'grid').

Parameters
[in]imageIdId of Image overlay item
[out]gridItemGrid derived item struct with requested data.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID, PROTECTED_ITEM

Implemented in HEIF::HeifReaderImpl.

◆ getItem() [2/2]

virtual ErrorCode HEIF::Reader::getItem ( const ImageId imageId,
Overlay iovlItem 
) const
pure virtual

Get data of an image overlay item (item type 'iovl').

Parameters
[in]imageIdId of Image overlay item
[out]iovlItemOverlay derived item struct with requested data.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID, PROTECTED_ITEM

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::GridImageItem::load(), and HEIFPP::OverlayImageItem::load().

Here is the caller graph for this function:

◆ getItemData() [1/2]

virtual ErrorCode HEIF::Reader::getItemData ( const ImageId imageId,
uint8_t *  memoryBuffer,
uint64_t &  memoryBufferSize,
bool  bytestreamHeaders = true 
) const
pure virtual

Get item data. Item data does not contain initialization or configuration data (i.e. decoder configuration records). By default nal-length values of 'hvc1'/'avc1' type encoded image data is substituted with bytestream headers. For protected items pure data is returned always. Information how to handle such data is available from getItemProtectionScheme() which returns related 'sinf' box as whole. Note that getItemData() is the only reader API method which can be used for requesting data of such items.

Parameters
[in]imageIdItem id of the image.
[in,out]memoryBufferMemory buffer where data is to be written to.
[in,out]memoryBufferSizeMemory buffer size.
[in]bytestreamHeadersOptional - by default true. Whether to substitute H.264/H.265 nal-lenght values with bytestream header (0001).
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID, FILE_READ_ERROR

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::ExifItem::loadData(), HEIFPP::MimeItem::loadData(), HEIFPP::CodedImageItem::loadItemData(), and HEIFPP::Sample::loadSampleData().

Here is the caller graph for this function:

◆ getItemData() [2/2]

virtual ErrorCode HEIF::Reader::getItemData ( const SequenceId sequenceId,
const SequenceImageId imageId,
uint8_t *  memoryBuffer,
uint64_t &  memoryBufferSize,
bool  bytestreamHeaders = true 
)
pure virtual

Get item data for a sample/image in an image sequence. Item data does not contain initialization or configuration data (i.e. decoder configuration records). By default nal-length values of 'hvc1'/'avc1' type encoded image data is substituted with bytestream headers. For protected items pure data is returned always. Information how to handle such data is available from getItemProtectionScheme() which returns related 'sinf' box as whole. Note that getItemData() is the only reader API method which can be used for requesting data of such items.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[in,out]memoryBufferMemory buffer where data is to be written to.
[in,out]memoryBufferSizeMemory buffer size.
[in]bytestreamHeadersOptional - by default true. Whether to substitute H.264/H.265 nal-lenght values with bytestream header (0001).
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

◆ getItemDataWithDecoderParameters() [1/2]

virtual ErrorCode HEIF::Reader::getItemDataWithDecoderParameters ( const ImageId imageId,
uint8_t *  memoryBuffer,
uint64_t &  memoryBufferSize 
) const
pure virtual

Get data of an encoded image item. This method shall not be used if the item is not of 'hvc1', 'avc1' or 'master' type.

See also
getItemData()
Parameters
[in]imageIdItem id.
[in,out]memoryBufferMemory buffer where data is to be written to.
[in,out]memoryBufferSizeMemory buffer size.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID, PROTECTED_ITEM, UNSUPPORTED_CODE_TYPE, BUFFER_SIZE_TOO_SMALL

Implemented in HEIF::HeifReaderImpl.

◆ getItemDataWithDecoderParameters() [2/2]

virtual ErrorCode HEIF::Reader::getItemDataWithDecoderParameters ( const SequenceId sequenceId,
const SequenceImageId imageId,
uint8_t *  memoryBuffer,
uint64_t &  memoryBufferSize 
)
pure virtual

Get data of an image sequence image. This method shall be used only for 'hvc1' or 'avc1' type images.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[in,out]memoryBufferMemory buffer where data is to be written to.
[in,out]memoryBufferSizeMemory buffer size.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID, UNSUPPORTED_CODE_TYPE, BUFFER_SIZE_TOO_SMALL

Implemented in HEIF::HeifReaderImpl.

◆ getItemListByType() [1/2]

virtual ErrorCode HEIF::Reader::getItemListByType ( const FourCC itemType,
Array< ImageId > &  imageIds 
) const
pure virtual

Get an array of items in MetaBox having the requested type.

Parameters
[in]itemTypeFour-character code of the item type (e.g. 'hvc1', 'iovl', 'grid', 'Exif', 'mime', 'hvt1', 'iden')
[out]imageIdsFound items. An empty Array if no items are found.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

◆ getItemListByType() [2/2]

virtual ErrorCode HEIF::Reader::getItemListByType ( const SequenceId sequenceId,
const TrackSampleType itemType,
Array< SequenceImageId > &  imageIds 
) const
pure virtual

Get an array of items in the container with the ID sequenceId having the requested itemType.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]itemTypeType of samples to request.
[out]imageIdsArray of found items. An empty Array if no items are found.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_FUNCTION_PARAMETER, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getItemProperties() [1/2]

virtual ErrorCode HEIF::Reader::getItemProperties ( const GroupId groupId,
Array< ItemPropertyInfo > &  propertyTypes 
) const
pure virtual

Get properties of an entity group.

Parameters
[in]groupIdGroup ID which properties to get.
[out]propertyTypesAssociated properties of the entity groups.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_GROUP_ID

Implemented in HEIF::HeifReaderImpl.

◆ getItemProperties() [2/2]

virtual ErrorCode HEIF::Reader::getItemProperties ( const ImageId imageId,
Array< ItemPropertyInfo > &  propertyTypes 
) const
pure virtual

Get properties of an item.

Parameters
[in]imageIdItem ID which properties to get.
[out]propertyTypesProperties of an item.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Item::load().

Here is the caller graph for this function:

◆ getItemProtectionScheme()

virtual ErrorCode HEIF::Reader::getItemProtectionScheme ( const ImageId imageId,
uint8_t *  memoryBuffer,
uint64_t &  memoryBufferSize 
) const
pure virtual

Get Protection Scheme Information Box for a protected item.

Parameters
[in]imageIdItem id.
[in,out]memoryBufferMemory buffer where 'sinf' data is to be written to.
[in,out]memoryBufferSizeMemory buffer size.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID, UNPROTECTED_ITEM, BUFFER_SIZE_TOO_SMALL]

Implemented in HEIF::HeifReaderImpl.

◆ getItemsInDecodingOrder()

virtual ErrorCode HEIF::Reader::getItemsInDecodingOrder ( const SequenceId sequenceId,
Array< TimestampIDPair > &  decodingOrder 
) const
pure virtual

Get items in decoding order.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]decodingOrderTimestampIDPair struct of <display timestamp in milliseconds, sample id> pairs. Also complete decoding dependencies are listed here. If an sample ID is present as a decoding dependency for a succeeding frame, its timestamp is set to 0xffffffff. Array is sorted by composition time. Timestamps in milliseconds. Timestamp truncated integer from float.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getItemTimestamps()

virtual ErrorCode HEIF::Reader::getItemTimestamps ( const SequenceId sequenceId,
Array< TimestampIDPair > &  timestamps 
) const
pure virtual

Get display timestamp for each item of a track/sequence.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]timestampsArray of timestamps in milliseconds. Timestamp are truncated integer from float. For non-output samples, an empty Array.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getItemType() [1/2]

virtual ErrorCode HEIF::Reader::getItemType ( const ImageId itemId,
FourCC type 
) const
pure virtual

Get type of an item.

Parameters
[in]itemIdId of an item in the image collection.
[out]typeFour-character code of the item type (e.g. 'hvc1', 'iovl', 'grid', 'Exif', 'mime', 'hvt1', 'iden')
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::constructImageItem(), HEIFPP::Heif::constructMetaItem(), and HEIFPP::Item::load().

Here is the caller graph for this function:

◆ getItemType() [2/2]

virtual ErrorCode HEIF::Reader::getItemType ( const SequenceId sequenceId,
const SequenceImageId imageId,
FourCC type 
) const
pure virtual

Get sample description entry type of a sample / sequence image.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]typeSample description entry type is returned.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getMajorBrand()

virtual ErrorCode HEIF::Reader::getMajorBrand ( FourCC majorBrand) const
pure virtual
Parameters
[out]majorBrandMajor brand from the File Type Box
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ getMasterImages() [1/2]

virtual ErrorCode HEIF::Reader::getMasterImages ( Array< ImageId > &  imageIds) const
pure virtual

Get an array of master image items of the image collection.

Parameters
[out]imageIdsFound items, if any. The order of the item ids are as present in the file.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

◆ getMasterImages() [2/2]

virtual ErrorCode HEIF::Reader::getMasterImages ( const SequenceId sequenceId,
Array< SequenceImageId > &  imageIds 
) const
pure virtual

Get list of master image items of an image sequence.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]imageIdsFound items, if any. The order of the item ids are as present in the file.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getMatrix() [1/2]

virtual ErrorCode HEIF::Reader::getMatrix ( Array< int32_t > &  matrix) const
pure virtual

Get transformation matrix for the video, from the Movie Header Box of the file (if present).

Parameters
[out]matrixThe transformation matrix, consisting of 9 32-bit integers. Returns error code NOT_APPLICABLE if a Movie Header Box is not present in the file.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Referenced by HEIFPP::Heif::load(), and HEIFPP::VideoTrack::load().

Here is the caller graph for this function:

◆ getMatrix() [2/2]

virtual ErrorCode HEIF::Reader::getMatrix ( const SequenceId sequenceId,
Array< int32_t > &  matrix 
) const
pure virtual

Get transformation matrix for the video track, from a Track Header Box of the file.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]matrixThe transformation matrix, consisting of 9 32-bit integers.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, INVALID_SEQUENCE_ID, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

◆ getMinorVersion()

virtual ErrorCode HEIF::Reader::getMinorVersion ( uint32_t &  minorVersion) const
pure virtual
Parameters
[out]minorVersionMinor version from the File Type Box
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ getPlaybackDurationInSecs()

virtual ErrorCode HEIF::Reader::getPlaybackDurationInSecs ( const SequenceId sequenceId,
double &  duration 
) const
pure virtual

Get playback duration of image sequence or media track in seconds. This considers also edit lists.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[out]durationThe playback duration of track in seconds.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID

Implemented in HEIF::HeifReaderImpl.

◆ getPrimaryItem()

virtual ErrorCode HEIF::Reader::getPrimaryItem ( ImageId imageId) const
pure virtual

Get the ID of the primary item of the metabox/file.

Parameters
[out]imageIdItem ID of the primary item.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED or PRIMARY_ITEM_NOT_SET

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ getProperty() [1/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
AccessibilityText altt 
) const
pure virtual

Get property Accessibility text property ('altt')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]alttData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [2/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
AuxiliaryType auxC 
) const
pure virtual

Get image properties for auxiliary images ('auxC')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]auxCData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [3/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
CleanAperture clap 
) const
pure virtual

Get property Clean aperture ('clap')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]clapData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [4/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
ColourInformation colr 
) const
pure virtual

Get item property Colour information ('colr')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]colrData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [5/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
CreationTimeInformation crtt 
) const
pure virtual

Get property Creation time information property ('crtt')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]crttData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [6/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
Mirror imir 
) const
pure virtual

Get item property Image Mirror ('imir')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]imirData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::RawProperty::load(), HEIFPP::CleanApertureProperty::load(), HEIFPP::RotateProperty::load(), HEIFPP::MirrorProperty::load(), HEIFPP::PixelAspectRatioProperty::load(), HEIFPP::ColourInformationProperty::load(), HEIFPP::PixelInformationProperty::load(), HEIFPP::RelativeLocationProperty::load(), HEIFPP::AuxiliaryProperty::load(), and HEIFPP::ImageSequence::load().

Here is the caller graph for this function:

◆ getProperty() [7/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
ModificationTimeInformation mdft 
) const
pure virtual

Get property Modification time information property ('mdft')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]mdftData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [8/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
PixelAspectRatio pasp 
) const
pure virtual

Get item property Pixel aspect ratio ('pasp')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]paspData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [9/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
PixelInformation pixi 
) const
pure virtual

Get item property Pixel information ('pixi')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]pixiData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [10/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
RawProperty property 
) const
pure virtual

Get raw data of an item property.

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]propertyProperty data.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [11/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
RelativeLocation rloc 
) const
pure virtual

Get item property Relative Location ('rloc')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]rlocData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [12/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
RequiredReferenceTypes rref 
) const
pure virtual

Get property Required reference types ('rref')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]rrefData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [13/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
Rotate irot 
) const
pure virtual

Get item property Image Rotation ('irot')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]irotData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [14/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
Scale iscl 
) const
pure virtual

Get property Image scaling ('iscl')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]isclData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [15/17]

virtual ErrorCode HEIF::Reader::getProperty ( const PropertyId index,
UserDescription udes 
) const
pure virtual

Get property User description property ('udes')

Parameters
[in]indexId of the property.
See also
getItemProperties()
Parameters
[out]udesData of the property.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_PROPERTY_INDEX

Implemented in HEIF::HeifReaderImpl.

◆ getProperty() [16/17]

virtual ErrorCode HEIF::Reader::getProperty ( const SequenceId sequenceId,
const uint32_t  index,
AuxiliaryType auxi 
) const
pure virtual

Get Auxiliary type info box ('auxi') information from a sample description entry of a track.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]indexSample description index.
[out]auxiRequested auxiliary data.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SAMPLE_DESCRIPTION_INDEX

◆ getProperty() [17/17]

virtual ErrorCode HEIF::Reader::getProperty ( const SequenceId sequenceId,
const uint32_t  index,
CleanAperture clap 
) const
pure virtual

Get Clean aperture ('clap') information from a sample description entry of a track.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]indexSample description index.
[out]clapRequested clean aperture data.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SAMPLE_DESCRIPTION_INDEX

◆ getReferencedFromItemListByType()

virtual ErrorCode HEIF::Reader::getReferencedFromItemListByType ( const ImageId fromItemId,
const FourCC referenceType,
Array< ImageId > &  itemIds 
) const
pure virtual

Get items which are referenced by the given item with a certain type of reference.

Parameters
[in]fromItemIdItem id (reference from).
[in]referenceTypeReference type (e.g. 'thmb', 'cdcs', 'auxl', 'dimg', 'base').
[out]itemIdsReferenced item ids. The order of the item ids is as present in the file. An empty Array if no items are found.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::CodedImageItem::load(), and HEIFPP::DerivedImageItem::load().

Here is the caller graph for this function:

◆ getReferencedToItemListByType()

virtual ErrorCode HEIF::Reader::getReferencedToItemListByType ( const ImageId toItemId,
const FourCC referenceType,
Array< ImageId > &  itemIds 
) const
pure virtual

Get items which are referencing the given item with a certain type of reference.

Parameters
[in]toItemIdItem id (reference to).
[in]referenceTypeReference type (e.g. 'thmb', 'cdcs', 'auxl', 'dimg', 'base').
[out]itemIdsReferencing item ids. The order of the item ids is as present in the file. An empty Array if no items are found.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::ImageItem::load().

Here is the caller graph for this function:

◆ getSegmentIndex()

virtual ErrorCode HEIF::Reader::getSegmentIndex ( Array< SegmentInformation > &  segmentIndex)
pure virtual

Get Segment Index Provides segment index contents for use with DASH ISO Base Media File Format On-Demand profile.

Returned array will contain segmentId for each of the byte ranges, that must be used to feed those byte ranges through parseInitializationSegment() to parse the file.

Precondition
Byte range which contains ISO BMFF On-Demand profile initialization byte range has been parsed with reader using parseInitializeSegment.
Parameters
[out]segmentIndexArray of SegmentInformation struct that hold segment index information.
Returns
ErrorCode: OK, INVALID_SEGMENT

Implemented in HEIF::HeifReaderImpl.

◆ getTimestampsOfItem()

virtual ErrorCode HEIF::Reader::getTimestampsOfItem ( const SequenceId sequenceId,
const SequenceImageId imageId,
Array< int64_t > &  timestamps 
) const
pure virtual

Get display timestamps of an image. An image may be displayed many times based on the edit list.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]timestampsArray of timestamps. For non-output samples, an empty Array.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Sample::load().

Here is the caller graph for this function:

◆ getTrackInformations()

virtual ErrorCode HEIF::Reader::getTrackInformations ( Array< TrackInformation > &  trackInfos) const
pure virtual

Get track information. These properties can be used to further initialize the presentation of the data in the track. Properties also give hints about the way and means to request data from the track.

Precondition
initialize() has been called successfully.
Parameters
[out]trackInfosArray of TrackInformation struct that hold track information.
Returns
ErrorCode: OK or UNINITIALIZED

Implemented in HEIF::HeifReaderImpl.

◆ GetVersion()

const char * HEIF::Reader::GetVersion ( )
static

Get library version string.

Returns
Version string.

Definition at line 413 of file heifreaderimpl.cpp.

◆ getWidth() [1/2]

virtual ErrorCode HEIF::Reader::getWidth ( const ImageId imageId,
uint32_t &  width 
) const
pure virtual

Get width of an image item.

Parameters
[in]imageIdAn image item in the metabox
[out]widthWidth in pixels.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_ITEM_ID

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::ImageItem::load(), and HEIFPP::VideoSample::load().

Here is the caller graph for this function:

◆ getWidth() [2/2]

virtual ErrorCode HEIF::Reader::getWidth ( const SequenceId sequenceId,
const SequenceImageId imageId,
uint32_t &  width 
) const
pure virtual

Get width of an image/sample.

Parameters
[in]sequenceIdImage sequence ID (track ID).
[in]imageIdIdentifier of an image in the sequence (a sample).
[out]widthWidth in pixels.
Precondition
initialize() has been called successfully.
Returns
ErrorCode: OK, UNINITIALIZED, INVALID_SEQUENCE_ID, INVALID_SEQUENCE_IMAGE_ID

Implemented in HEIF::HeifReaderImpl.

◆ initialize() [1/2]

virtual ErrorCode HEIF::Reader::initialize ( const char *  fileName)
pure virtual

Open a file for reading and read the file header information.

Parameters
[in]fileNameFile to open.
Returns
ErrorCode: OK, FILE_OPEN_ERROR, FILE_READ_ERROR, FILE_HEADER_ERROR

Implemented in HEIF::HeifReaderImpl.

Referenced by HEIFPP::Heif::load().

Here is the caller graph for this function:

◆ initialize() [2/2]

virtual ErrorCode HEIF::Reader::initialize ( StreamInterface input)
pure virtual

Open an input stream for reading and read the header information.

Parameters
inputStream to open.
Returns
ErrorCode: OK, FILE_HEADER_ERROR, FILE_READ_ERROR

Implemented in HEIF::HeifReaderImpl.

◆ invalidateSegment()

virtual ErrorCode HEIF::Reader::invalidateSegment ( SegmentId  segmentId)
pure virtual

Invalidate Segment Invalidates the data buffer pointer to given media segment id - data from this segment can no longer be read.

Note! Must be called for all fed media segments if client is seeking.

Precondition
Segment with segmentId has been parsed with reader using parseSegment.
Parameters
[in]segmentIduint32_t Segment Id of the Initialize Segment
Returns
ErrorCode: OK, INVALID_SEGMENT

Implemented in HEIF::HeifReaderImpl.

◆ parseInitializationSegment()

virtual ErrorCode HEIF::Reader::parseInitializationSegment ( StreamInterface streamInterface)
pure virtual

Parse Initialization Segment

Parameters
[in]streamInterfaceStreamInterface* Interface to read initialization segment from.
Returns
ErrorCode: OK

Implemented in HEIF::HeifReaderImpl.

◆ parseSegment()

virtual ErrorCode HEIF::Reader::parseSegment ( StreamInterface streamInterface,
SegmentId  segmentId,
uint64_t  earliestPTSinTS = UINT64_MAX 
)
pure virtual

Parse Segment

Note that the segment id must be globally unique per an instance of reader and must be different from any init segment id as well.

Precondition
Initialization Segment has been parsed before feeding in segment.
Parameters
[in]streamInterfaceStreamInterface* Interface to read segment from.
[in]segmentIduint32_t Segment Id of the segment being fed to method through segmentData pointer
[in]earliestPTSinTSuint64_t Optional - in case of feeding partial segment without 'sidx' box this can be used to give earliest presentation time in timescale for samples.
Returns
ErrorCode: OK, FILE_READ_ERROR

Implemented in HEIF::HeifReaderImpl.

◆ parseSegmentIndex()

virtual ErrorCode HEIF::Reader::parseSegmentIndex ( StreamInterface streamInterface,
Array< SegmentInformation > &  segmentIndex 
)
pure virtual

Parse Segment Index ('sidx' box) from given stream.

Parameters
[in]streamInterfaceStreamInterface* Interface to read segment from.
[out]segmentIndexArray of SegmentInformation struct that hold segment index information.
Returns
ErrorCode: OK, INVALID_SEGMENT

Implemented in HEIF::HeifReaderImpl.

◆ SetCustomAllocator()

ErrorCode HEIF::Reader::SetCustomAllocator ( CustomAllocator customAllocator)
static

Set an optional custom memory allocator. Call this before calling Create for the first time, unless your new allocator is able to release blocks allocated with the previous allocator. The allocator is shared by all instances of Reader.

If you wish to change the allocator after once setting it, you must first set it to nullptr, which succeeds always. After this you can change it to the desired value.

Parameters
[in]customAllocatorThe allocator to use.
Returns
ErrorCode: OK, ALLOCATOR_ALREADY_SET if the custom allocator has already been set (possibly automatically upon use); in this case the allocator remains the same as before this call.

Definition at line 393 of file heifreaderimpl.cpp.

References HEIF::ALLOCATOR_ALREADY_SET, customAllocator, HEIF::OK, and setCustomAllocator().

Here is the call graph for this function:

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