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 :
- 2.4
The structure type for the media controller metadata handle.
- Since :
- 2.4
The structure type for the media controller ability handle.
- Since :
- 5.0
The structure type for the media controller playback handle.
- Since :
- 2.4
The structure type for the media controller playlist handle.
- Since :
- 4.0
The structure type for the media controller search handle.
- Since :
- 5.0
The structure type for the media server handle.
- Since :
- 2.4
Enumeration Type Documentation
Enumeration for the ability.
- Since :
- 5.5
- Enumerator:
MC_ABILITY_SHUFFLE |
Shuffle
|
MC_ABILITY_REPEAT |
Repeat
|
MC_ABILITY_PLAYBACK_POSITION |
Playback Position
|
MC_ABILITY_PLAYLIST |
Playlist
|
MC_ABILITY_CLIENT_CUSTOM |
Custom command from a client
|
MC_ABILITY_SEARCH |
Search
|
MC_ABILITY_SUBTITLES |
Subtitles display
|
MC_ABILITY_360_MODE |
360 content mode display
|
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 display mode.
- Since :
- 5.5
- Enumerator:
MC_DISPLAY_MODE_LETTER_BOX |
Letter box
|
MC_DISPLAY_MODE_ORIGIN_SIZE |
Origin size
|
MC_DISPLAY_MODE_FULL_SCREEN |
Full-screen
|
MC_DISPLAY_MODE_CROPPED_FULL |
Cropped full-screen
|
Enumeration for the display rotation.
- Since :
- 5.5
- Enumerator:
MC_DISPLAY_ROTATION_NONE |
Display is not rotated
|
MC_DISPLAY_ROTATION_90 |
Display is rotated 90 degrees
|
MC_DISPLAY_ROTATION_180 |
Display is rotated 180 degrees
|
MC_DISPLAY_ROTATION_270 |
Display is rotated 270 degrees
|
Enumeration for the media controller error.
- Since :
- 2.4
- 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
|
MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP |
Limited by server application (since 5.5)
|
Enumeration for the media meta info.
- Since :
- 2.4
- 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
|
MC_META_MEDIA_SEASON |
Season (Since 5.5)
|
MC_META_MEDIA_EPISODE |
Episode (Since 5.5)
|
MC_META_MEDIA_RESOLUTION |
Content resolution (Since 5.5)
|
Enumeration for the media playback action.
- Since :
- 4.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 :
- 2.4
- Enumerator:
MC_PLAYBACK_STATE_NONE |
None
|
MC_PLAYBACK_STATE_PLAYING |
Playing
|
MC_PLAYBACK_STATE_PAUSED |
Paused
|
MC_PLAYBACK_STATE_STOPPED |
Stopped
|
MC_PLAYBACK_STATE_MOVING_TO_NEXT |
Moving to the next item (Since 4.0)
|
MC_PLAYBACK_STATE_MOVING_TO_PREVIOUS |
Moving to the previous item (Since 4.0)
|
MC_PLAYBACK_STATE_FAST_FORWARDING |
Fast forwarding (Since 4.0)
|
MC_PLAYBACK_STATE_REWINDING |
Rewinding (Since 4.0)
|
Enumeration for the playlist update mode.
- Since :
- 4.0
- Enumerator:
MC_PLAYLIST_UPDATED |
Create or Update playlist
|
MC_PLAYLIST_REMOVED |
Remove playlist
|
Enumeration for the repeat mode.
- Since :
- 2.4
- 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 4.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 :
- 2.4
- 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 :
- 2.4
- Enumerator:
MC_SHUFFLE_MODE_ON |
Shuffle mode on
|
MC_SHUFFLE_MODE_OFF |
Shuffle mode off
|
Enumeration for the subscription type.
- Since :
- 2.4
- 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 4.0)
|
MC_SUBSCRIPTION_TYPE_PLAYBACK_ABILITY |
Playback ability (Since 5.0)
|
MC_SUBSCRIPTION_TYPE_SHUFFLE_ABILITY |
Shuffle ability (Since 5.0) (Deprecated since 5.5. Use MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT instead)
|
MC_SUBSCRIPTION_TYPE_REPEAT_ABILITY |
Repeat ability (Since 5.0) (Deprecated since 5.5. Use MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT instead)
|
MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT |
Ability support (Since 5.5)
|
MC_SUBSCRIPTION_TYPE_DISPLAY_MODE_ABILITY |
Display mode ability (Since 5.5)
|
MC_SUBSCRIPTION_TYPE_DISPLAY_ROTATION_ABILITY |
Display rotation ability (Since 5.5)
|