A class which manages the various media and playback states of the CYIAbstractVideoPlayer.
This class is responsible for managing the current state of the CYIAbstractVideoPlayer. Implementers of concrete CYIAbstractVideoPlayer classes must notify the CYIVideoPlayerStateManager of state transitions when they occur in the concrete player. It is expected that these transitions will be made in response to notifications from the underlying player. These state transitions follow a strict ordering. Failure to follow the specified state ordering will result in an assertion in a debug build and the CYIAbstractVideoPlayer being sent into an error state in a release build.
The CYIVideoPlayerStateManager maintains six states which are separated into two categories, CYIAbstractVideoPlayer::MEDIA_STATE and CYIAbstractVideoPlayer::PLAYBACK_STATE. The state diagram is displayed below:
The CYIAbstractVideoPlayer::MEDIA_STATE represents the state of the video media loaded in the player. There are three states in CYIAbstractVideoPlayer::MEDIA_STATE. These are:
The CYIAbstractVideoPlayer::PLAYBACK_STATE represents the state of media playback in the player. There are three states in the CYIAbstractVideoPlayer::PLAYBACK_STATE. These are:
#include <player/YiVideoPlayerStateManager.h>

| CYIVideoPlayerStateManager::CYIVideoPlayerStateManager | ( | CYIAbstractVideoPlayer * | pPlayer | ) |
|
virtual |
| CYIAbstractVideoPlayer::PlayerState CYIVideoPlayerStateManager::GetPlayerState | ( | ) | const |
Returns the current player state.
| void CYIVideoPlayerStateManager::TransitionToMediaPreparing | ( | ) |
Transitions the player into the CYIAbstractVideoPlayer::MEDIA_PREPARING state.
| void CYIVideoPlayerStateManager::TransitionToMediaReady | ( | ) |
Transitions the player into the CYIAbstractVideoPlayer::MEDIA_READY state.
| void CYIVideoPlayerStateManager::TransitionToMediaUnloaded | ( | ) |
Transitions the player into the CYIAbstractVideoPlayer::MEDIA_UNLOADED state.
| void CYIVideoPlayerStateManager::TransitionToPlaybackBuffering | ( | ) |
Transitions the player into the CYIAbstractVideoPlayer::PLAYBACK_BUFFERING state.
| void CYIVideoPlayerStateManager::TransitionToPlaybackPaused | ( | ) |
Transitions the player into the CYIAbstractVideoPlayer::PLAYBACK_PAUSED state.
| void CYIVideoPlayerStateManager::TransitionToPlaybackPlaying | ( | ) |
Transitions the player into the CYIAbstractVideoPlayer::PLAYBACK_PLAYING state.