The Metadata Editor API provides functions for editing the metadata of mp3, mp4 contents.
Required Header
#include <metadata_editor.h>
Overview
The Metadata Editor API allows you to read the metadata from a media file(metadata_editor_get_metadata()). To edit a metadata(metadata_editor_set_metadata()), create/destroy the handle(metadata_editor_create()/metadata_editor_destroy), and append/ remove a picture in the metadata(metadata_editor_append_picture()/ metadata_editor_remove_picture()).
Functions |
int | metadata_editor_create (metadata_editor_h *metadata) |
| Creates metadata.
|
int | metadata_editor_set_path (metadata_editor_h metadata, const char *path) |
| Sets file path to read or write metadata.
|
int | metadata_editor_get_metadata (metadata_editor_h metadata, metadata_editor_attr_e attribute, char **value) |
| Gets the metadata corresponding to the attribute.
|
int | metadata_editor_set_metadata (metadata_editor_h metadata, metadata_editor_attr_e attribute, const char *value) |
| Sets the attribute of the metadata.
|
int | metadata_editor_update_metadata (metadata_editor_h metadata) |
| Updates the modified metadata.
|
int | metadata_editor_get_picture (metadata_editor_h metadata, int index, void **picture, int *size, char **mime_type) |
| Gets the picture in the media file.
|
int | metadata_editor_append_picture (metadata_editor_h metadata, const char *picture_path) |
| Appends the picture to the media file.
|
int | metadata_editor_remove_picture (metadata_editor_h metadata, int index) |
| Removes artwork image from media file.
|
int | metadata_editor_destroy (metadata_editor_h metadata) |
| Destroys metadata.
|
Typedefs |
typedef void * | metadata_editor_h |
| The handle of media metadata.
|
Defines |
#define | METADATA_EDITOR_ERROR_CLASS TIZEN_ERROR_METADATA_EDITOR |
| Definition for Metadata editor Error Class.
|
Define Documentation
Definition for Metadata editor Error Class.
- Since :
- 2.4
Typedef Documentation
The handle of media metadata.
- Since :
- 2.4
Enumeration Type Documentation
The enumerations of attribute.
- Since :
- 2.4
- Enumerator:
METADATA_EDITOR_ATTR_ARTIST |
Artist
|
METADATA_EDITOR_ATTR_TITLE |
Title
|
METADATA_EDITOR_ATTR_ALBUM |
Album
|
METADATA_EDITOR_ATTR_GENRE |
Genre
|
METADATA_EDITOR_ATTR_AUTHOR |
Author
|
METADATA_EDITOR_ATTR_COPYRIGHT |
Copyright
|
METADATA_EDITOR_ATTR_DATE |
Date
|
METADATA_EDITOR_ATTR_DESCRIPTION |
Description
|
METADATA_EDITOR_ATTR_COMMENT |
Comment
|
METADATA_EDITOR_ATTR_TRACK_NUM |
Track number info
|
METADATA_EDITOR_ATTR_PICTURE_NUM |
Picture number
|
METADATA_EDITOR_ATTR_CONDUCTOR |
Conductor
|
METADATA_EDITOR_ATTR_UNSYNCLYRICS |
Unsynchronized lyric
|
The enumerations of media metadata error.
- Since :
- 2.4
- Enumerator:
METADATA_EDITOR_ERROR_NONE |
Successful
|
METADATA_EDITOR_ERROR_INVALID_PARAMETER |
Invalid parameter
|
METADATA_EDITOR_ERROR_OUT_OF_MEMORY |
Out of memory
|
METADATA_EDITOR_ERROR_FILE_EXISTS |
File not exist
|
METADATA_EDITOR_ERROR_PERMISSION_DENIED |
Permission denied
|
METADATA_EDITOR_ERROR_NOT_SUPPORTED |
Unsupported type
|
METADATA_EDITOR_ERROR_OPERATION_FAILED |
Invalid internal operation
|
Function Documentation
Creates metadata.
- Since :
- 2.4
- Parameters:
-
[in] | metadata | The handle to metadata |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
- See also:
- metadata_editor_destroy()
Destroys metadata.
- Since :
- 2.4
- Parameters:
-
[in] | metadata | The handle to metadata |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
- Precondition:
- Create metadata handle by calling metadata_editor_create()
- See also:
- metadata_editor_create()