Functional class for covr-box (Cover-art Box) support.
More...
#include <CoverArtBox.h>
|
typedef vector< Item > | ItemList |
| Object representing a list of covr-box items.
|
|
|
static bool | list (MP4FileHandle hFile, ItemList &out) |
| Fetch list of covr-box items from file.
|
|
static bool | add (MP4FileHandle hFile, const Item &item) |
| Add covr-box item to file.
|
|
static bool | set (MP4FileHandle hFile, const Item &item, uint32_t index) |
| Replace covr-box item in file.
|
|
static bool | get (MP4FileHandle hFile, Item &item, uint32_t index) |
| Fetch covr-box item from file.
|
|
static bool | remove (MP4FileHandle hFile, uint32_t index=numeric_limits< uint32_t >::max()) |
| Remove covr-box item from file.
|
|
Functional class for covr-box (Cover-art Box) support.
◆ add()
static bool mp4v2::impl::itmf::CoverArtBox::add |
( |
MP4FileHandle | hFile, |
|
|
const Item & | item ) |
|
static |
Add covr-box item to file.
Any necessary metadata atoms are first created. Additionally, if an empty data-atom exists it will be used, otherwise a new data-atom is added to covr-atom.
- Parameters
-
hFile | on which to operate. |
item | covr-box object to place in file. |
- Returns
- true on failure, false on success.
◆ get()
static bool mp4v2::impl::itmf::CoverArtBox::get |
( |
MP4FileHandle | hFile, |
|
|
Item & | item, |
|
|
uint32_t | index ) |
|
static |
Fetch covr-box item from file.
- Parameters
-
hFile | on which to operate. |
item | covr-box object populated with data. The resulting object owns the malloc'd buffer and item.autofree is set to true for convenient memory management. |
index | 0-based index of image to fetch. |
- Returns
- true on failure, false on success.
◆ list()
static bool mp4v2::impl::itmf::CoverArtBox::list |
( |
MP4FileHandle | hFile, |
|
|
ItemList & | out ) |
|
static |
Fetch list of covr-box items from file.
- Parameters
-
hFile | on which to operate. |
out | vector of ArtItem objects. |
- Returns
- true on failure, false on success.
◆ remove()
static bool mp4v2::impl::itmf::CoverArtBox::remove |
( |
MP4FileHandle | hFile, |
|
|
uint32_t | index = numeric_limits< uint32_t >::max() ) |
|
static |
Remove covr-box item from file.
- Parameters
-
hFile | on which to operate. |
index | 0-based index of image to remove. Default value indicates wildcard behavior to remove all items. |
- Returns
- true on failure, false on success.
◆ set()
static bool mp4v2::impl::itmf::CoverArtBox::set |
( |
MP4FileHandle | hFile, |
|
|
const Item & | item, |
|
|
uint32_t | index ) |
|
static |
Replace covr-box item in file.
- Parameters
-
hFile | on which to operate. |
item | covr-box object to place in file. |
index | 0-based index of image to replace. |
- Returns
- true on failure, false on success.