MetaPicture¶
primo::codecs::MetaPicture
-
class MetaPicture : public primo::Reference¶
MetaPicture describes a meta image that is part of an audio or video file.
See also
Library::createMetaPicture
See also
Public Functions
-
virtual MetaPicture *clone() const = 0¶
Creates a deep copy of this object.
Remark
When cloned an immutable object becomes mutable.
See also
- Returns:
A new MetaPicture object. The caller is responsible for releasing the new object when it’s not needed anymore.
- Returns:
NULL if the object cannot be cloned because there is not enough memory.
-
virtual const char *mimeType() const = 0¶
Returns the picture MIME type.
See also
primo::codecs::MimeType
- Returns:
The MIME type is an ANSI string.
-
virtual bool_t setMimeType(const char *mimeType) = 0¶
Sets the picture MIME type.
See also
primo::codecs::MimeType
- Parameters:
mimeType – [in] A pointer to ANSI string specifying the MIME type
- Returns:
TRUE if the MIME type is successfully set, otherwise FALSE.
-
virtual MetaPictureType::Enum pictureType() const = 0¶
Returns the meta picture type (front cover, back cover, artist, etc.).
See also
- Returns:
A picture type constant defined in MetaPictureType::Enum.
-
virtual bool_t setPictureType(MetaPictureType::Enum picType) = 0¶
Sets the picture type (front cover, back cover, artist, etc.).
See also
- Parameters:
picType – [in] A picture type constant defined in MetaPictureType::Enum.
- Returns:
TRUE if the picture type is successfully set, otherwise FALSE.
-
virtual const char_t *description() const = 0¶
Returns a picture description as a free text.
- Returns:
Unicode string. Can be NULL if the picture has no description.
-
virtual bool_t setDescription(const char_t *description) = 0¶
Sets picture description.
- Parameters:
description – [in] A pointer to a Unicode string. Can be NULL in which case the picture description is cleared.
- Returns:
TRUE if the description is successfully set, otherwise FALSE.
-
virtual const uint8_t *data() const = 0¶
Returns the start of the image data.
The image is a jpeg, png or another image type.
See also
See also
- Returns:
A pointer to the start of the image data. The number of image bytes is given by the MetaPicture::dataSize property. The image type (jpeg, png, etc.) is given by the MetaPicture::mimeType property.
-
virtual int32_t dataSize() const = 0¶
Returns the number of image bytes.
- Returns:
The number of image bytes that are returned by the MetaPicture::data property.
-
virtual bool_t setData(const void *data, int32_t dataSize) = 0¶
Sets image data.
The supplied data is copied internally and is not required to be valid after the method returns.
See also
See also
- Parameters:
data – [in] A pointer to the new image data.
dataSize – [in] The size of the new image in bytes .
- Returns:
TRUE if the data is successfully set, FALSE if there’s an error.
-
virtual bool_t immutable() const = 0¶
Returns whether the object is immutable.
An immmutable object cannot be modified and all modifying methods fail to produce a result.
Remark
An immutable object can be modified by the AVBlocks library.
Remark
Object immutability spreads to all nested objects. Therefore it is not possible to add/set an immutable object to a mutable object.
Remark
When cloned an immutable object becomes mutable.
- Returns:
TRUE if the object is immutable, FALSE otherwise.
-
virtual MetaPicture *clone() const = 0¶