Tizen Native API  4.0
Media Controller

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 Documentation

typedef void* mc_client_h

The structure type for the media client handle.

Since :
2.4
typedef void* mc_metadata_h

The structure type for the media controller metadata handle.

Since :
2.4
typedef void* mc_playback_h

The structure type for the media controller playback handle.

Since :
2.4
typedef void* mc_playlist_h

The structure type for the media controller playlist handle.

Since :
4.0
typedef void* mc_server_h

The structure type for the media server handle.

Since :
2.4

Enumeration Type Documentation

enum mc_error_e

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

enum mc_meta_e

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

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_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 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 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)