The Media Controller API provides functions for communication between the media controller server and the media controller client.
Required Header
#include <media_controller_server.h> #include <media_controller_client.h>
Overview
The Media Controller API provides a set of functions to an effective communication between the server and the client for delivering the latest server information. It helps to transfer the information like playback info, shuffle mode, or the metadata of the latest server.
To programming the interface, first, create a handler via mc_client_create() or mc_server_create(). And then, the client request the necessary information to the server by using mc_client_set_server_updated_cb(), or mc_client_set_playback_updated_cb(). The server provides the requested information to the client by the callback.
Typedefs |
typedef void * | mc_server_h |
| The structure type for the media server handle.
|
typedef void * | mc_client_h |
| The structure type for the media client handle.
|
typedef void * | mc_playback_h |
| The structure type for the media controller playback handle.
|
typedef void * | mc_metadata_h |
| The structure type for the media controller metadata handle.
|
typedef void * | mc_playlist_h |
| The structure type for the media controller playlist handle.
|
typedef void * | mc_playback_ability_h |
| The structure type for the media controller ability handle.
|
typedef void * | mc_search_h |
| The structure type for the media controller search handle.
|
Typedef Documentation
The structure type for the media client handle.
- Since :
- 3.0
The structure type for the media controller metadata handle.
- Since :
- 3.0
The structure type for the media controller ability handle.
- Since :
- 5.0
The structure type for the media controller playback handle.
- Since :
- 3.0
The structure type for the media controller playlist handle.
- Since :
- 5.0
The structure type for the media controller search handle.
- Since :
- 5.0
The structure type for the media server handle.
- Since :
- 3.0
Enumeration Type Documentation
Enumeration for the support of the ability.
- Since :
- 5.0
- Enumerator:
MC_ABILITY_SUPPORTED_YES |
Supported
|
MC_ABILITY_SUPPORTED_NO |
Not supported
|
MC_ABILITY_SUPPORTED_UNDECIDED |
Not decided
|
Enumeration for the content age rating of the content.
- Since :
- 5.0
- Enumerator:
MC_CONTENT_RATING_ALL |
Suitable for all ages
|
MC_CONTENT_RATING_1_PLUS |
Suitable for ages 1 and up
|
MC_CONTENT_RATING_2_PLUS |
Suitable for ages 2 and up
|
MC_CONTENT_RATING_3_PLUS |
Suitable for ages 3 and up
|
MC_CONTENT_RATING_4_PLUS |
Suitable for ages 4 and up
|
MC_CONTENT_RATING_5_PLUS |
Suitable for ages 5 and up
|
MC_CONTENT_RATING_6_PLUS |
Suitable for ages 6 and up
|
MC_CONTENT_RATING_7_PLUS |
Suitable for ages 7 and up
|
MC_CONTENT_RATING_8_PLUS |
Suitable for ages 8 and up
|
MC_CONTENT_RATING_9_PLUS |
Suitable for ages 9 and up
|
MC_CONTENT_RATING_10_PLUS |
Suitable for ages 10 and up
|
MC_CONTENT_RATING_11_PLUS |
Suitable for ages 11 and up
|
MC_CONTENT_RATING_12_PLUS |
Suitable for ages 12 and up
|
MC_CONTENT_RATING_13_PLUS |
Suitable for ages 13 and up
|
MC_CONTENT_RATING_14_PLUS |
Suitable for ages 14 and up
|
MC_CONTENT_RATING_15_PLUS |
Suitable for ages 15 and up
|
MC_CONTENT_RATING_16_PLUS |
Suitable for ages 16 and up
|
MC_CONTENT_RATING_17_PLUS |
Suitable for ages 17 and up
|
MC_CONTENT_RATING_18_PLUS |
Suitable for ages 18 and up
|
MC_CONTENT_RATING_19_PLUS |
Suitable for ages 19 and up
|
Enumeration for the content type of the content.
- Since :
- 5.0
- Enumerator:
MC_CONTENT_TYPE_IMAGE |
Image content type
|
MC_CONTENT_TYPE_VIDEO |
Video content type
|
MC_CONTENT_TYPE_MUSIC |
Music content type
|
MC_CONTENT_TYPE_OTHER |
Other content type
|
MC_CONTENT_TYPE_UNDECIDED |
Not decided
|
Enumeration for the media controller error.
- Since :
- 3.0
- Enumerator:
MEDIA_CONTROLLER_ERROR_NONE |
Successful
|
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER |
Invalid parameter
|
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY |
Out of memory
|
MEDIA_CONTROLLER_ERROR_INVALID_OPERATION |
Invalid Operation
|
MEDIA_CONTROLLER_ERROR_FILE_NO_SPACE_ON_DEVICE |
No space left on device
|
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED |
Permission denied
|
Enumeration for the media meta info.
- Since :
- 3.0
- Enumerator:
MC_META_MEDIA_TITLE |
Title
|
MC_META_MEDIA_ARTIST |
Artist
|
MC_META_MEDIA_ALBUM |
Album
|
MC_META_MEDIA_AUTHOR |
Author
|
MC_META_MEDIA_GENRE |
Genre
|
MC_META_MEDIA_DURATION |
Duration
|
MC_META_MEDIA_DATE |
Date
|
MC_META_MEDIA_COPYRIGHT |
Copyright
|
MC_META_MEDIA_DESCRIPTION |
Description
|
MC_META_MEDIA_TRACK_NUM |
Track Number
|
MC_META_MEDIA_PICTURE |
Picture. Album Art
|
Enumeration for the media playback action.
- Since :
- 5.0
- Enumerator:
MC_PLAYBACK_ACTION_PLAY |
Play
|
MC_PLAYBACK_ACTION_PAUSE |
Pause
|
MC_PLAYBACK_ACTION_STOP |
Stop
|
MC_PLAYBACK_ACTION_NEXT |
Next item
|
MC_PLAYBACK_ACTION_PREV |
Previous item
|
MC_PLAYBACK_ACTION_FAST_FORWARD |
Fast forward
|
MC_PLAYBACK_ACTION_REWIND |
Rewind
|
MC_PLAYBACK_ACTION_TOGGLE_PLAY_PAUSE |
Play/Pause toggle
|
Enumeration for the media playback state.
- Since :
- 3.0
- Enumerator:
MC_PLAYBACK_STATE_NONE |
None
|
MC_PLAYBACK_STATE_PLAYING |
Playing
|
MC_PLAYBACK_STATE_PAUSED |
Paused
|
MC_PLAYBACK_STATE_STOPPED |
Stopped
|
MC_PLAYBACK_STATE_NEXT_FILE |
Next file (Deprecated since 4.0)
|
MC_PLAYBACK_STATE_PREV_FILE |
Previous file (Deprecated since 4.0)
|
MC_PLAYBACK_STATE_FAST_FORWARD |
Fast forward (Deprecated since 4.0)
|
MC_PLAYBACK_STATE_REWIND |
Rewind (Deprecated since 4.0)
|
MC_PLAYBACK_STATE_MOVING_TO_NEXT |
Moving to the next item (Since 5.0)
|
MC_PLAYBACK_STATE_MOVING_TO_PREVIOUS |
Moving to the previous item (Since 5.0)
|
MC_PLAYBACK_STATE_FAST_FORWARDING |
Fast forwarding (Since 5.0)
|
MC_PLAYBACK_STATE_REWINDING |
Rewinding (Since 5.0)
|
Enumeration for the playlist update mode.
- Since :
- 5.0
- Enumerator:
MC_PLAYLIST_UPDATED |
Create or Update playlist
|
MC_PLAYLIST_REMOVED |
Remove playlist
|
Enumeration for the repeat mode.
- Since :
- 3.0
- Enumerator:
MC_REPEAT_MODE_ON |
Repeat mode on for all media
|
MC_REPEAT_MODE_OFF |
Repeat mode off
|
MC_REPEAT_MODE_ONE_MEDIA |
Repeat mode on for one media (Since 5.0)
|
Enumeration for the search category.
- Since :
- 5.0
- Enumerator:
MC_SEARCH_NO_CATEGORY |
No search category
|
MC_SEARCH_TITLE |
Search by content title
|
MC_SEARCH_ARTIST |
Search by content artist
|
MC_SEARCH_ALBUM |
Search by content album
|
MC_SEARCH_GENRE |
Search by content genre
|
MC_SEARCH_TPO |
Search by Time Place Occasion
|
Enumeration for the media controller server state.
- Since :
- 3.0
- Enumerator:
MC_SERVER_STATE_NONE |
None state
|
MC_SERVER_STATE_ACTIVATE |
Activate state
|
MC_SERVER_STATE_DEACTIVATE |
Deactivate state
|
Enumeration for the shuffle mode.
- Since :
- 3.0
- Enumerator:
MC_SHUFFLE_MODE_ON |
Shuffle mode on
|
MC_SHUFFLE_MODE_OFF |
Shuffle mode off
|
Enumeration for the subscription type.
- Since :
- 3.0
- Enumerator:
MC_SUBSCRIPTION_TYPE_SERVER_STATE |
Server state
|
MC_SUBSCRIPTION_TYPE_PLAYBACK |
Playback
|
MC_SUBSCRIPTION_TYPE_METADATA |
Metadata
|
MC_SUBSCRIPTION_TYPE_SHUFFLE_MODE |
Shuffle mode
|
MC_SUBSCRIPTION_TYPE_REPEAT_MODE |
Repeat mode
|
MC_SUBSCRIPTION_TYPE_PLAYLIST |
Playlist (Since 5.0)
|
MC_SUBSCRIPTION_TYPE_PLAYBACK_ABILITY |
Playback ability (Since 5.0)
|
MC_SUBSCRIPTION_TYPE_SHUFFLE_ABILITY |
Shuffle ability (Since 5.0)
|
MC_SUBSCRIPTION_TYPE_REPEAT_ABILITY |
Repeat ability (Since 5.0)
|