PrimoBurner(tm) for C++  4.6
CD, DVD and Blu-ray Software Development Kit
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
MetaPicture Class Referenceabstract

MetaPicture describes a meta image that is part of an audio or video file. More...

#include <PrimoAV.h>

Inherits Reference.

Public Member Functions

virtual MetaPictureclone () const =0
 Creates a deep copy of this object. More...
 
virtual const uint8_t * data () const =0
 Returns the start of the image data. More...
 
virtual int32_t dataSize () const =0
 Returns the number of image bytes. More...
 
virtual const char_t * description () const =0
 Returns a picture description as a free text. More...
 
virtual bool_t immutable () const =0
 Returns whether the object is immutable. More...
 
virtual const char * mimeType () const =0
 Returns the picture MIME type. More...
 
virtual MetaPictureType::Enum pictureType () const =0
 Returns the meta picture type (front cover, back cover, artist, etc.) More...
 
virtual bool_t setData (const void *data, int32_t dataSize)=0
 Sets image data. More...
 
virtual void setDescription (const char_t *description)=0
 Sets picture description. More...
 
virtual void setMimeType (const char *mimeType)=0
 Sets the picture MIME type. More...
 
virtual void setPictureType (MetaPictureType::Enum picType)=0
 Sets the picture type (front cover, back cover, artist, etc.) More...
 
- Public Member Functions inherited from Reference
virtual int32_t release () const =0
 Releases the instance. More...
 
virtual int32_t retain () const =0
 Retains the instance. More...
 
virtual int32_t retainCount () const =0
 Returns the current reference count. More...
 

Protected Member Functions

virtual ~MetaPicture ()
 This object can be destroyed only by the library that has created it. More...
 

Detailed Description

MetaPicture describes a meta image that is part of an audio or video file.

See Also
Library::createMetaPicture
Metadata

Constructor & Destructor Documentation

virtual ~MetaPicture ( )
protectedvirtual

This object can be destroyed only by the library that has created it.

See Also
primo::Reference::release

Member Function Documentation

virtual MetaPicture* clone ( ) const
pure virtual

Creates a deep copy of this object.

Returns
A new MetaPicture object. The caller is responsible for releasing the new object when it's not needed anymore.
NULL if the object cannot be cloned because there is not enough memory.
See Also
Object Management
virtual const uint8_t* data ( ) const
pure virtual

Returns the start of the image data.

The image is a jpeg, png or another image type.

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.
See Also
MetaPicture::mimeType
MetaPicture::dataSize
virtual int32_t dataSize ( ) const
pure virtual

Returns the number of image bytes.

Returns
The number of image bytes that are returned by the MetaPicture::data property.
virtual const char_t* description ( ) const
pure virtual

Returns a picture description as a free text.

Returns
Unicode string. Can be NULL if the picture has no description.
virtual bool_t immutable ( ) const
pure virtual

Returns whether the object is immutable.

An immmutable object cannot be modified and all modifying methods fail to produce a result.

Returns
TRUE if the object is immutable, FALSE otherwise.
Remarks
An immutable object can be modified by the AVBlocks library.
Object immutability spreads to all nested objects. Therefore it is not possible to add/set an immutable object to a mutable object.
When cloned an immutable object becomes mutable.
virtual const char* mimeType ( ) const
pure virtual

Returns the picture MIME type.

Returns
The MIME type is an ANSI string.
See Also
primo::codecs::MimeType
virtual MetaPictureType::Enum pictureType ( ) const
pure virtual

Returns the meta picture type (front cover, back cover, artist, etc.)

Returns
A picture type constant defined in MetaPictureType::Enum.
See Also
MetaPictureType::Enum
virtual bool_t setData ( const void *  data,
int32_t  dataSize 
)
pure virtual

Sets image data.

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.

The supplied data is copied internally and is not required to be valid after the method returns.

See Also
MetaPicture::data
MetaPicture::dataSize
virtual void setDescription ( const char_t *  description)
pure virtual

Sets picture description.

Parameters
description[in] A pointer to a Unicode string. Can be NULL in which case the picture description is cleared.
virtual void setMimeType ( const char *  mimeType)
pure virtual

Sets the picture MIME type.

Parameters
mimeType[in] A pointer to ANSI string specifying the MIME type
See Also
primo::codecs::MimeType
virtual void setPictureType ( MetaPictureType::Enum  picType)
pure virtual

Sets the picture type (front cover, back cover, artist, etc.)

Parameters
[in]picTypeA picture type constant defined in MetaPictureType::Enum.
See Also
MetaPictureType::Enum