|
DVBCore
1.0
Open source DVB engine
|
Media player API. More...
Go to the source code of this file.
Data Structures | |
| struct | S_STB_MP_COMPONENT_DETAILS |
| struct | S_STB_MP_START_PARAMS |
Typedefs | |
| typedef void(* | STB_MP_CALLBACK )(void *handle, E_STB_MP_STATE state) |
Enumerations | |
| enum | E_STB_MP_STATE { STB_MP_STATE_STOPPED = 0, STB_MP_STATE_PLAYING, STB_MP_STATE_PAUSED, STB_MP_STATE_CONNECTING, STB_MP_STATE_BUFFERING, STB_MP_STATE_FINISHED, STB_MP_STATE_ERROR } |
| enum | E_STB_MP_COMPONENT_TYPE { STB_MP_COMPONENT_VIDEO = 0, STB_MP_COMPONENT_AUDIO, STB_MP_COMPONENT_SUBTITLE, STB_MP_COMPONENT_ALL } |
| enum | E_STB_MP_ERROR { STB_MP_NO_ERROR = -1, STB_MP_FORMAT_NOT_SUPPORTED = 0, STB_MP_CONNECTION_ERROR, STB_MP_UNDEFINED, STB_MP_NO_RESOURCES, STB_MP_CORRUPT, STB_MP_NOT_AVAILABLE, STB_MP_NOT_AVAILABLE_POSITION, STB_MP_BLOCKED } |
Functions | |
| void * | STB_MPInit (U8BIT *source_url) |
| Initialises the media player module for the specified source. | |
| E_HW_STATUS | STB_MPStart (void *handle, S_STB_MP_START_PARAMS *params) |
| Starts the presentation of content. | |
| E_HW_STATUS | STB_MPPause (void *handle) |
| Pauses the presentation of content. | |
| E_HW_STATUS | STB_MPResume (void *handle) |
| Resumes the presentation of content. | |
| E_HW_STATUS | STB_MPResize (void *handle, S_RECTANGLE *rect) |
| Changes position of video on screen. | |
| E_HW_STATUS | STB_MPStop (void *handle) |
| Stops the presentation of content. | |
| void | STB_MPExit (void *handle) |
| Uninitialises the media player module and invalidate the handle. | |
| E_HW_STATUS | STB_MPGetTimes (void *handle, U32BIT *begin, U32BIT *current, U32BIT *end) |
| Returns start, current and end times in milliseconds for the content currently being presented. | |
| void | STB_MPRegisterCallback (void *handle, STB_MP_CALLBACK callback) |
| Registers a callback to receive notifications of media player change of state. | |
| E_HW_STATUS | STB_MPSeek (void *handle, U32BIT position) |
| Seeks the currently presented content to the specified position. | |
| E_HW_STATUS | STB_MPObtainComponentList (void *handle, E_STB_MP_COMPONENT_TYPE type, U32BIT *num_ptr, S_STB_MP_COMPONENT_DETAILS **list_ptr) |
| Returns a list of components of the specified type available in the currently presented content. | |
| void | STB_MPReleaseComponentList (void *handle, S_STB_MP_COMPONENT_DETAILS *list_ptr) |
| Releases the list of components returned by STB_MPObtainComponentList. | |
| E_HW_STATUS | STB_MPSelectComponent (void *handle, S_STB_MP_COMPONENT_DETAILS *component) |
| Forces the specifed component to be presented, if another component of the same type is already presented, it will be removed. | |
| E_HW_STATUS | STB_MPUnselectComponent (void *handle, S_STB_MP_COMPONENT_DETAILS *component) |
| Forces the specified component to be stopped. | |
| E_STB_MP_ERROR | STB_MPGetError (void *handle) |
| Returns the actual value of the error when the media player status is STB_MP_STATE_ERROR. | |
Media player API.
| void STB_MPExit | ( | void * | handle | ) |
Uninitialises the media player module and invalidate the handle.
| handle | media player handle |
| E_STB_MP_ERROR STB_MPGetError | ( | void * | handle | ) |
Returns the actual value of the error when the media player status is STB_MP_STATE_ERROR.
| E_HW_STATUS STB_MPGetTimes | ( | void * | handle, |
| U32BIT * | begin, | ||
| U32BIT * | current, | ||
| U32BIT * | end | ||
| ) |
Returns start, current and end times in milliseconds for the content currently being presented.
| handle | media player handle |
| begin | pointer to the variable where the begin time is stored. The value returned for the begin time depend on the platform implementation and might not be always 0. |
| current | pointer to the variable where the current time is stored. |
| end | pointer to the variable where the end time is stored |
| void* STB_MPInit | ( | U8BIT * | source_url | ) |
Initialises the media player module for the specified source.
| source_url | source URL to be presented |
| E_HW_STATUS STB_MPObtainComponentList | ( | void * | handle, |
| E_STB_MP_COMPONENT_TYPE | type, | ||
| U32BIT * | num_ptr, | ||
| S_STB_MP_COMPONENT_DETAILS ** | list_ptr | ||
| ) |
Returns a list of components of the specified type available in the currently presented content.
| handle | media player handle |
| type | type of component or STB_MP_COMPONENT_ALL to receive all of them |
| num_ptr | pointer to the number of components found |
| list_ptr | pointer to the list, must be freed using STB_MPReleaseComponentList |
| E_HW_STATUS STB_MPPause | ( | void * | handle | ) |
Pauses the presentation of content.
| handle | media player handle |
| void STB_MPRegisterCallback | ( | void * | handle, |
| STB_MP_CALLBACK | callback | ||
| ) |
Registers a callback to receive notifications of media player change of state.
| handle | media player handle |
| callback | pointer to the callback function |
| void STB_MPReleaseComponentList | ( | void * | handle, |
| S_STB_MP_COMPONENT_DETAILS * | list_ptr | ||
| ) |
Releases the list of components returned by STB_MPObtainComponentList.
| handle | media player handle |
| list_ptr | list to be freed |
| E_HW_STATUS STB_MPResize | ( | void * | handle, |
| S_RECTANGLE * | rect | ||
| ) |
Changes position of video on screen.
| handle | media player handle |
| rect | rectangle structure representing the expected position of video |
| E_HW_STATUS STB_MPResume | ( | void * | handle | ) |
Resumes the presentation of content.
| handle | media player handle |
| E_HW_STATUS STB_MPSeek | ( | void * | handle, |
| U32BIT | position | ||
| ) |
Seeks the currently presented content to the specified position.
| handle | media player handle |
| position | position in milliseconds |
| E_HW_STATUS STB_MPSelectComponent | ( | void * | handle, |
| S_STB_MP_COMPONENT_DETAILS * | component | ||
| ) |
Forces the specifed component to be presented, if another component of the same type is already presented, it will be removed.
| handle | media player handle |
| component | pointer to the componente to be presented, this must be one of the elements of the component list retured by STB_MPObtainComponentList. |
| E_HW_STATUS STB_MPStart | ( | void * | handle, |
| S_STB_MP_START_PARAMS * | params | ||
| ) |
Starts the presentation of content.
| handle | media player handle |
| params | parameters to control the display |
| E_HW_STATUS STB_MPStop | ( | void * | handle | ) |
Stops the presentation of content.
| handle | media player handle |
| E_HW_STATUS STB_MPUnselectComponent | ( | void * | handle, |
| S_STB_MP_COMPONENT_DETAILS * | component | ||
| ) |
Forces the specified component to be stopped.
| handle | media player handle |
| component | pointer to the componente to be presented, this must be one of the elements of the component list retured by STB_MPObtainComponentList. |