MLMediaPlayerEventCallbacksEx
Module: Media Player
Callbacks for notifying client about Media Player error events. More...
#include <ml_media_player.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version |
void()(MLHandle media_player, const MLMediaPlayerOnBufferingUpdateInfo update_info) | on_buffering_update This callback function is invoked when buffered contents percentage changed. |
void()(MLHandle media_player, const MLMediaPlayerOnCompletionInfo completion_info) | on_completion This callback is invoked when media player played back until end of media and has now come to a stop. |
void()(MLHandle media_player, const MLMediaPlayerOnErrorInfo error_info) | on_error This callback function is invoked when media player encounters an error. |
void()(MLHandle media_player, const MLMediaPlayerOnInfoInfo info) | on_info This callback function is invoked when Media Player generates informational events. |
void()(MLHandle media_player, const MLMediaPlayerOnPreparedInfo prepared_info) | on_prepared This callback is invoked when the player has finished preparing media and is ready to playback. |
void()(MLHandle media_player, const MLMediaPlayerOnSeekCompleteInfo seek_complete_info) | on_seek_complete This callback function is invoked when a seek operation has completed. |
void()(MLHandle media_player, const MLMediaPlayerOnVideoSizeChangedInfo video_size_info) | on_video_size_changed This callback function is invoked when the internal surface has changed size. |
void()(MLHandle media_player, const MLMediaPlayerOnTrackDRMInfo track_drm_info) | on_track_drm_info This callback function is invoked when source has DRM protected media track(s). |
void()(MLHandle media_player, const MLMediaPlayerOnResetCompleteInfo reset_complete_info) | on_reset_complete This callback function is invoked when an async reset operation has completed. |
void()(MLHandle media_player, const MLMediaPlayerOnFramePackingInfo frame_packing_info) | on_frame_packing This callback function is invoked when a stereoscopic video frame packing change. |
Detailed Description
struct MLMediaPlayerEventCallbacksEx;
Callbacks for notifying client about Media Player error events.
Those are async mechanisms that should not be used in parallel with their sync counterpart, i.e. poll-based queries for the same events using MLMediaPlayerPollStatespoll().
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
Public Attributes Documentation
version
uint32_t version;
on_buffering_update
void(*)(MLHandle media_player, const MLMediaPlayerOnBufferingUpdateInfo *update_info) on_buffering_update;
This callback function is invoked when buffered contents percentage changed.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnBufferingUpdateInfo update_info) | )(MLHandle media_player, const MLMediaPlayerOnBufferingUpdateInfo *update_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
update_info | Pointer to MLMediaPlayerOnBufferingUpdateInfo. |
on_completion
void(*)(MLHandle media_player, const MLMediaPlayerOnCompletionInfo *completion_info) on_completion;
This callback is invoked when media player played back until end of media and has now come to a stop.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnCompletionInfo completion_info) | )(MLHandle media_player, const MLMediaPlayerOnCompletionInfo *completion_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
completion_info | Pointer to MLMediaPlayerOnCompletionInfo. |
Note that this callback does not fire when 'looping = true', because Media Player does not "stop" in that case, but rather loops to beginning of media.
To get notified when EOS is reached (when looping = true), set a proper callback function for the below on_info and look for the #MEDIA_PLAYER_INFO_LOOPING info code.
on_error
void(*)(MLHandle media_player, const MLMediaPlayerOnErrorInfo *error_info) on_error;
This callback function is invoked when media player encounters an error.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnErrorInfo error_info) | )(MLHandle media_player, const MLMediaPlayerOnErrorInfo *error_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
erro_info | Pointer to MLMediaPlayerOnErrorInfo. |
on_info
void(*)(MLHandle media_player, const MLMediaPlayerOnInfoInfo *info) on_info;
This callback function is invoked when Media Player generates informational events.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnInfoInfo info) | )(MLHandle media_player, const MLMediaPlayerOnInfoInfo *info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
info | Pointer to MLMediaPlayerOnInfoInfo. |
on_prepared
void(*)(MLHandle media_player, const MLMediaPlayerOnPreparedInfo *prepared_info) on_prepared;
This callback is invoked when the player has finished preparing media and is ready to playback.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnPreparedInfo prepared_info) | )(MLHandle media_player, const MLMediaPlayerOnPreparedInfo *prepared_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
prepared_info | Pointer to MLMediaPlayerOnPreparedInfo. |
on_seek_complete
void(*)(MLHandle media_player, const MLMediaPlayerOnSeekCompleteInfo *seek_complete_info) on_seek_complete;
This callback function is invoked when a seek operation has completed.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnSeekCompleteInfo seek_complete_info) | )(MLHandle media_player, const MLMediaPlayerOnSeekCompleteInfo *seek_complete_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
seek_complete_info | Pointer to MLMediaPlayerOnSeekCompleteInfo. |
on_video_size_changed
void(*)(MLHandle media_player, const MLMediaPlayerOnVideoSizeChangedInfo *video_size_info) on_video_size_changed;
This callback function is invoked when the internal surface has changed size.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnVideoSizeChangedInfo video_size_info) | )(MLHandle media_player, const MLMediaPlayerOnVideoSizeChangedInfo *video_size_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
video_size_info | Pointer to MLMediaPlayerOnVideoSizeChangedInfo. |
on_track_drm_info
void(*)(MLHandle media_player, const MLMediaPlayerOnTrackDRMInfo *track_drm_info) on_track_drm_info;
This callback function is invoked when source has DRM protected media track(s).
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnTrackDRMInfo track_drm_info) | )(MLHandle media_player, const MLMediaPlayerOnTrackDRMInfo *track_drm_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
track_drm_info | Pointer to MLMediaPlayerOnTrackDRMInfo. |
on_reset_complete
void(*)(MLHandle media_player, const MLMediaPlayerOnResetCompleteInfo *reset_complete_info) on_reset_complete;
This callback function is invoked when an async reset operation has completed.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnResetCompleteInfo reset_complete_info) | )(MLHandle media_player, const MLMediaPlayerOnResetCompleteInfo *reset_complete_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
reset_complete_info | pointer to MLMediaPlayerOnResetCompleteInfo. |
on_frame_packing
void(*)(MLHandle media_player, const MLMediaPlayerOnFramePackingInfo *frame_packing_info) on_frame_packing;
This callback function is invoked when a stereoscopic video frame packing change.
Type | Description |
---|---|
void()(MLHandle media_player, const MLMediaPlayerOnFramePackingInfo frame_packing_info) | )(MLHandle media_player, const MLMediaPlayerOnFramePackingInfo *frame_packing_info) |
Parameters
media_player | MLHandle is a Media Player instance on which callback was set. | |
mode | A MLMediaFramePackingMode. | |
flags | A MLMediaFramePackingFlags. |