MP4v2

Classes | Public Types | Static Public Member Functions | List of all members
mp4v2::impl::itmf::CoverArtBox Class Reference

Functional class for covr-box (Cover-art Box) support. More...

`#include <CoverArtBox.h>`

## Classes
class | Item
| Data object for covr-box item. More...

## Public Types
typedef vector< Item > | ItemList
| Object representing a list of covr-box items.

## Static Public Member Functions
static bool | list (MP4FileHandle hFile, ItemList &out)
| Fetch list of covr-box items from file. More...
static bool | add (MP4FileHandle hFile, const Item &item)
| Add covr-box item to file. More...
static bool | set (MP4FileHandle hFile, const Item &item, uint32_t index)
| Replace covr-box item in file. More...
static bool | get (MP4FileHandle hFile, Item &item, uint32_t index)
| Fetch covr-box item from file. More...
static bool | remove (MP4FileHandle hFile, uint32_t index=numeric_limits< uint32_t >::max())
| Remove covr-box item from file. More...

## Detailed Description

Functional class for covr-box (Cover-art Box) support.

## Member Function Documentation

## ◆ 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.