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

A/V control object. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "techtype.h"
#include "hbbtv_sif_types.h"
#include "hbbtv_sif_os.h"
#include "hbbtv_sif_mediaplayer.h"
#include "hbbtv_sif_pvr.h"
#include "hbbtv_sif_decoding.h"
#include "hbbtv.h"
#include "hbbtv_js.h"
#include "debug.h"
#include "object.h"
#include "hbbtv_string.h"
#include "hbbtv_internal.h"
#include "collection.h"
#include "avcomponent.h"
#include "oipf_app_mgr.h"
#include "queue.h"

Typedefs

typedef struct s_component_tag_list S_COMPONENT_INFO
 
typedef struct s_av_control S_AV_CONTROL
 
typedef struct s_src_info S_SRC_INFO
 

Enumerations

enum  E_AV_CONTROL_STATE {
  AV_CONTROL_STOPPED = 0, AV_CONTROL_PLAYING, AV_CONTROL_PAUSED, AV_CONTROL_CONNECTING,
  AV_CONTROL_BUFFERING, AV_CONTROL_FINISHED, AV_CONTROL_ERROR
}
 
enum  E_AV_CONTROL_SOURCE { AV_CONTROL_MEDIAPLAYER = 0, AV_CONTROL_PVR, AV_CONTROL_MAX_SOURCE }
 

Functions

void * HBBTV_JSAVControl_createVideoMpeg (void)
 Creation of an AV control object of mime type "video/mpeg". More...
 
void * HBBTV_JSAVControl_createVideoMp4 (void)
 Creation of an AV control object of mime type "video/mp4". More...
 
void * HBBTV_JSAVControl_createAudioMpeg (void)
 Creation of an AV control object of mime type "audio/mpeg". More...
 
void * HBBTV_JSAVControl_createAudioMp4 (void)
 Creation of an AV control object of mime type "audio/mp4". More...
 
void * HBBTV_JSAVControl_getData (void *obj)
 String data [RW], CEA-2014-A Section 5.7.1.f. More...
 
void HBBTV_JSAVControl_setData (void *obj, S_HBBTV_STRING *data)
 String data [RW], CEA-2014-A Section 5.7.1.f. More...
 
U32BIT HBBTV_JSAVControl_getPlayPosition (void *obj)
 Number playPosition [R], CEA-2014-A Section 5.7.1.f. More...
 
U32BIT HBBTV_JSAVControl_getPlayTime (void *obj)
 Number playTime [R], CEA-2014-A Section 5.7.1.f. More...
 
S32BIT HBBTV_JSAVControl_getPlayState (void *obj)
 Number playState [R], CEA-2014-A Section 5.7.1.f. More...
 
S32BIT HBBTV_JSAVControl_getError (void *obj)
 Number error [R], CEA-2014-A Section 5.7.1.f. More...
 
S32BIT HBBTV_JSAVControl_getSpeed (void *obj)
 Number speed [R], CEA-2014-A Section 5.7.1.f. More...
 
S32BIT HBBTV_JSAVControl_getNrTracks (void *obj)
 Number nrTracks [R], CEA-2014-A Section 5.7.1.f. Playlists are not supported, this function returns 1 if the content identified by 'data' has been found and 0 otherwise. More...
 
S32BIT HBBTV_JSAVControl_getCurrentTrackIndex (void *obj)
 Number currentTrackIndex [RW], CEA-2014-A Section 5.7.1.f. Playlists are not supported. More...
 
void HBBTV_JSAVControl_setCurrentTrackIndex (void *obj, S32BIT trackIndex)
 Number currentTrackIndex [RW], CEA-2014-A Section 5.7.1.f. Playlists are not supported. More...
 
BOOLEAN HBBTV_JSAVControl_getPersist (void *obj)
 Boolean persist [RW], CEA-2014-A Section 5.7.1.f. More...
 
void HBBTV_JSAVControl_setPersist (void *obj, BOOLEAN persist)
 Boolean persist [RW], CEA-2014-A Section 5.7.1.f. This function only stores the property value but doesn't perform any action, as persist attribute is not currently supported. More...
 
BOOLEAN HBBTV_JSAVControl_play (void *obj, S32BIT speed)
 Boolean play(Number speed), CEA-2014-A Section 5.7.1.f. More...
 
BOOLEAN HBBTV_JSAVControl_stop (void *obj)
 Boolean stop(), CEA-2014-A Section 5.7.1.f. More...
 
BOOLEAN HBBTV_JSAVControl_seek (void *obj, U32BIT pos)
 Boolean seek(Number pos), CEA-2014-A Section 5.7.1.f. More...
 
BOOLEAN HBBTV_JSAVControl_setVolume (void *obj, S32BIT volume)
 Boolean setVolume(Number volume), CEA-2014-A Section 5.7.1.f. More...
 
BOOLEAN HBBTV_JSAVControl_next (void *obj)
 Boolean next(), CEA-2014-A Section 5.7.1.f. Playlists are not supported, this function returns FALSE. More...
 
BOOLEAN HBBTV_JSAVControl_previous (void *obj)
 Boolean previous(), CEA-2014-A Section 5.7.1.f. Playlists are not supported, this function returns FALSE. More...
 
S32BIT HBBTV_JSAVControl_getWidth (void *obj)
 Integer width, CEA-2014-A Section 5.7.1.g. More...
 
void HBBTV_JSAVControl_setWidth (void *obj, S32BIT width)
 Integer width, CEA-2014-A Section 5.7.1.g. More...
 
S32BIT HBBTV_JSAVControl_getHeight (void *obj)
 Integer height, CEA-2014-A Section 5.7.1.g. More...
 
void HBBTV_JSAVControl_setHeight (void *obj, S32BIT height)
 Integer height, CEA-2014-A Section 5.7.1.g. More...
 
BOOLEAN HBBTV_JSAVControl_getFullScreen (void *obj)
 readonly Boolean fullScreen, CEA-2014-A Section 5.7.1.g More...
 
void HBBTV_JSAVControl_setFullScreen (void *obj, BOOLEAN full_screen)
 void setFullScreen(Boolean fullscreen), CEA-2014-A Section 5.7.1.g More...
 
void HBBTV_JSAVControl_setPosition (void *obj, S32BIT x, S32BIT y)
 Sets the object's position on screen. More...
 
void * HBBTV_JSAVControl_getComponents (void *obj, HBBTV_JSAVComponent_Type component_type)
 AVComponent[] getComponents, Section 7.16.5.1.3. More...
 
void * HBBTV_JSAVControl_getCurrentActiveComponents (void *obj, HBBTV_JSAVComponent_Type component_type)
 AVComponent[] getCurrentActiveComponents, Section 7.16.5.1.3. More...
 
void HBBTV_JSAVControl_selectComponent (void *obj, void *component)
 void selectComponent( AVComponent component ), Section 7.16.5.1.3
 
void HBBTV_JSAVControl_selectComponentType (void *obj, HBBTV_JSAVComponent_Type component_type)
 void selectComponent( Integer componentType ), Section 7.16.5.1.3
 
void HBBTV_JSAVControl_unselectComponent (void *obj, void *component)
 void unselectComponent( AVComponent component ), Section 7.16.5.1.3
 
void HBBTV_JSAVControl_unselectComponentType (void *obj, HBBTV_JSAVComponent_Type comp_type)
 void unselectComponent( Integer componentType ), Section 7.16.5.1.3
 
BOOLEAN HBBTV_JSAVControl_queue (void *obj, S_HBBTV_STRING *url)
 Boolean queue( String url ), TS102796 v1.2.1, Section A.2.5. More...
 
BOOLEAN HBBTV_JSAVControl_setSource (void *obj, S_HBBTV_STRING *id)
 Boolean setSource( String id ), Section 7.14.7. More...
 
void HBBTV_JSAVControl_setLoop (void *obj, S32BIT loop)
 loop, Section 7.14.10.1. This function is used to set the loop parameter value when it's present in the tag of the <object>. Value -1 represents 'infinite'. More...
 
void HBBTV_JSAVControl_setCache (void *obj, BOOLEAN cache)
 boolean cache, Section 7.14.10.1. This function is used to set the cache parameter value when it's present in the tag of the <object>. More...
 
void HBBTV_MPNotifyState (void *ihdl, E_HBBTV_MP_STATE state)
 Notifies the HbbTV engine that the media player state has changed. More...
 
E_HBBTV_ERR HBBTV_NotifyRecordingPlayerState (void *handle, E_HBBTV_RECPLAYER_STATE state)
 Notifies the HbbTV engine that the media player state has changed. More...
 
void HBBTV_AVControlDRMRightsError (S_QUE_DRM_PARAMS *params)
 
void HBBTV_AVControl_show (void)
 
void HBBTV_AVControl_hide (void)
 
void HBBTV_AVControl_initialise (void)
 Performs common intialisations for the A/V control module.
 
void HBBTV_AVControl_terminate (void)
 Releases the resources allocated by av_control_list_mutex.
 

Variables

void * JS_AV_CONTROL_CLASS = &s_vtab
 

Detailed Description

A/V control object.

Date
01/01/2013
Author
Adam Sturtridge

Function Documentation

void* HBBTV_JSAVControl_createAudioMp4 ( void  )

Creation of an AV control object of mime type "audio/mp4".

Note
Creation of an AV control object of mime type "audio/mp4"
void* HBBTV_JSAVControl_createAudioMpeg ( void  )

Creation of an AV control object of mime type "audio/mpeg".

Note
Creation of an AV control object of mime type "audio/mpeg"
void* HBBTV_JSAVControl_createVideoMp4 ( void  )

Creation of an AV control object of mime type "video/mp4".

Note
Creation of an AV control object of mime type "video/mp4"
void* HBBTV_JSAVControl_createVideoMpeg ( void  )

Creation of an AV control object of mime type "video/mpeg".

Note
Creation of an AV control object of mime type "video/mpeg"
void* HBBTV_JSAVControl_getComponents ( void *  obj,
HBBTV_JSAVComponent_Type  component_type 
)

AVComponent[] getComponents, Section 7.16.5.1.3.

Note
AVComponent[] getComponents
DAE Section 7.14.4.1.2
void* HBBTV_JSAVControl_getCurrentActiveComponents ( void *  obj,
HBBTV_JSAVComponent_Type  component_type 
)

AVComponent[] getCurrentActiveComponents, Section 7.16.5.1.3.

Note
AVComponent[] getCurrentActiveComponents
DAE Section 7.14.4.1.2
S32BIT HBBTV_JSAVControl_getCurrentTrackIndex ( void *  obj)

Number currentTrackIndex [RW], CEA-2014-A Section 5.7.1.f. Playlists are not supported.

Note
Number currentTrackIndex [RW]
CEA-2014-A Section 5.7.1.f
void* HBBTV_JSAVControl_getData ( void *  obj)

String data [RW], CEA-2014-A Section 5.7.1.f.

Note
String data [RW]
CEA-2014-A Section 5.7.1.f
S32BIT HBBTV_JSAVControl_getError ( void *  obj)

Number error [R], CEA-2014-A Section 5.7.1.f.

Note
Number error [R]
CEA-2014-A Section 5.7.1.f
BOOLEAN HBBTV_JSAVControl_getFullScreen ( void *  obj)

readonly Boolean fullScreen, CEA-2014-A Section 5.7.1.g

Note
readonly Boolean fullScreen
CEA-2014-A Section 5.7.1.g
S32BIT HBBTV_JSAVControl_getHeight ( void *  obj)

Integer height, CEA-2014-A Section 5.7.1.g.

Note
Integer height
CEA-2014-A Section 5.7.1.g
S32BIT HBBTV_JSAVControl_getNrTracks ( void *  obj)

Number nrTracks [R], CEA-2014-A Section 5.7.1.f. Playlists are not supported, this function returns 1 if the content identified by 'data' has been found and 0 otherwise.

Note
Number nrTracks [R]
CEA-2014-A Section 5.7.1.f
BOOLEAN HBBTV_JSAVControl_getPersist ( void *  obj)

Boolean persist [RW], CEA-2014-A Section 5.7.1.f.

Note
Boolean persist [RW]
CEA-2014-A Section 5.7.1.f
U32BIT HBBTV_JSAVControl_getPlayPosition ( void *  obj)

Number playPosition [R], CEA-2014-A Section 5.7.1.f.

Note
Number playPosition [R]
CEA-2014-A Section 5.7.1.f
S32BIT HBBTV_JSAVControl_getPlayState ( void *  obj)

Number playState [R], CEA-2014-A Section 5.7.1.f.

Note
Number playState [R]
CEA-2014-A Section 5.7.1.f
U32BIT HBBTV_JSAVControl_getPlayTime ( void *  obj)

Number playTime [R], CEA-2014-A Section 5.7.1.f.

Note
Number playTime [R]
CEA-2014-A Section 5.7.1.f
S32BIT HBBTV_JSAVControl_getSpeed ( void *  obj)

Number speed [R], CEA-2014-A Section 5.7.1.f.

Note
Number speed [R]
CEA-2014-A Section 5.7.1.f
S32BIT HBBTV_JSAVControl_getWidth ( void *  obj)

Integer width, CEA-2014-A Section 5.7.1.g.

Note
Integer width
CEA-2014-A Section 5.7.1.g
BOOLEAN HBBTV_JSAVControl_next ( void *  obj)

Boolean next(), CEA-2014-A Section 5.7.1.f. Playlists are not supported, this function returns FALSE.

Note
Boolean next()
CEA-2014-A Section 5.7.1.f
BOOLEAN HBBTV_JSAVControl_play ( void *  obj,
S32BIT  speed 
)

Boolean play(Number speed), CEA-2014-A Section 5.7.1.f.

Note
Boolean play(Number speed)
CEA-2014-A Section 5.7.1.f
BOOLEAN HBBTV_JSAVControl_previous ( void *  obj)

Boolean previous(), CEA-2014-A Section 5.7.1.f. Playlists are not supported, this function returns FALSE.

Note
Boolean previous()
CEA-2014-A Section 5.7.1.f
BOOLEAN HBBTV_JSAVControl_queue ( void *  obj,
S_HBBTV_STRING url 
)

Boolean queue( String url ), TS102796 v1.2.1, Section A.2.5.

Note
Boolean queue( String url )
TS102796 v1.2.1, Section A.2.5
BOOLEAN HBBTV_JSAVControl_seek ( void *  obj,
U32BIT  pos 
)

Boolean seek(Number pos), CEA-2014-A Section 5.7.1.f.

Note
Boolean seek(Number pos)
CEA-2014-A Section 5.7.1.f
void HBBTV_JSAVControl_setCache ( void *  obj,
BOOLEAN  cache 
)

boolean cache, Section 7.14.10.1. This function is used to set the cache parameter value when it's present in the tag of the <object>.

Note
Sets the cache paramenter as present in the elements of an A/V control object
Section DAE 7.14.10.1
void HBBTV_JSAVControl_setCurrentTrackIndex ( void *  obj,
S32BIT  trackIndex 
)

Number currentTrackIndex [RW], CEA-2014-A Section 5.7.1.f. Playlists are not supported.

Note
Number currentTrackIndex [RW]
CEA-2014-A Section 5.7.1.f
void HBBTV_JSAVControl_setData ( void *  obj,
S_HBBTV_STRING data 
)

String data [RW], CEA-2014-A Section 5.7.1.f.

Note
String data [RW]
CEA-2014-A Section 5.7.1.f
void HBBTV_JSAVControl_setFullScreen ( void *  obj,
BOOLEAN  full_screen 
)

void setFullScreen(Boolean fullscreen), CEA-2014-A Section 5.7.1.g

Note
void setFullScreen(Boolean fullscreen)
CEA-2014-A Section 5.7.1.g
void HBBTV_JSAVControl_setHeight ( void *  obj,
S32BIT  height 
)

Integer height, CEA-2014-A Section 5.7.1.g.

Note
Integer height
CEA-2014-A Section 5.7.1.g
void HBBTV_JSAVControl_setLoop ( void *  obj,
S32BIT  loop 
)

loop, Section 7.14.10.1. This function is used to set the loop parameter value when it's present in the tag of the <object>. Value -1 represents 'infinite'.

Note
Sets the loop paramenter as present in the elements of an A/V control object
Section DAE 7.14.10.1
void HBBTV_JSAVControl_setPersist ( void *  obj,
BOOLEAN  persist 
)

Boolean persist [RW], CEA-2014-A Section 5.7.1.f. This function only stores the property value but doesn't perform any action, as persist attribute is not currently supported.

Note
Boolean persist [RW]
CEA-2014-A Section 5.7.1.f
void HBBTV_JSAVControl_setPosition ( void *  obj,
S32BIT  x,
S32BIT  y 
)

Sets the object's position on screen.

Note
sets the object's horizontal position on screen.
x is the number of pixels from the screen's left margin.
BOOLEAN HBBTV_JSAVControl_setSource ( void *  obj,
S_HBBTV_STRING id 
)

Boolean setSource( String id ), Section 7.14.7.

Note
Boolean setSource( String id )
7.14.7
BOOLEAN HBBTV_JSAVControl_setVolume ( void *  obj,
S32BIT  volume 
)

Boolean setVolume(Number volume), CEA-2014-A Section 5.7.1.f.

Note
Boolean setVolume(Number volume)
CEA-2014-A Section 5.7.1.f
void HBBTV_JSAVControl_setWidth ( void *  obj,
S32BIT  width 
)

Integer width, CEA-2014-A Section 5.7.1.g.

Note
Integer width
CEA-2014-A Section 5.7.1.g
BOOLEAN HBBTV_JSAVControl_stop ( void *  obj)

Boolean stop(), CEA-2014-A Section 5.7.1.f.

Note
Boolean stop()
CEA-2014-A Section 5.7.1.f
void HBBTV_MPNotifyState ( void *  ihdl,
E_HBBTV_MP_STATE  state 
)

Notifies the HbbTV engine that the media player state has changed.

Parameters
ihdlHandle returned by HBBTV_MPInit
stateNew state
E_HBBTV_ERR HBBTV_NotifyRecordingPlayerState ( void *  ihdl,
E_HBBTV_RECPLAYER_STATE  state 
)

Notifies the HbbTV engine that the media player state has changed.

Returns
E_HBBTV_ERR
Parameters
ihdlHandle returned by HBBTV_PVRPlayInit
stateNew state