HbbTv  17.9.0
Open source HBBTV engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Enumerations | Functions
hbbtv_sif_mediaplayer.h File Reference

System Interface, Media player. More...

#include "techtype.h"
#include "hbbtv_types.h"

Go to the source code of this file.

Data Structures

struct  S_HBBTV_MP_START_PARAMS
 

Enumerations

enum  E_HBBTV_MP_ERROR {
  HBBTV_MP_NO_ERROR = -1, HBBTV_MP_FORMAT_NOT_SUPPORTED = 0, HBBTV_MP_CONNECTION_ERROR, HBBTV_MP_UNDEFINED,
  HBBTV_MP_NO_RESOURCES, HBBTV_MP_CORRUPT, HBBTV_MP_NOT_AVAILABLE, HBBTV_MP_NOT_AVAILABLE_POSITION,
  HBBTV_MP_BLOCKED
}
 

Functions

void * HBBTV_MPInit (U8BIT *source_url)
 Initialises Media Player with the source URL. More...
 
void HBBTV_MPExit (void *ihdl)
 Releases the Media Player and the associated resources. More...
 
E_HBBTV_ERR HBBTV_MPStart (void *ihdl, S_HBBTV_MP_START_PARAMS *params)
 Starts playing file given by HBBTV_MPInit. More...
 
E_HBBTV_ERR HBBTV_MPStop (void *ihdl)
 Stops playing file. More...
 
E_HBBTV_ERR HBBTV_MPPause (void *ihdl)
 Pauses playing of file. More...
 
E_HBBTV_ERR HBBTV_MPResume (void *ihdl)
 Resumes playing of file. More...
 
E_HBBTV_ERR HBBTV_MPResize (void *ihdl, S_HBBTV_RECT *rect)
 Changes position and size of the video presentation window. More...
 
E_HBBTV_ERR HBBTV_MPGetTimes (void *ihdl, U32BIT *begin, U32BIT *current, U32BIT *end)
 Gets the current play position. More...
 
E_HBBTV_ERR HBBTV_MPSeek (void *ihdl, U32BIT position)
 Sets the play position. More...
 
E_HBBTV_ERR HBBTV_MPObtainComponentList (void *ihdl, E_HBBTV_COMPONENT_TYPE type, U32BIT *num_ptr, S_HBBTV_COMPONENT_DETAILS **list_ptr)
 Retrieves the list of available components. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_MPReleaseComponentList to release allocated data on the same task and immediately after it has copied the data. More...
 
void HBBTV_MPReleaseComponentList (void *ihdl, S_HBBTV_COMPONENT_DETAILS *list_ptr)
 Release data allocated by HBBTV_MPObtainComponentList. Always called immediately after the HbbTV engine has copied data. More...
 
E_HBBTV_ERR HBBTV_MPSelectComponent (void *ihdl, S_HBBTV_COMPONENT_DETAILS *component)
 Replaces any component of the same type with the specified one. If the component_tag field is set to -1, the default component for the specified type must be selected. This function can be called before or after the media player has been started. More...
 
E_HBBTV_ERR HBBTV_MPUnselectComponent (void *ihdl, S_HBBTV_COMPONENT_DETAILS *component)
 Stops rendering the specified component. If the component_tag field is set to -1, any component with the specified type must be stopped. More...
 
E_HBBTV_MP_ERROR HBBTV_MPGetError (void *ihdl)
 Retrieves the error code from the media player. The HbbTV engine uses this function to retrieve the error code from the media player and expects it to be available as soon as it receives the ERROR event via HBBTV_MPNotifyState. The HbbTV engine might call HBBTV_MPGetError within HBBTV_MPNotifyState. More...
 

Detailed Description

System Interface, Media player.

Date
January 2014
Author
Sergio Panseri

Function Documentation

void HBBTV_MPExit ( void *  ihdl)

Releases the Media Player and the associated resources.

Parameters
ihdlHandle returned by HBBTV_MPInit
E_HBBTV_MP_ERROR HBBTV_MPGetError ( void *  ihdl)

Retrieves the error code from the media player. The HbbTV engine uses this function to retrieve the error code from the media player and expects it to be available as soon as it receives the ERROR event via HBBTV_MPNotifyState. The HbbTV engine might call HBBTV_MPGetError within HBBTV_MPNotifyState.

Returns
E_HBBTV_MP_ERROR
Parameters
ihdlHandle returned by HBBTV_MPInit
E_HBBTV_ERR HBBTV_MPGetTimes ( void *  ihdl,
U32BIT *  begin,
U32BIT *  current,
U32BIT *  end 
)

Gets the current play position.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
beginPointer to return start position in millisecs (usually zero)
currentPointer to return current position in millisecs
endPointer to return end position in millisecs
void* HBBTV_MPInit ( U8BIT *  source_url)

Initialises Media Player with the source URL.

Returns
Handle
Parameters
source_urlSource url of the file
E_HBBTV_ERR HBBTV_MPObtainComponentList ( void *  ihdl,
E_HBBTV_COMPONENT_TYPE  type,
U32BIT *  num_ptr,
S_HBBTV_COMPONENT_DETAILS **  list_ptr 
)

Retrieves the list of available components. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_MPReleaseComponentList to release allocated data on the same task and immediately after it has copied the data.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
typeRequired component type
num_ptrPointer to number of components (Not NULL)
list_ptrPointer to S_HBBTV_COMPONENT_DETAILS Pointer (Not NULL)
E_HBBTV_ERR HBBTV_MPPause ( void *  ihdl)

Pauses playing of file.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
void HBBTV_MPReleaseComponentList ( void *  ihdl,
S_HBBTV_COMPONENT_DETAILS list_ptr 
)

Release data allocated by HBBTV_MPObtainComponentList. Always called immediately after the HbbTV engine has copied data.

Parameters
ihdlHandle returned by HBBTV_MPInit
list_ptrPointer to S_HBBTV_COMPONENT_DETAILS
E_HBBTV_ERR HBBTV_MPResize ( void *  ihdl,
S_HBBTV_RECT rect 
)

Changes position and size of the video presentation window.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
rectPointer to the rectangle defining the presentation window. Values are HbbTV 1280x720 coordinates.
E_HBBTV_ERR HBBTV_MPResume ( void *  ihdl)

Resumes playing of file.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
E_HBBTV_ERR HBBTV_MPSeek ( void *  ihdl,
U32BIT  position 
)

Sets the play position.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
positionPosition in in millisecs in the clip
E_HBBTV_ERR HBBTV_MPSelectComponent ( void *  ihdl,
S_HBBTV_COMPONENT_DETAILS component 
)

Replaces any component of the same type with the specified one. If the component_tag field is set to -1, the default component for the specified type must be selected. This function can be called before or after the media player has been started.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
componentPointer to the component to be rendered
E_HBBTV_ERR HBBTV_MPStart ( void *  ihdl,
S_HBBTV_MP_START_PARAMS params 
)

Starts playing file given by HBBTV_MPInit.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
paramsStart parameters, see the definition of S_HBBTV_MP_START_PARAMS.
E_HBBTV_ERR HBBTV_MPStop ( void *  ihdl)

Stops playing file.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
E_HBBTV_ERR HBBTV_MPUnselectComponent ( void *  ihdl,
S_HBBTV_COMPONENT_DETAILS component 
)

Stops rendering the specified component. If the component_tag field is set to -1, any component with the specified type must be stopped.

Returns
- HBBTV_OK on success
  • HBBTV_ERR_BAD_PARAMETER
  • HBBTV_ERR_OTHER controlling application specific error
Parameters
ihdlHandle returned by HBBTV_MPInit
componentPointer to the component to be stopped