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)  

HEIFPP::Heif Class Reference

HEIF file abstraction. More...

#include <Heif.h>

Collaboration diagram for HEIFPP::Heif:

Public Types

enum  PreloadMode { LOAD_ALL_DATA = 0 , LOAD_PREVIEW_DATA , LOAD_ON_DEMAND }
 

Public Member Functions

 Heif ()
 
 ~Heif ()
 
void setContext (const void *aContext)
 
const void * getContext () const
 
Result load (const char *fileName, PreloadMode loadMode=LOAD_ALL_DATA)
 
Result load (HEIF::StreamInterface *stream, PreloadMode loadMode=LOAD_ALL_DATA)
 
Result save (const char *fileName)
 
Result save (HEIF::OutputStreamInterface *stream)
 
void reset ()
 
bool hasSingleImage ()
 
bool hasImageCollection ()
 
std::uint32_t getTrackCount () const
 
TrackgetTrack (std::uint32_t aTrack)
 
const TrackgetTrack (std::uint32_t aTrack) const
 
void removeTrack (Track *aTrack)
 
void removeSample (Sample *aSample)
 
std::uint32_t getItemCount () const
 
ItemgetItem (std::uint32_t aItem)
 
const ItemgetItem (std::uint32_t aItem) const
 
void removeItem (Item *aItem)
 
std::uint32_t getImageCount () const
 
ImageItemgetImage (std::uint32_t aIndex)
 
const ImageItemgetImage (std::uint32_t aIndex) const
 
std::uint32_t getMasterImageCount () const
 
ImageItemgetMasterImage (std::uint32_t aIndex)
 
const ImageItemgetMasterImage (std::uint32_t aIndex) const
 
std::uint32_t getItemsOfTypeCount (const HEIF::FourCC &aType) const
 
ItemgetItemOfType (const HEIF::FourCC &aType, std::uint32_t aIndex)
 
const ItemgetItemOfType (const HEIF::FourCC &aType, std::uint32_t aIndex) const
 
ImageItemgetPrimaryItem ()
 
const ImageItemgetPrimaryItem () const
 
void setPrimaryItem (ImageItem *aItem)
 
const HEIF::FourCCgetMajorBrand () const
 
void setMajorBrand (const HEIF::FourCC &aBrand)
 
std::uint32_t getMinorVersion () const
 
void setMinorVersion (std::uint32_t aVersion)
 
std::uint32_t compatibleBrands () const
 
const HEIF::FourCCgetCompatibleBrand (std::uint32_t aIndex) const
 
void addCompatibleBrand (const HEIF::FourCC &aBrand)
 
void removeCompatibleBrand (std::uint32_t aIndex)
 
void removeCompatibleBrand (const HEIF::FourCC &aBrand)
 
std::uint32_t getDecoderConfigCount () const
 
void removeDecoderConfig (DecoderConfig *aDecoderConfig)
 
DecoderConfiggetDecoderConfig (std::uint32_t aIndex)
 
const DecoderConfiggetDecoderConfig (std::uint32_t aIndex) const
 
std::uint32_t getPropertyCount () const
 
ItemPropertygetProperty (std::uint32_t aIndex)
 
const ItemPropertygetProperty (std::uint32_t aIndex) const
 
void removeProperty (ItemProperty *aProperty)
 
std::uint32_t getGroupCount () const
 
EntityGroupgetGroup (std::uint32_t aId)
 
const EntityGroupgetGroup (std::uint32_t aId) const
 
void removeGroup (EntityGroup *aGroup)
 
std::uint32_t getGroupByTypeCount (const HEIF::FourCC &aType) const
 
EntityGroupgetGroupByType (const HEIF::FourCC &aType, std::uint32_t aId)
 
EntityGroupgetGroupById (const HEIF::GroupId &aId)
 
const EntityGroupgetGroupByType (const HEIF::FourCC &aType, std::uint32_t aId) const
 
const EntityGroupgetGroupById (const HEIF::GroupId &aId) const
 
std::uint32_t getAlternativeTrackGroupCount () const
 
AlternativeTrackGroupgetAlternativeTrackGroup (std::uint32_t aId)
 
const AlternativeTrackGroupgetAlternativeTrackGroup (std::uint32_t aId) const
 
void removeAlternativeTrackGroup (AlternativeTrackGroup *aGroup)
 

Static Public Member Functions

static HEIF::MediaFormat mediaFormatFromFourCC (const HEIF::FourCC &aType)
 

Static Public Attributes

static const HEIF::GroupId InvalidGroup
 
static const HEIF::ImageId InvalidItem
 
static const HEIF::SequenceId InvalidSequence
 
static const HEIF::SequenceImageId InvalidSequenceImage
 
static const HEIF::PropertyId InvalidProperty
 
static const HEIF::DecoderConfigId InvalidDecoderConfig
 
static const HEIF::MediaDataId InvalidMediaData
 

Protected Member Functions

TrackconstructTrack (HEIF::Reader *aReader, const HEIF::SequenceId &aTrackId, HEIF::ErrorCode &aErrorCode)
 
SampleconstructSample (HEIF::Reader *aReader, const HEIF::SequenceId &aTrack, const HEIF::SampleInformation &aInfo, HEIF::ErrorCode &aErrorCode)
 
ImageItemconstructImageItem (HEIF::Reader *aReader, const HEIF::ImageId &aItemId, const HEIF::ItemInformation *aItemInfo, HEIF::ErrorCode &aErrorCode)
 
MetaItemconstructMetaItem (HEIF::Reader *aReader, const HEIF::ImageId &aItemId, HEIF::ErrorCode &aErrorCode)
 
ItemPropertyconstructItemProperty (HEIF::Reader *aReader, const HEIF::ItemPropertyInfo &aItemInfo, HEIF::ErrorCode &aErrorCode)
 
DecoderConfigconstructDecoderConfig (HEIF::Reader *aReader, const HEIF::SequenceId &aTrackId, const HEIF::SequenceImageId &aTrackImageId, HEIF::ErrorCode &aErrorCode)
 
DecoderConfigconstructDecoderConfig (HEIF::Reader *aReader, const HEIF::ImageId &aItemId, HEIF::ErrorCode &aErrorCode)
 
DecoderConfigconstructDecoderConfig (HEIF::Reader *aReader, const HEIF::ImageId &aItemId, const HEIF::SequenceId &aTrackId, const HEIF::SequenceImageId &aTrackImageId, HEIF::ErrorCode &aErrorCode)
 
EntityGroupconstructGroup (const HEIF::FourCC &aType)
 
const HEIF::FileInformationgetFileInformation () const
 
const HEIF::ItemInformationgetItemInformation (const HEIF::ImageId &aItemId) const
 
const HEIF::TrackInformationgetTrackInformation (const HEIF::SequenceId &aItemId) const
 
void addItem (Item *aItem)
 
void addSample (Sample *aSample)
 
void addTrack (Track *aTrack)
 
void addDecoderConfig (DecoderConfig *aDecoderConfig)
 
void addProperty (ItemProperty *aProperty)
 
void addGroup (EntityGroup *aGroup)
 
void addAlternativeTrackGroup (AlternativeTrackGroup *aGroup)
 
HEIF::ReadergetReaderInstance ()
 

Protected Attributes

HEIF::FileInformation mFileinfo
 
HEIF::FourCC mMajorBrand
 
std::uint32_t mMinorVersion
 
std::vector< HEIF::FourCCmCompatibleBrands
 
std::vector< Item * > mItems
 
std::vector< Track * > mTracks
 
std::vector< Sample * > mSamples
 
std::map< HEIF::FourCC, std::vector< Item * > > mItemsOfType
 
std::vector< ItemProperty * > mProperties
 
std::vector< DecoderConfig * > mDecoderConfigs
 
std::vector< EntityGroup * > mGroups
 
std::vector< AlternativeTrackGroup * > mAltGroups
 
std::map< HEIF::FourCC, std::vector< EntityGroup * > > mGroupsOfType
 
ImageItemmPrimaryItem
 
std::int32_t mMatrix [9]
 
PreloadMode mPreLoadMode
 
std::map< HEIF::ImageId, Item * > mItemsLoad
 
std::map< HEIF::SequenceId, Track * > mTracksLoad
 
std::map< HEIF::PropertyId, ItemProperty * > mPropertiesLoad
 
std::map< std::pair< HEIF::SequenceId, HEIF::DecoderConfigId >, DecoderConfig * > mDecoderConfigsLoad
 
std::map< std::pair< HEIF::SequenceId, HEIF::SequenceImageId >, Sample * > mSamplesLoad
 
std::map< HEIF::GroupId, EntityGroup * > mGroupsLoad
 
std::map< std::uint32_t, AlternativeTrackGroup * > mAltGroupsLoad
 

Private Member Functions

Result load (const char *aFilename, HEIF::StreamInterface *aStream, PreloadMode loadMode)
 
Result save (const char *aFilename, HEIF::OutputStreamInterface *aStream)
 
HEIF::ErrorCode load (HEIF::Reader *aReader)
 
Heifoperator= (const Heif &)=delete
 
Heifoperator= (Heif &&)=delete
 
 Heif (const Heif &)=delete
 
 Heif (Heif &&)=delete
 

Private Attributes

const void * mContext
 
HEIF::ReadermReader
 

Friends

class EntityGroup
 
class Track
 
class Sample
 
class AudioTrack
 
class VideoTrack
 
class ImageSequence
 
class ExifItem
 
class ItemProperty
 
class Item
 
class CodedImageItem
 
class DerivedImageItem
 
class ImageItem
 
class DecoderConfig
 
class MimeItem
 
class AlternativeTrackGroup
 

Detailed Description

HEIF file abstraction.

Definition at line 60 of file Heif.h.

Member Enumeration Documentation

◆ PreloadMode

Enumerator
LOAD_ALL_DATA 
LOAD_PREVIEW_DATA 
LOAD_ON_DEMAND 

Definition at line 87 of file Heif.h.

Constructor & Destructor Documentation

◆ Heif() [1/3]

Heif::Heif ( )

Create an empty instance

Definition at line 58 of file Heif.cpp.

◆ ~Heif()

Heif::~Heif ( )

Definition at line 78 of file Heif.cpp.

References reset().

Here is the call graph for this function:

◆ Heif() [2/3]

HEIFPP::Heif::Heif ( const Heif )
privatedelete

◆ Heif() [3/3]

HEIFPP::Heif::Heif ( Heif &&  )
privatedelete

Member Function Documentation

◆ addAlternativeTrackGroup()

void Heif::addAlternativeTrackGroup ( AlternativeTrackGroup aGroup)
protected

Definition at line 1655 of file Heif.cpp.

References mAltGroups.

Referenced by HEIFPP::AlternativeTrackGroup::AlternativeTrackGroup().

Here is the caller graph for this function:

◆ addCompatibleBrand()

void Heif::addCompatibleBrand ( const HEIF::FourCC aBrand)

Adds a compatible brand to the file

Parameters
[in]aBrandThe brand as FourCC.

Definition at line 762 of file Heif.cpp.

References HEIFPP::AddItemTo(), and mCompatibleBrands.

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addDecoderConfig()

void Heif::addDecoderConfig ( DecoderConfig aDecoderConfig)
protected

Definition at line 1539 of file Heif.cpp.

References mDecoderConfigs, and HEIFPP::DecoderConfig::setId().

Here is the call graph for this function:

◆ addGroup()

void Heif::addGroup ( EntityGroup aGroup)
protected

Definition at line 1599 of file Heif.cpp.

References HEIFPP::EntityGroup::getType(), mGroups, mGroupsOfType, and HEIFPP::EntityGroup::setId().

Referenced by HEIFPP::EntityGroup::EntityGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addItem()

void Heif::addItem ( Item aItem)
protected

Definition at line 1143 of file Heif.cpp.

References HEIFPP::Item::getType(), mItems, mItemsOfType, and HEIFPP::Item::setId().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addProperty()

void Heif::addProperty ( ItemProperty aProperty)
protected

Definition at line 1138 of file Heif.cpp.

References mProperties, and HEIFPP::ItemProperty::setId().

Referenced by HEIFPP::ItemProperty::ItemProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSample()

void Heif::addSample ( Sample aSample)
protected

Definition at line 1584 of file Heif.cpp.

References mSamples, and HEIFPP::Sample::setId().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addTrack()

void Heif::addTrack ( Track aTrack)
protected

Definition at line 1569 of file Heif.cpp.

References mTracks, and HEIFPP::Track::setId().

Here is the call graph for this function:

◆ compatibleBrands()

std::uint32_t Heif::compatibleBrands ( ) const

Returns the amount of compatible brands set the for the file

Returns
std::uint32_t: The compatible brand count.

Definition at line 748 of file Heif.cpp.

References mCompatibleBrands.

◆ constructDecoderConfig() [1/3]

DecoderConfig * Heif::constructDecoderConfig ( HEIF::Reader aReader,
const HEIF::ImageId aItemId,
const HEIF::SequenceId aTrackId,
const HEIF::SequenceImageId aTrackImageId,
HEIF::ErrorCode aErrorCode 
)
protected

◆ constructDecoderConfig() [2/3]

DecoderConfig * Heif::constructDecoderConfig ( HEIF::Reader aReader,
const HEIF::ImageId aItemId,
HEIF::ErrorCode aErrorCode 
)
protected

Definition at line 1418 of file Heif.cpp.

References constructDecoderConfig(), InvalidSequence, and InvalidSequenceImage.

Here is the call graph for this function:

◆ constructDecoderConfig() [3/3]

DecoderConfig * Heif::constructDecoderConfig ( HEIF::Reader aReader,
const HEIF::SequenceId aTrackId,
const HEIF::SequenceImageId aTrackImageId,
HEIF::ErrorCode aErrorCode 
)
protected

Definition at line 1411 of file Heif.cpp.

References constructDecoderConfig(), and InvalidItem.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constructGroup()

EntityGroup * Heif::constructGroup ( const HEIF::FourCC aType)
protected

Definition at line 784 of file Heif.cpp.

References EntityGroup.

Referenced by load().

Here is the caller graph for this function:

◆ constructImageItem()

ImageItem * Heif::constructImageItem ( HEIF::Reader aReader,
const HEIF::ImageId aItemId,
const HEIF::ItemInformation aItemInfo,
HEIF::ErrorCode aErrorCode 
)
protected

aItemInfo may be null to indicate there is no associated ItemInfo object

Definition at line 886 of file Heif.cpp.

References HEIF::ItemDescription::contentType, HEIF::ItemInformation::description, HEIF::Reader::getItemType(), HEIFPP::Item::load(), HEIF::MEDIA_PARSING_ERROR, mItemsLoad, HEIF::OK, and HEIFPP::Item::setId().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constructItemProperty()

ItemProperty * Heif::constructItemProperty ( HEIF::Reader aReader,
const HEIF::ItemPropertyInfo aItemInfo,
HEIF::ErrorCode aErrorCode 
)
protected

Definition at line 1028 of file Heif.cpp.

References HEIF::AUXC, HEIF::AVCC, HEIF::CLAP, HEIF::COLR, HEIF::HVCC, HEIF::IMIR, HEIF::ItemPropertyInfo::index, HEIF::INVALID, HEIF::IROT, HEIF::ISPE, HEIF::JPGC, HEIFPP::ItemProperty::load(), HEIF::MEDIA_PARSING_ERROR, mPropertiesLoad, HEIF::OK, HEIF::PASP, HEIF::PIXI, HEIF::RAW, HEIF::RLOC, HEIFPP::ItemProperty::setId(), and HEIF::ItemPropertyInfo::type.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constructMetaItem()

MetaItem * Heif::constructMetaItem ( HEIF::Reader aReader,
const HEIF::ImageId aItemId,
HEIF::ErrorCode aErrorCode 
)
protected

Definition at line 967 of file Heif.cpp.

References HEIF::ItemDescription::contentType, HEIF::ItemInformation::description, ExifItem, getItemInformation(), HEIF::Reader::getItemType(), HEIFPP::Item::load(), HEIF::MEDIA_PARSING_ERROR, MimeItem, mItemsLoad, HEIF::OK, and HEIFPP::Item::setId().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constructSample()

Sample * Heif::constructSample ( HEIF::Reader aReader,
const HEIF::SequenceId aTrack,
const HEIF::SampleInformation aInfo,
HEIF::ErrorCode aErrorCode 
)
protected

◆ constructTrack()

Track * Heif::constructTrack ( HEIF::Reader aReader,
const HEIF::SequenceId aTrackId,
HEIF::ErrorCode aErrorCode 
)
protected

Definition at line 837 of file Heif.cpp.

References AudioTrack, getTrackInformation(), ImageSequence, HEIF::TrackFeatureEnum::IsAudioTrack, HEIF::TrackFeatureEnum::IsAuxiliaryImageSequence, HEIF::TrackFeatureEnum::IsMasterImageSequence, HEIF::TrackFeatureEnum::IsThumbnailImageSequence, HEIF::TrackFeatureEnum::IsVideoTrack, HEIFPP::Track::load(), HEIF::MEDIA_PARSING_ERROR, mTracksLoad, HEIF::OK, HEIFPP::Track::setId(), and VideoTrack.

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAlternativeTrackGroup() [1/2]

AlternativeTrackGroup * Heif::getAlternativeTrackGroup ( std::uint32_t  aId)

Definition at line 1635 of file Heif.cpp.

References mAltGroups.

◆ getAlternativeTrackGroup() [2/2]

const AlternativeTrackGroup * Heif::getAlternativeTrackGroup ( std::uint32_t  aId) const

Definition at line 1643 of file Heif.cpp.

References mAltGroups.

◆ getAlternativeTrackGroupCount()

std::uint32_t Heif::getAlternativeTrackGroupCount ( ) const

Definition at line 1631 of file Heif.cpp.

References mAltGroups.

◆ getCompatibleBrand()

const HEIF::FourCC & Heif::getCompatibleBrand ( std::uint32_t  aIndex) const

Returns the compatible brand with the given index

Parameters
[in]aIndexIndex to the compatible brands list from the File Type Box
Returns
FourCC: The brand for the given index.

Definition at line 752 of file Heif.cpp.

References mCompatibleBrands.

◆ getContext()

const void * Heif::getContext ( ) const

Gets the custom user data

Returns
void* Pointer to the custom user data

Definition at line 147 of file Heif.cpp.

References mContext.

◆ getDecoderConfig() [1/2]

DecoderConfig * Heif::getDecoderConfig ( std::uint32_t  aIndex)

Returns a decoder config with the given index

Parameters
[in]aIndexThe index of the decoder config
Returns
DecoderConfig: The config.

Definition at line 1522 of file Heif.cpp.

References mDecoderConfigs.

◆ getDecoderConfig() [2/2]

const DecoderConfig * Heif::getDecoderConfig ( std::uint32_t  aIndex) const

Returns a decoder config with the given index

Parameters
[in]aIndexThe index of the decoder config
Returns
DecoderConfig: The config.

Definition at line 1530 of file Heif.cpp.

References mDecoderConfigs.

◆ getDecoderConfigCount()

std::uint32_t Heif::getDecoderConfigCount ( ) const

Gets the amount of decoder configurations in the file

Returns
std::uint32_t: The amount of decoder configs.

Definition at line 1517 of file Heif.cpp.

References mDecoderConfigs.

◆ getFileInformation()

const HEIF::FileInformation * Heif::getFileInformation ( ) const
protected

Definition at line 360 of file Heif.cpp.

References mFileinfo.

◆ getGroup() [1/2]

EntityGroup * Heif::getGroup ( std::uint32_t  aId)

Definition at line 1669 of file Heif.cpp.

References mGroups.

◆ getGroup() [2/2]

const EntityGroup * Heif::getGroup ( std::uint32_t  aId) const

Definition at line 1677 of file Heif.cpp.

References mGroups.

◆ getGroupById() [1/2]

EntityGroup * Heif::getGroupById ( const HEIF::GroupId aId)

Definition at line 1706 of file Heif.cpp.

References mGroups.

◆ getGroupById() [2/2]

const EntityGroup * Heif::getGroupById ( const HEIF::GroupId aId) const

Definition at line 1729 of file Heif.cpp.

References mGroups.

◆ getGroupByType() [1/2]

EntityGroup * Heif::getGroupByType ( const HEIF::FourCC aType,
std::uint32_t  aId 
)

Definition at line 1694 of file Heif.cpp.

References mGroupsOfType.

◆ getGroupByType() [2/2]

const EntityGroup * Heif::getGroupByType ( const HEIF::FourCC aType,
std::uint32_t  aId 
) const

Definition at line 1717 of file Heif.cpp.

References mGroupsOfType.

◆ getGroupByTypeCount()

std::uint32_t Heif::getGroupByTypeCount ( const HEIF::FourCC aType) const

Definition at line 1685 of file Heif.cpp.

References mGroupsOfType.

◆ getGroupCount()

std::uint32_t Heif::getGroupCount ( ) const

Definition at line 1665 of file Heif.cpp.

References mGroups.

◆ getImage() [1/2]

ImageItem * Heif::getImage ( std::uint32_t  aIndex)

Returns the image with the given index

Parameters
[in]aIndexIndex of the image
Returns
ImageItem*: ImageItem with the given index

Definition at line 1367 of file Heif.cpp.

References mItems.

◆ getImage() [2/2]

const ImageItem * Heif::getImage ( std::uint32_t  aIndex) const

Returns the image with the given index

Parameters
[in]aIndexIndex of the image
Returns
ImageItem*: ImageItem with the given index

Definition at line 1384 of file Heif.cpp.

References mItems.

◆ getImageCount()

std::uint32_t Heif::getImageCount ( ) const

Returns the amount of images in the file*

Returns
std::uint32_t: The amount of images

Definition at line 1354 of file Heif.cpp.

References mItems.

◆ getItem() [1/2]

Item * Heif::getItem ( std::uint32_t  aItem)

Returns the item with the given index

Parameters
[in]aItemIndex of the item
Returns
Item*: The item with the requested index

Definition at line 1320 of file Heif.cpp.

References mItems.

◆ getItem() [2/2]

const Item * Heif::getItem ( std::uint32_t  aItem) const

Returns the item with the given index

Parameters
[in]aItemIndex of the item
Returns
Item*: The item with the requested index

Definition at line 1337 of file Heif.cpp.

References mItems.

◆ getItemCount()

std::uint32_t Heif::getItemCount ( ) const

Returns the total amount items in the file

Returns
std::uint32_t: The item count

Definition at line 1307 of file Heif.cpp.

References mItems.

◆ getItemInformation()

const HEIF::ItemInformation * Heif::getItemInformation ( const HEIF::ImageId aItemId) const
protected

Definition at line 364 of file Heif.cpp.

References HEIF::MetaBoxInformation::itemInformations, mFileinfo, and HEIF::FileInformation::rootMetaBoxInformation.

Referenced by constructMetaItem(), HEIFPP::Item::load(), HEIFPP::CodedImageItem::load(), HEIFPP::ExifItem::load(), HEIFPP::ImageItem::load(), and HEIFPP::MimeItem::load().

Here is the caller graph for this function:

◆ getItemOfType() [1/2]

Item * Heif::getItemOfType ( const HEIF::FourCC aType,
std::uint32_t  aIndex 
)

Returns the item with the given type and index

Parameters
[in]aTypeThe type as a FourCC code
[in]aIndexThe index
Returns
Item: The requested Item

Definition at line 1221 of file Heif.cpp.

References mItemsOfType.

◆ getItemOfType() [2/2]

const Item * Heif::getItemOfType ( const HEIF::FourCC aType,
std::uint32_t  aIndex 
) const

Returns the item with the given type and index

Parameters
[in]aTypeThe type as a FourCC code
[in]aIndexThe index
Returns
Item: The requested Item

Definition at line 1233 of file Heif.cpp.

References mItemsOfType.

◆ getItemsOfTypeCount()

std::uint32_t Heif::getItemsOfTypeCount ( const HEIF::FourCC aType) const

Returns the amount of items with the given type

Parameters
[in]aTypeThe type as a FourCC code
Returns
std::uint32_t: The item count

Definition at line 1211 of file Heif.cpp.

References mItemsOfType.

◆ getMajorBrand()

const HEIF::FourCC & Heif::getMajorBrand ( ) const

Returns the major brand of the file

Returns
FourCC: Major brand from the File Type Box

Definition at line 732 of file Heif.cpp.

References mMajorBrand.

◆ getMasterImage() [1/2]

ImageItem * Heif::getMasterImage ( std::uint32_t  aIndex)

Returns the master image with the given index

Parameters
[in]aIndexThe index of the master image
Returns
ImageItem*: The master image with the given index

Definition at line 1273 of file Heif.cpp.

References mItems.

◆ getMasterImage() [2/2]

const ImageItem * Heif::getMasterImage ( std::uint32_t  aIndex) const

Returns the master image with the given index

Parameters
[in]aIndexThe index of the master image
Returns
ImageItem*: The master image with the given index

Definition at line 1290 of file Heif.cpp.

References mItems.

◆ getMasterImageCount()

std::uint32_t Heif::getMasterImageCount ( ) const

Returns the amount of master images

Returns
std::uint32_t: Master image count

Definition at line 1260 of file Heif.cpp.

References mItems.

Referenced by hasImageCollection(), and hasSingleImage().

Here is the caller graph for this function:

◆ getMinorVersion()

std::uint32_t Heif::getMinorVersion ( ) const

Returns the minor version of the file

Returns
std::uint32_t: Minor version from the File Type Box

Definition at line 740 of file Heif.cpp.

References mMinorVersion.

◆ getPrimaryItem() [1/2]

ImageItem * Heif::getPrimaryItem ( )

Returns the primary item of the file or NULL (cover image)

Returns
ImageItem or nullptr if not set.

Definition at line 1246 of file Heif.cpp.

References mPrimaryItem.

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

Here is the caller graph for this function:

◆ getPrimaryItem() [2/2]

const ImageItem * Heif::getPrimaryItem ( ) const

Returns the primary item of the file or NULL (cover image)

Returns
ImageItem or nullptr if not set.

Definition at line 1250 of file Heif.cpp.

References mPrimaryItem.

◆ getProperty() [1/2]

ItemProperty * Heif::getProperty ( std::uint32_t  aIndex)

Gets an ItemProperty with the given index

Parameters
[in]aIndexThe index of the ItemProperty
Returns
ItemProperty: The ItemProperty

Definition at line 1155 of file Heif.cpp.

References mProperties.

◆ getProperty() [2/2]

const ItemProperty * Heif::getProperty ( std::uint32_t  aIndex) const

Gets an ItemProperty with the given index

Parameters
[in]aIndexThe index of the ItemProperty
Returns
ItemProperty: The ItemProperty

Definition at line 1163 of file Heif.cpp.

References mProperties.

◆ getPropertyCount()

std::uint32_t Heif::getPropertyCount ( ) const

Returns the amount of ItemProperties in the file

Returns
std::uint32_t: The property count.

Definition at line 1150 of file Heif.cpp.

References mProperties.

◆ getReaderInstance()

HEIF::Reader * HEIFPP::Heif::getReaderInstance ( )
protected

Definition at line 1660 of file Heif.cpp.

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

Here is the caller graph for this function:

◆ getTrack() [1/2]

Track * Heif::getTrack ( std::uint32_t  aTrack)

Returns the track with the given index

Parameters
[in]aTrackIndex of the track
Returns
Track*: The Track with the requested index

Definition at line 1559 of file Heif.cpp.

References mTracks.

◆ getTrack() [2/2]

const Track * Heif::getTrack ( std::uint32_t  aTrack) const

Returns the track with the given index

Parameters
[in]aTrackIndex of the track
Returns
const Track*: The track with the requested index

Definition at line 1564 of file Heif.cpp.

References mTracks.

◆ getTrackCount()

std::uint32_t Heif::getTrackCount ( ) const

Returns the total amount tracks in the file

Returns
std::uint32_t: The track count

Definition at line 1554 of file Heif.cpp.

References mTracks.

◆ getTrackInformation()

const HEIF::TrackInformation * Heif::getTrackInformation ( const HEIF::SequenceId aItemId) const
protected

Definition at line 375 of file Heif.cpp.

References mFileinfo, and HEIF::FileInformation::trackInformation.

Referenced by constructSample(), constructTrack(), and HEIFPP::ImageSequence::load().

Here is the caller graph for this function:

◆ hasImageCollection()

bool Heif::hasImageCollection ( )

Returns if the file has an image collection

Returns
bool: Is a collection

Definition at line 1406 of file Heif.cpp.

References getMasterImageCount().

Here is the call graph for this function:

◆ hasSingleImage()

bool Heif::hasSingleImage ( )

Returns if the file is a single image file

Returns
bool: Single file

Definition at line 1402 of file Heif.cpp.

References getMasterImageCount().

Here is the call graph for this function:

◆ load() [1/4]

Result Heif::load ( const char *  aFilename,
HEIF::StreamInterface aStream,
PreloadMode  loadMode 
)
private

Definition at line 396 of file Heif.cpp.

References HEIFPP::ALREADY_INITIALIZED, HEIFPP::convertErrorCode(), HEIF::Reader::Create(), HEIF::Reader::Destroy(), HEIF::Reader::initialize(), load(), mAltGroupsLoad, mCompatibleBrands, mDecoderConfigs, mDecoderConfigsLoad, mGroupsLoad, mItems, mItemsLoad, mItemsOfType, mMajorBrand, mPreLoadMode, mPrimaryItem, mProperties, mPropertiesLoad, mReader, mSamplesLoad, mTracksLoad, HEIF::OK, and reset().

Here is the call graph for this function:

◆ load() [2/4]

Result Heif::load ( const char *  fileName,
PreloadMode  loadMode = LOAD_ALL_DATA 
)

Load content from file.

Parameters
[in]fileNameFile to open.
[in]loadModeControl how data is loaded, see PreloadMode.
Returns
Result: Possible error code

Definition at line 387 of file Heif.cpp.

References load().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load() [3/4]

◆ load() [4/4]

Result Heif::load ( HEIF::StreamInterface stream,
PreloadMode  loadMode = LOAD_ALL_DATA 
)

Load content from a stream.

Parameters
[in]streamStream to read the file from.
[in]loadModeControl how data is loaded, see PreloadMode.
Returns
Result: Possible error code

Definition at line 392 of file Heif.cpp.

References load().

Here is the call graph for this function:

◆ mediaFormatFromFourCC()

HEIF::MediaFormat Heif::mediaFormatFromFourCC ( const HEIF::FourCC aType)
static

Definition at line 1741 of file Heif.cpp.

References HEIF::AAC, HEIF::AVC, HEIF::HEVC, HEIF::INVALID, and HEIF::JPEG.

Referenced by constructDecoderConfig(), HEIFPP::CodedImageItem::getMediaFormat(), and HEIFPP::DecoderConfig::getMediaFormat().

Here is the caller graph for this function:

◆ operator=() [1/2]

Heif & HEIFPP::Heif::operator= ( const Heif )
privatedelete

◆ operator=() [2/2]

Heif & HEIFPP::Heif::operator= ( Heif &&  )
privatedelete

◆ removeAlternativeTrackGroup()

void Heif::removeAlternativeTrackGroup ( AlternativeTrackGroup aGroup)

Definition at line 1651 of file Heif.cpp.

References mAltGroups, and HEIFPP::RemoveItemFrom().

Referenced by HEIFPP::AlternativeTrackGroup::~AlternativeTrackGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCompatibleBrand() [1/2]

void Heif::removeCompatibleBrand ( const HEIF::FourCC aBrand)

Removes a compatible brand from the file

Parameters
[in]aBrandThe brand as a FourCC.

Definition at line 776 of file Heif.cpp.

References mCompatibleBrands, and HEIFPP::RemoveItemFrom().

Here is the call graph for this function:

◆ removeCompatibleBrand() [2/2]

void Heif::removeCompatibleBrand ( std::uint32_t  aIndex)

Removes a compatible brand from the file

Parameters
[in]aIndexThe brand with the given index from the file.

Definition at line 769 of file Heif.cpp.

References mCompatibleBrands.

◆ removeDecoderConfig()

void Heif::removeDecoderConfig ( DecoderConfig aDecoderConfig)

Remove decoder config from the file

Parameters
[in]aDecoderConfigThe config to be removed.

Definition at line 1545 of file Heif.cpp.

References HEIF_ASSERT, mDecoderConfigs, and HEIFPP::RemoveItemFrom().

Referenced by HEIFPP::DecoderConfig::~DecoderConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeGroup()

void Heif::removeGroup ( EntityGroup aGroup)

Definition at line 1606 of file Heif.cpp.

References HEIFPP::EntityGroup::getType(), HEIF_ASSERT, mGroups, mGroupsOfType, and HEIFPP::RemoveItemFrom().

Referenced by HEIFPP::EntityGroup::~EntityGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeItem()

void Heif::removeItem ( Item aItem)

Remove item/image from file

Parameters
[in]aItemItem to be removed

Definition at line 1180 of file Heif.cpp.

References HEIFPP::Item::getType(), HEIF_ASSERT, mItems, mItemsOfType, mPrimaryItem, and HEIFPP::RemoveItemFrom().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeProperty()

void Heif::removeProperty ( ItemProperty aProperty)

Remove an ItemProperty from the file

Parameters
[in]aPropertyThe ItemProperty to be removed

Definition at line 1172 of file Heif.cpp.

References HEIF_ASSERT, mProperties, and HEIFPP::RemoveItemFrom().

Referenced by HEIFPP::ItemProperty::~ItemProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeSample()

void Heif::removeSample ( Sample aSample)

Definition at line 1589 of file Heif.cpp.

References HEIF_ASSERT, mSamples, and HEIFPP::RemoveItemFrom().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeTrack()

void Heif::removeTrack ( Track aTrack)

Remove track from file

Parameters
[in]aTrackTrack to be removed

Definition at line 1574 of file Heif.cpp.

References HEIF_ASSERT, mTracks, and HEIFPP::RemoveItemFrom().

Here is the call graph for this function:

◆ reset()

void Heif::reset ( )

Clears the container to initial state.

Definition at line 83 of file Heif.cpp.

References HEIF::Reader::Destroy(), mAltGroups, mCompatibleBrands, mDecoderConfigs, mFileinfo, mGroups, mItems, mMajorBrand, mMatrix, mPrimaryItem, mProperties, mReader, mSamples, and mTracks.

Referenced by load(), and ~Heif().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save() [1/3]

◆ save() [2/3]

Result Heif::save ( const char *  fileName)

Save content to file.

Parameters
[in]fileNameName of the saved file.
Returns
Result: Possible error code

Definition at line 152 of file Heif.cpp.

References save().

Referenced by save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save() [3/3]

Result Heif::save ( HEIF::OutputStreamInterface stream)

Save content to stream.

Parameters
[in]streamStream to save the file to.
Returns
Result: Possible error code

Definition at line 157 of file Heif.cpp.

References save().

Here is the call graph for this function:

◆ setContext()

void Heif::setContext ( const void *  aContext)

Sets the custom user data

Parameters
[in]aContextPointer to the custom data

Custom user data can be bound to objects.

Definition at line 142 of file Heif.cpp.

References mContext.

◆ setMajorBrand()

void Heif::setMajorBrand ( const HEIF::FourCC aBrand)

Sets the major brand

Parameters
[in]aBrandThe brand as a FourCC

Definition at line 736 of file Heif.cpp.

References mMajorBrand.

◆ setMinorVersion()

void Heif::setMinorVersion ( std::uint32_t  aVersion)

Sets the minor version of the file

Parameters
[in]aVersionMinor version of the file

Definition at line 744 of file Heif.cpp.

References mMinorVersion.

◆ setPrimaryItem()

void Heif::setPrimaryItem ( ImageItem aItem)

Sets the primary item of the file (cover image)

Parameters
[in]aItemThe new primary item

Definition at line 1255 of file Heif.cpp.

References mPrimaryItem.

Referenced by load().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ AlternativeTrackGroup

friend class AlternativeTrackGroup
friend

Definition at line 76 of file Heif.h.

Referenced by load().

◆ AudioTrack

friend class AudioTrack
friend

Definition at line 65 of file Heif.h.

Referenced by constructTrack().

◆ CodedImageItem

friend class CodedImageItem
friend

Definition at line 71 of file Heif.h.

◆ DecoderConfig

friend class DecoderConfig
friend

Definition at line 74 of file Heif.h.

◆ DerivedImageItem

friend class DerivedImageItem
friend

Definition at line 72 of file Heif.h.

◆ EntityGroup

friend class EntityGroup
friend

Definition at line 62 of file Heif.h.

Referenced by constructGroup().

◆ ExifItem

friend class ExifItem
friend

Definition at line 68 of file Heif.h.

Referenced by constructMetaItem().

◆ ImageItem

friend class ImageItem
friend

Definition at line 73 of file Heif.h.

◆ ImageSequence

friend class ImageSequence
friend

Definition at line 67 of file Heif.h.

Referenced by constructTrack().

◆ Item

friend class Item
friend

Definition at line 70 of file Heif.h.

◆ ItemProperty

friend class ItemProperty
friend

Definition at line 69 of file Heif.h.

◆ MimeItem

friend class MimeItem
friend

Definition at line 75 of file Heif.h.

Referenced by constructMetaItem().

◆ Sample

friend class Sample
friend

Definition at line 64 of file Heif.h.

◆ Track

friend class Track
friend

Definition at line 63 of file Heif.h.

◆ VideoTrack

friend class VideoTrack
friend

Definition at line 66 of file Heif.h.

Referenced by constructTrack().

Member Data Documentation

◆ InvalidDecoderConfig

const HEIF::DecoderConfigId Heif::InvalidDecoderConfig
static

Definition at line 84 of file Heif.h.

Referenced by save(), HEIFPP::Sample::save(), and HEIFPP::CodedImageItem::save().

◆ InvalidGroup

const HEIF::GroupId Heif::InvalidGroup
static

Definition at line 79 of file Heif.h.

Referenced by save().

◆ InvalidItem

◆ InvalidMediaData

const HEIF::MediaDataId Heif::InvalidMediaData
static

Definition at line 85 of file Heif.h.

◆ InvalidProperty

const HEIF::PropertyId Heif::InvalidProperty
static

Definition at line 83 of file Heif.h.

Referenced by save(), and HEIFPP::Item::save().

◆ InvalidSequence

const HEIF::SequenceId Heif::InvalidSequence
static

◆ InvalidSequenceImage

const HEIF::SequenceImageId Heif::InvalidSequenceImage
static

◆ mAltGroups

std::vector<AlternativeTrackGroup*> HEIFPP::Heif::mAltGroups
protected

◆ mAltGroupsLoad

std::map<std::uint32_t, AlternativeTrackGroup*> HEIFPP::Heif::mAltGroupsLoad
protected

Definition at line 408 of file Heif.h.

Referenced by load().

◆ mCompatibleBrands

std::vector<HEIF::FourCC> HEIFPP::Heif::mCompatibleBrands
protected

◆ mContext

const void* HEIFPP::Heif::mContext
private

Definition at line 414 of file Heif.h.

Referenced by getContext(), and setContext().

◆ mDecoderConfigs

std::vector<DecoderConfig*> HEIFPP::Heif::mDecoderConfigs
protected

◆ mDecoderConfigsLoad

std::map<std::pair<HEIF::SequenceId, HEIF::DecoderConfigId>, DecoderConfig*> HEIFPP::Heif::mDecoderConfigsLoad
protected

Definition at line 405 of file Heif.h.

Referenced by constructDecoderConfig(), and load().

◆ mFileinfo

HEIF::FileInformation HEIFPP::Heif::mFileinfo
protected

Definition at line 382 of file Heif.h.

Referenced by getFileInformation(), getItemInformation(), getTrackInformation(), load(), and reset().

◆ mGroups

std::vector<EntityGroup*> HEIFPP::Heif::mGroups
protected

Definition at line 393 of file Heif.h.

Referenced by addGroup(), getGroup(), getGroupById(), getGroupCount(), removeGroup(), reset(), and save().

◆ mGroupsLoad

std::map<HEIF::GroupId, EntityGroup*> HEIFPP::Heif::mGroupsLoad
protected

Definition at line 407 of file Heif.h.

Referenced by load().

◆ mGroupsOfType

std::map<HEIF::FourCC, std::vector<EntityGroup*> > HEIFPP::Heif::mGroupsOfType
protected

Definition at line 395 of file Heif.h.

Referenced by addGroup(), getGroupByType(), getGroupByTypeCount(), and removeGroup().

◆ mItems

std::vector<Item*> HEIFPP::Heif::mItems
protected

◆ mItemsLoad

std::map<HEIF::ImageId, Item*> HEIFPP::Heif::mItemsLoad
protected

Definition at line 402 of file Heif.h.

Referenced by constructImageItem(), constructMetaItem(), and load().

◆ mItemsOfType

std::map<HEIF::FourCC, std::vector<Item*> > HEIFPP::Heif::mItemsOfType
protected

Definition at line 390 of file Heif.h.

Referenced by addItem(), getItemOfType(), getItemsOfTypeCount(), load(), and removeItem().

◆ mMajorBrand

HEIF::FourCC HEIFPP::Heif::mMajorBrand
protected

Definition at line 383 of file Heif.h.

Referenced by getMajorBrand(), load(), reset(), save(), and setMajorBrand().

◆ mMatrix

std::int32_t HEIFPP::Heif::mMatrix[9]
protected

Definition at line 397 of file Heif.h.

Referenced by load(), reset(), and save().

◆ mMinorVersion

std::uint32_t HEIFPP::Heif::mMinorVersion
protected

Definition at line 384 of file Heif.h.

Referenced by getMinorVersion(), load(), and setMinorVersion().

◆ mPreLoadMode

PreloadMode HEIFPP::Heif::mPreLoadMode
protected

Definition at line 399 of file Heif.h.

Referenced by load(), and save().

◆ mPrimaryItem

ImageItem* HEIFPP::Heif::mPrimaryItem
protected

Definition at line 396 of file Heif.h.

Referenced by getPrimaryItem(), load(), removeItem(), reset(), save(), and setPrimaryItem().

◆ mProperties

std::vector<ItemProperty*> HEIFPP::Heif::mProperties
protected

Definition at line 391 of file Heif.h.

Referenced by addProperty(), getProperty(), getPropertyCount(), load(), removeProperty(), reset(), and save().

◆ mPropertiesLoad

std::map<HEIF::PropertyId, ItemProperty*> HEIFPP::Heif::mPropertiesLoad
protected

Definition at line 404 of file Heif.h.

Referenced by constructItemProperty(), and load().

◆ mReader

HEIF::Reader* HEIFPP::Heif::mReader
private

Definition at line 415 of file Heif.h.

Referenced by load(), reset(), and save().

◆ mSamples

std::vector<Sample*> HEIFPP::Heif::mSamples
protected

Definition at line 389 of file Heif.h.

Referenced by addSample(), load(), removeSample(), reset(), and save().

◆ mSamplesLoad

std::map<std::pair<HEIF::SequenceId, HEIF::SequenceImageId>, Sample*> HEIFPP::Heif::mSamplesLoad
protected

Definition at line 406 of file Heif.h.

Referenced by constructSample(), and load().

◆ mTracks

std::vector<Track*> HEIFPP::Heif::mTracks
protected

Definition at line 388 of file Heif.h.

Referenced by addTrack(), getTrack(), getTrackCount(), removeTrack(), reset(), and save().

◆ mTracksLoad

std::map<HEIF::SequenceId, Track*> HEIFPP::Heif::mTracksLoad
protected

Definition at line 403 of file Heif.h.

Referenced by constructTrack(), and load().


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