machblue_tv_defines.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:44k
- /*-----------------------------------------------------------------------------
- | @(#) machblue_tv_defines.h
- |
- | JSWF: The Portable SWF Engine For Embedded Devices,
- | Copyright (c) 2002-2006, BlueStreak Technology Inc., All Rights Reserved.
- |
- +----------------------------------------------------------------------------*/
- #ifndef _MACHBLUE_TV_DEFINES_H_
- #define _MACHBLUE_TV_DEFINES_H_
- /*----------------------------------------------------------
- | Include definition below this line
- +----------------------------------------------------------*/
- #include "machblue_tv_customer.h"
- #include "machblue_defines.h"
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
- /*----------------------------------------------------------
- | Macro definition below this line
- +----------------------------------------------------------*/
- /** Machblue TV ALL Service List ID */
- #define MB_TV_SVL_ALL_ID 0
- /** Machblue TV status argument (mb_error_t).
- * @see MB_TV_NR_SERVICE_LISTS_GET
- * @see mb_error_t
- */
- #define MB_TV_STATUS_ARG(args) ((args)->arg[0].l)
- /** Machblue TV list of service lists argument (mb_tv_service_list_t *).
- * @see MB_TV_NR_SERVICE_LISTS_GET
- * @see mb_tv_service_list_t
- */
- #define MB_TV_SVL_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV service list argument (mb_tv_service_list_t).
- * @see MB_TV_NR_SVL_CHANGED
- * @see mb_tv_service_list_t
- */
- #define MB_TV_SVL_ARG(args) ((args)->arg[1].l)
- /** Machblue TV list of services argument (mb_tv_service_t *).
- * @see MB_TV_NR_SERVICES_GET
- * @see mb_tv_service_t
- */
- #define MB_TV_SERVICE_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV service pointer argument (mb_tv_service_t *).
- * @see MB_TV_NR_SERVICE_GET_FROM_URL
- * @see mb_tv_service_t
- */
- #define MB_TV_SERVICE_PTR_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV service argument (mb_tv_service_t).
- * @see MB_TV_NR_CURRENT_EVENT_CHANGED
- * @see mb_tv_service_t
- */
- #define MB_TV_SERVICE_ARG(args) ((args)->arg[0].l)
- /** Machblue TV event argument (mb_tv_event_t).
- * @see MB_TV_NR_SERVICE_CURRENT_EVENT_GET
- * @see mb_tv_event_t
- */
- #define MB_TV_EVENT_ARG(args) ((args)->arg[1].l)
- /** Machblue TV event schedule argument (mb_tv_event_schedule_t).
- * @see MB_TV_NR_SERVICE_EVENT_SCHEDULE_GET
- * @see mb_tv_event_schedule_t
- */
- #define MB_TV_EVS_ARG(args) ((args)->arg[1].l)
- /** Machblue list of events argument (mb_tv_event_t *).
- * @see TV MB_TV_NR_EVS_EVENTS_GET
- * @see mb_tv_event_t
- */
- #define MB_TV_EVENT_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV list of service contexts argument (mb_tv_service_context_t *).
- * @see MB_TV_NR_SERVICE_CONTEXTS_GET
- * @see mb_tv_service_context_t
- */
- #define MB_TV_SVC_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV list of stream info argument (mb_tv_stream_info_t *).
- * @see MB_TV_NR_STREAMS_INFO_GET
- * @see mb_tv_stream_info_t
- */
- #define MB_TV_STREAM_INFO_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV command argument (mb_tv_trick_play_cmd_t)
- * @see MB_TV_NR_TRICK_PLAY
- * @see mb_tv_trick_play_cmd_t
- */
- #define MB_TV_TRICK_PLAY_CMD_ARG(args) ((args)->arg[1].l)
- /** Machblue TV command parameter argument (long)
- * @see MB_TV_NR_TRICK_PLAY
- */
- #define MB_TV_TRICK_PLAY_PARAM_ARG(args) ((args)->arg[2].l)
- /** Machblue TV list of recordings argument (mb_tv_recording_t).
- * @see MB_TV_NR_RECORDINGS_GET
- * @see mb_tv_recording_t
- */
- #define MB_TV_RECORDING_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV recording argument (mb_tv_recording_t).
- * @see MB_TV_NR_EVENT_RECORD
- * @see mb_tv_recording_t
- */
- #define MB_TV_RECORDING_PTR_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV recording argument (mb_tv_recording_t).
- * @see MB_TV_NR_RECORDING_CHANGED
- * @see mb_tv_recording_t
- */
- #define MB_TV_RECORDING_ARG(args) ((args)->arg[0].l)
- /** Machblue TV service context argument (mb_tv_service_context_t).
- * @see MB_TV_NR_SERVICE_SELECTED
- * @see mb_tv_service_context_t
- */
- #define MB_TV_SERVICE_CONTEXT_ARG(args) ((args)->arg[0].vp)
- /** Machblue TV service argument (mb_tv_service_t).
- * @see MB_TV_NR_SERVICE_SELECTED
- * @see mb_tv_service_t
- */
- #define MB_TV_SELECTED_SERVICE_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV service error argument (long int, manufacturer specific).
- * @see MB_TV_NR_SERVICE_ERROR
- */
- #define MB_TV_SERVICE_ERROR_ARG(args) ((args)->arg[2].l)
- /** Machblue TV stream controller argument (mb_tv_stream_controller_t).
- * @see MB_TV_NR_STREAM_ENABLED
- * @see mb_tv_stream_controller_t
- */
- #define MB_TV_STREAM_CONTROLLER_ARG(args) ((args)->arg[0].vp)
- /** Machblue TV stream type argument (mb_tv_stream_type_t).
- * @see MB_TV_NR_STREAM_ENABLED
- * @see mb_tv_stream_type_t
- */
- #define MB_TV_STREAM_TYPE_ARG(args) ((args)->arg[1].l)
- /** Machblue TV stream error argument (long int, manufacturer specific).
- * @see MB_TV_NR_STREAM_ERROR
- */
- #define MB_TV_STREAM_ERROR_ARG(args) ((args)->arg[2].l)
- /** Machblue TV source id argument (int).
- * @see MB_TV_NR_SIGNAL_LOST
- */
- #define MB_TV_SOURCE_ID_ARG(args) ((args)->arg[1].l)
- /** Machblue TV conflict argument (mb_tv_conflict_t).
- * @see MB_TV_NR_RECORDER_CONFLICT
- * @see mb_tv_conflict_t
- */
- #define MB_TV_CONFLICT_ARG(args) ((args)->arg[0].vp)
- /** Machblue TV conflict recording list argument (mb_tv_recording_t *).
- * @see MB_TV_NR_RECORDER_CONFLICT
- * @see mb_tv_recording_t
- */
- #define MB_TV_CONFLICT_RECORDING_LIST_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV conditional access error argument (long int, manufacturer specific).
- * @see MB_TV_NR_CA_ERROR (long)
- */
- #define MB_TV_CA_ERROR_ARG(args) ((args)->arg[1].l)
- /** Machblue TV vod session handle argument (mb_tv_vod_session_t).
- * @see MB_TV_NR_VOD_SESSION_CONNECTED
- * @see mb_tv_vod_session_t
- */
- #define MB_TV_VOD_SESSION_ARG(args) ((args)->arg[0].l)
- /** Machblue TV vod session error argument (long int, manufacturer specific).
- * @see MB_TV_NR_VOD_SESSION_ERROR
- */
- #define MB_TV_VOD_SESSION_ERROR_ARG(args) ((args)->arg[1].l)
- /** Machblue TV playback position value argument in nano-seconds (mb_system_time_t *).
- * @see MB_TV_NR_PLAYBACK_POSITION_NOTIFY
- * @see mb_system_time_t
- */
- #define MB_TV_PB_POSITION_VALUE_ARG(args) ((args)->arg[1].vp)
- /** Machblue TV playback buffer side argument (mb_tv_playback_side_t).
- * @see MB_TV_NR_PLAYBACK_END_REACHED
- * @see mb_tv_playback_side_t
- */
- #define MB_TV_PB_BUFFER_SIDE_ARG(args) ((args)->arg[1].l)
- /** Machblue TV language argument (mb_char_t)
- * @see MB_TV_NR_LANGUAGE_CHANGED
- * @see mb_char_t
- */
- #define MB_TV_LANGUAGE_ARG(args) ((args)->arg[0].vp)
- /** Machblue TV pin validation type argument (mb_tv_pin_type_t).
- * @see MB_TV_NR_PIN_VALIDATION_STATUS
- * @see mb_tv_pin_type_t
- */
- #define MB_TV_PIN_VALIDATION_TYPE_ARG(args) ((args)->arg[1].l)
- /** Machblue TV asset purchase id argument (mb_char_t).
- * @see MB_TV_NR_ASSET_PURCHASE_STATUS
- * @see mb_char_t
- */
- #define MB_TV_ASSET_PURCHASE_ID_ARG(args) ((args)->arg[1].vp)
- /*----------------------------------------------------------
- | Type definition below this line
- +----------------------------------------------------------*/
- /** Machblue TV notification reasons */
- typedef enum {
- MB_TV_NR_SVL_LIST_CHANGED = 0, /**< machblue tv list of service lists changed notify reason. This message is
- generated asynchronously whenever the system's list of service lists
- changes. */
- MB_TV_NR_SERVICE_LISTS_GET, /**< machblue tv service lists get notify reason. This message is
- generated in response to an mb_tv_service_lists_get() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_SVL_LIST_ARG(args) = user provided pointer to the list of
- service lists requested. */
- MB_TV_NR_SVL_CHANGED, /**< machblue tv service list changed notify reason. This message is
- generated asynchronously whenever a service list object changes.
- @li MB_TV_SVL_ARG(args) = service list object that changed. */
- MB_TV_NR_SERVICES_GET, /**< machblue tv services get notify reason. This message is
- generated in response to an mb_tv_services_get() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_SERVICE_LIST_ARG(args) = user provided pointer to the list of
- service objects requested. */
- MB_TV_NR_SERVICE_GET_FROM_URL, /**< machblue tv service get from url notify reason. This message is
- generated in response to an mb_tv_service_get_from_url() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_SERVICE_PTR_ARG(args) = user provided pointer to service object
- requested */
-
- MB_TV_NR_CURRENT_EVENT_CHANGED, /**< machblue tv current event changed notify reason. This message is
- generated asynchronously whenever the current event of a service
- object changes.
- @li MB_TV_SERVICE_ARG(args) = service object being notified. */
- MB_TV_NR_SERVICE_CURRENT_EVENT_GET, /**< machblue tv service current event get notify reason.
- This message is generated in response to an
- mb_tv_service_current_event_get() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_EVENT_ARG(args) = user provided pointer to current event
- objects requested.*/
- MB_TV_NR_SERVICE_FOLLOWING_EVENT_GET, /**< machblue tv service following event get notify reason.
- This message is generated in response to an
- mb_tv_service_foollowing_event_get() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_EVENT_ARG(args) = user provided pointer to following event
- object requested. */
- MB_TV_NR_SERVICE_EVENT_SCHEDULE_GET, /**< machblue tv service event schedule get notify reason.
- This message is generated in response to an
- mb_tv_service_event_schedule_get() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_EVS_ARG(args) = user provided pointer to event schedule
- object requested.*/
- MB_TV_NR_EVS_CHANGED, /**< machblue tv event schedule changed notify reason.
- This message is generated asynchronously whenever an event schedule
- object changes.
- @li MB_TV_SERVICE_ARG(args) = service object being notified.
- @li MB_TV_EVS_ARG(args) = event schedule object that changed. */
- MB_TV_NR_EVS_EVENTS_GET, /**< machblue tv service event schedule events get notify reason.
- This message is generated in response to an mb_tv_evs_events_get()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_EVENT_LIST_ARG(args) = user provided pointer to list of event
- objects requested.*/
- MB_TV_NR_SVC_LIST_CHANGED, /**< machblue tv list of service context changed notify reason. This message is
- generated asynchronously whenever the system's list of service contexts
- changes. */
- MB_TV_NR_SERVICE_CONTEXTS_GET, /**< machblue tv service contexts get notify reason.
- This message is generated in response to an mb_tv_service_contexts_get()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_SVC_LIST_ARG(args) = user provided pointer to list of service
- contexts objects requested.*/
- MB_TV_NR_STREAM_LIST_CHANGED, /**< machblue tv list of streams changed notify reason. This message is
- generated asynchronously whenever a stream controller's list of
- streams changes.
- @li MB_TV_STREAM_CONTROLLER_ARG(args) = stream controller being notified */
- MB_TV_NR_STREAMS_INFO_GET, /**< machblue tv streams info get notify reason.
- This message is generated in response to an mb_tv_stc_streams_info_get()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_STREAM_INFO_LIST_ARG(args) = user provided pointer to list of
- stream info structures requested.*/
- MB_TV_NR_TRICK_PLAY, /**< machblue tv trick play notify reason.
- This message is generated in response to an mb_tv_stc_trick_play()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_TRICK_PLAY_CMD_ARG(args) = trick play command requested.
- @li MB_TV_TRICK_PLAY_PARAM_ARG(args) = trick play command parameters as
- modified by the hardware based on what the
- hardware supports. */
- MB_TV_NR_RECORDING_LIST_CHANGED, /**< machblue tv recording list changed notify reason.
- This message is generated asynchronously whenever the system's
- list of recordings changes. */
- MB_TV_NR_RECORDINGS_GET, /**< machblue tv recordings get notify reason.
- This message is generated in response to an mb_tv_recordings_get()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_RECORDING_LIST_ARG(args) = user provided pointer to list of
- recordings requested. */
- MB_TV_NR_EVENT_RECORD, /**< machblue tv event record notify reason.
- This message is generated in response to an mb_tv_event_record()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_RECORDING_PTR_ARG(args) = user provided recording pointer argument. */
- MB_TV_NR_SERVICE_RECORD, /**< machblue tv service record notify reason.
- This message is generated in response to an mb_tv_service_record()
- request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the request succeeded,
- MB_FAILURE otherwise.
- @li MB_TV_RECORDING_PTR_ARG(args) = user provided recording pointer argument. */
- MB_TV_NR_RECORDING_CHANGED, /**< machblue tv recording changed notify reason.
- This message is generated asynchronously whenever a recording's state
- changes.
- @li MB_TV_RECORDING_ARG(args) = recording object being notified. */
- MB_TV_NR_SERVICE_SELECTED, /**< machblue tv service selected nofify reason. This message is generated
- in response to an mb_tv_sc_service_select() request.
- @li MB_TV_SERVICE_CONTEXT_ARG(args) = service context being notified
- @li MB_TV_SELECTED_SERVICE_ARG(args) = handle of the service selected */
- MB_TV_NR_SERVICE_ERROR, /**< machblue tv service error nofify reason. This message is generated in
- response to mb_tv_sc_service_select() request.
- @li MB_TV_SERVICE_CONTEXT_ARG(args) = service context being notified
- @li MB_TV_SELECT_SERVICE_ARG(args) = handle of the service selected
- @li MB_TV_SERVICE_ERROR_ARG(args) = manufacturer specific service error code */
- MB_TV_NR_STREAM_ENABLED, /**< machblue tv stream enabled nofify reason. This message is generated in
- response to an mb_tv_sc_stream_enable() request.
- @li MB_TV_STREAM_CONTROLLER_ARG(args) = stream controller being notified
- @li MB_TV_STREAM_TYPE_ARG(args) = type of stream being notified
- (MB_TV_STREAM_TYPE_AUDIO, etc.) */
- MB_TV_NR_STREAM_DISABLED, /**< machblue tv stream disabled nofify reason. This message is generated in
- response to an mb_tv_sc_stream_disable() request.
- @li MB_TV_STREAM_CONTROLLER_ARG(args) = stream controller being notified
- @li MB_TV_STREAM_TYPE_ARG(args) = type of stream being notified
- (MB_TV_STREAM_TYPE_AUDIO, etc.) */
- MB_TV_NR_STREAM_ERROR, /**< machblue tv stream disabled nofify reason. This message is generated in
- response to an mb_tv_sc_stream_enable() or mb_tv_sc_stream_disable request().
- @li MB_TV_STREAM_CONTROLLER_ARG(args) = stream controller being notified
- @li MB_TV_STREAM_TYPE_ARG(args) = type of stream being notified
- (MB_TV_STREAM_TYPE_AUDIO, etc.)
- @li MB_TV_STREAM_ERROR_ARG(args) = manufacturer specific stream error code. */
- MB_TV_NR_SIGNAL_LOST, /**< machblue tv signal lost nofify reason. This message is generated asynchronously
- whenever a source has lost its signal.
- @li MB_TV_SERVICE_CONTEXT_ARG(args) = service context being notified if any, 0
- otherwise.
- @li MB_TV_SOURCE_ID_ARG(args) = id of the source that lost signal */
- MB_TV_NR_SIGNAL_RECOVERED, /**< machblue tv signal recovered nofify reason. This message is generated in
- generated asynchronously whenever a source has recovered its signal.
- @li MB_TV_SERVICE_CONTEXT_ARG(args) = service context being notified if any, 0
- otherwise.
- @li MB_TV_SOURCE_ID_ARG(args) = id of the source that lost signal */
- MB_TV_NR_RECORDER_CONFLICT, /**< machblue tv recording conflict nofify reason. This message is generated
- whenever a recoder conflict is detected.
- @li MB_TV_CONFLICT_ARG(args) = recording conflict unique identifier
- @li MB_TV_CONFLICT_RECORDING_LIST_ARG(args) = MB_TV_INVALID_RECORDING terminated
- list of conflicting recordings */
- MB_TV_NR_CA_ERROR, /**< machblue tv conditional access error nofify reason. This message is generated
- by the manufacturer's condtional access system in case of error (stream
- playback error)
- @li MB_TV_SERVICE_CONTEXT_ARG(args) = service context being notified
- @li MB_TV_CA_ERROR_ARG(args) = conditional access error code */
- MB_TV_NR_VOD_SESSION_CONNECTED, /**< machblue tv vod session connected nofify reason. This message is
- generated in response to an mb_tv_vod_session_setup() request.
- @li MB_TV_VOD_SESSION_POINTER_ARG(args) = user provided pointer to handle
- of the vod session connected */
- MB_TV_NR_VOD_SESSION_DISCONNECTED, /**< machblue tv vod session disconnected nofify reason. This message is
- generated in response to an mb_tv_vod_session_delete() request.
- @li MB_TV_VOD_SESSION_ARG(args) = handle of the vod session disconnected */
- MB_TV_NR_VOD_SESSION_TIMEOUT, /**< machblue tv vod session timeout nofify reason. This message is
- generated when a vod session has timeout due to user inactivity.
- @li MB_TV_VOD_SESSION_ARG(args) = handle of the vod session that has timed
- out */
- MB_TV_NR_VOD_SESSION_ERROR, /**< machblue tv vod session setup nofify reason. This message is generated
- in response to an mb_tv_vod_session_setup() request.
- @li MB_TV_VOD_SESSION_ARG(args) = user provided pointer to handle of
- the vod session in error
- @li MB_TV_VOD_SESSION_ERROR_ARG(args) = manufacturer specific vod session
- error code. */
- MB_TV_NR_PLAYBACK_POSITION_NOTIFY, /**< machblue tv playback position nofify reason. This message is sent the first
- time the current video playback position is greater or equal to the position
- value set with mb_tv_stc_playback_position_notify().
- @li MB_TV_STREAM_CONTROLLER_ARG(args) = stream controller being notified.
- @li MB_TV_PB_POSITION_VALUE_ARG(args) = pointer to mb_system_time_t representing
- the playback position value requested in
- nano-seconds. */
- MB_TV_NR_PLAYBACK_END_REACHED, /**< machblue tv playback end nofify reason. This message is sent asynchronously
- when the current video playback head reaches the end (for forward playbacks,
- fast forwards, etc.) or the beginning (for backward playbacks, rewinds, etc.)
- of the playback buffer.
- MB_TV_STREAM_CONTROLLER_ARG(args) = stream controller being notified.
- MB_TV_PB_BUFFER_SIDE_ARG(args) = MB_TV_PB_BUFFER_BEGINNING if the beginning
- of the buffer was reached, otherwise
- MB_TV_PB_BUFFER_END */
- MB_TV_NR_LANGUAGE_CHANGED, /**< machblue tv language change notify reason. This event is sent whenever
- the default ui language is changed.
- @li MB_TV_LANGUAGE_ARG(args) = current language string */
- MB_TV_NR_OUT_OF_STORAGE, /**< machblue tv out of recorder storage notify reason. This event is sent
- whenever the recorder runs out of storage. */
- MB_TV_NR_PIN_VALIDATION_STATUS, /**< machblue tv pin validate notify reason. This event is sent
- whenever a pin validation request has been completed. This event is
- generated in response to an mb_tv_pin_validate() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if pin validation
- succeeded, MB_FAILURE
- otherwise
- @li MB_TV_PIN_VALIDATION_TYPE_ARG(args) = type of pin validation
- completed */
- MB_TV_NR_ASSET_PURCHASE_STATUS, /**< machblue tv asset purchase request notify reason. This event is sent
- whenever an asset purchase request has been completed. This event is
- generated in response to an mb_tv_asset_purchase() request.
- @li MB_TV_STATUS_ARG(args) = MB_SUCCESS if the asset purchase
- succeeded, MB_FAILURE
- otherwise
- @li MB_TV_ASSET_PURCHASE_ID_ARG(args) = id of the asset being purchased. */
- MB_TV_NR_LAST
- } mb_tv_notif_reason_t;
- /** Machblue client notification function */
- typedef mb_error_t (mb_tv_notify_f)( mb_tv_notif_reason_t reason, mb_args_t *args, void *client_data );
- /** Machblue TV service list info type */
- typedef struct {
- int id; /**< service list id if any */
- mb_char_t name[MB_TV_SVL_NAME_LENGTH]; /**< service list name */
- mb_char_t logo_url[MB_TV_URL_LENGTH]; /**< service list logo url */
- mb_char_t extra_info[MB_TV_SVL_EXTRA_LENGTH]; /**< system dependent extra service list info */
- } mb_tv_svl_info_t;
- /** Machblue TV service type enum */
- typedef enum {
- MB_TV_DIGITAL_SERVICE = 0, /**< digital service type */
- MB_TV_ANALOG_SERVICE, /**< analog service type */
- MB_TV_DATA_SERVICE, /**< data service type */
- MB_TV_ETV_SERVICE, /**< enhanced tv service type */
- MB_TV_LAST_SERVICE_TYPE
- } mb_tv_service_type_t;
- /** Machblue TV service source enum */
- typedef enum {
- MB_TV_CABLE_SOURCE = 0, /**< cable broadcast source */
- MB_TV_SATELLITE_SOURCE, /**< satellite broadcast source */
- MB_TV_IPTV_SOURCE, /**< iptv broadcast source */
- MB_TV_TERRESTRIAL_SOURCE, /**< terrestrial broadcast source */
- MB_TV_RECORDER_SOURCE, /**< recorder source */
- MB_TV_VOD_SOURCE, /**< vod source */
- MB_TV_LAST_SOURCE_TYPE
- } mb_tv_source_type_t;
- /** Machblue TV service source info */
- typedef struct {
- int id; /**< unique source id */
- mb_tv_source_type_t type; /**< source type */
- } mb_tv_source_info_t;
- /** Machblue TV service info type */
- typedef struct {
- int id; /**< service channel unique id if any */
- int display_id; /**< service channel display id (i.e. channel
- number) if any */
- mb_char_t name[MB_TV_SERVICE_NAME_LENGTH]; /**< service name */
- mb_tv_service_type_t type; /**< service type */
- mb_tv_source_info_t source_info; /**< service source info */
- mb_char_t logo_url[MB_TV_URL_LENGTH]; /**< service logo url */
- mb_char_t extra_info[MB_TV_SERVICE_EXTRA_LENGTH]; /**< system dependent extra service info */
- } mb_tv_service_info_t;
- /** Machblue TV authorization flags enum */
- typedef enum {
- MB_TV_AF_AUTHORIZED = 0x0, /**< service/event/asset is authorized */
- MB_TV_AF_PARENTAL_PIN_REQ = 0x1, /**< parental control pin is required to access service/event/asset */
- MB_TV_AF_SUBSCRIPTION_REQ = 0x2, /**< subscription is required to access service/event/asset */
- MB_TV_AF_PURCHASE_REQ = 0x4, /**< purchase is required to access service/event/asset */
- MB_TV_AF_BLACKED_OUT = 0x8, /**< service/event/asset is currently blacked out */
- MB_TV_AF_LAST
- } mb_tv_authorization_flag_t;
- /** Machblue TV service state enum type */
- typedef enum {
- MB_TV_SERVICE_ERROR = 0, /**< service error state */
- MB_TV_SERVICE_CONNECTED, /**< service connected state */
- MB_TV_SERVICE_DISCONNECTED, /**< service disconnected state */
- MB_TV_LAST_SERVICE_STATE
- } mb_tv_service_state_t;
- /** Machblue TV event description type */
- typedef struct {
- int id; /**< unique event id */
- unsigned long duration; /**< event duration in seconds */
- mb_char_t name[MB_TV_EVENT_NAME_LENGTH]; /**< event name */
- mb_char_t short_desc[MB_TV_EVENT_DESCRIPTION_LENGTH]; /**< event short description */
- mb_char_t rating[MB_TV_RATING_LENGTH]; /**< event ratings */
- mb_char_t genre[MB_TV_GENRE_LENGTH]; /**< event genre */
- mb_char_t long_desc_url[MB_TV_URL_LENGTH]; /**< event long description url */
- mb_char_t art_url[MB_TV_URL_LENGTH]; /**< event art work url */
- mb_char_t extra_info[MB_TV_EVENT_EXTRA_LENGTH]; /**< system dependent extra event info */
- } mb_tv_event_info_t;
- /** Machblue TV event attributes type */
- typedef struct {
- mb_tv_event_info_t event_info; /**< event information structure */
- mb_time_t start_time; /**< event start time in seconds since 01/01/1970 UTC.
- For VOD and Recorded events this should be relative to the
- begining of the Recordings or VOD sessions */
- int cost; /**< event cost */
- mb_time_t expiration_date; /**< event expiration date in seconds since 01/01/1970 UTC */
- } mb_tv_event_attributes_t;
- /** Machblue TV service context info type */
- typedef struct {
- int id; /**< service context id if any */
- mb_char_t name[MB_TV_SVC_NAME_LENGTH]; /**< service context name */
- mb_char_t extra_info[MB_TV_SVC_EXTRA_LENGTH]; /**< system dependent extra service context info */
- } mb_tv_service_context_info_t;
- /** Machblue TV viewport type */
- typedef struct {
- mb_rect_t bounds; /**< viewport coordinates */
- int z_order; /**< viewport z-order */
- } mb_tv_viewport_t;
- /** Machblue TV stream state enum type */
- typedef enum {
- MB_TV_STREAM_ERROR = 0, /**< stream error state */
- MB_TV_STREAM_ENABLED, /**< stream enabled state */
- MB_TV_STREAM_DISABLED, /**< stream disabled state */
- MB_TV_LAST_STREAM_STATE
- } mb_tv_stream_state_t;
- /** Machblue TV stream type */
- typedef enum {
- MB_TV_STREAM_TYPE_AUDIO = 0, /**< audio stream type */
- MB_TV_STREAM_TYPE_VIDEO, /**< video stream type */
- MB_TV_STREAM_TYPE_DATA, /**< data stream type */
- MB_TV_STREAM_TYPE_SUBTITLE, /**< subtitle stream type */
- MB_TV_LAST_STREAM_TYPE
- } mb_tv_stream_type_t;
- /** Machblue TV stream info type */
- typedef struct {
- mb_tv_stream_type_t type; /**< stream type */
- mb_char_t tag[MB_TV_STREAM_TAG_LENGTH]; /**< stream tag identifier */
- unsigned long bitrate; /**< stream bitrate in bps if known */
- mb_char_t format[MB_TV_STREAM_FORMAT_LENGTH]; /**< stream format if known */
- mb_char_t language[MB_TV_LANGUAGE_LENGTH]; /**< stream language if applicable */
- mb_char_t extra_info[MB_TV_STREAM_EXTRA_LENGTH]; /**< pointer to system dependent extra info */
- } mb_tv_stream_info_t;
- /** Machblue TV trick play command */
- typedef enum {
- MB_TV_PAUSE_CMD = 0, /**< pauses an av stream at the current playing location.
- param = timeout in ms of the pause command */
- MB_TV_RESUME_CMD, /**< resumes a previously paused av stream. */
- MB_TV_RATE_CONTROL_CMD, /**< plays the video stream at the rate specified in hundredths of normal
- speed. This command is used to achieve fast forward, rewind, slow motion
- and reverse slow motion effect.
- @li param = rate control speed in hundredths of normal speed.
- @li A negative value indicates a reverse motion playback.
- @li A value of 100 indicates a return to normal play speed. */
- MB_TV_FRAME_JUMP_CMD, /**< jumps a specified number of frames forward or backward in an av
- stream.
- @li param = number of frames to jump. A negative number indicates a jump
- backward in the stream */
- MB_TV_JOIN_LIVE_CMD, /**< jumps to an av stream live position if any */
- MB_TV_RESTART_CMD, /**< jumps to the begining of the current playback buffer if any */
- MB_TV_LAST_TRICK_CMD
- } mb_tv_trick_play_cmd_t;
- /** Machblue TV playback buffer side enum */
- typedef enum {
- MB_TV_PB_BUFFER_BEGINNING = 0, /**< indicates the beginning of the bufffer */
- MB_TV_PB_BUFFER_END, /**< indicates the end of the bufffer */
- MB_TV_PB_BUFFER_LAST
- } mb_tv_playback_buffer_side_t;
- /** Machblue TV periodicity type */
- typedef enum {
- MB_TV_PERIODICITY_ONCE = 1, /**< the recording should be done only once */
- MB_TV_PERIODICITY_DAILY, /**< the recording should be repeated daily at this time slot*/
- MB_TV_PERIODICITY_WEEKLY, /**< the recording should be repeated weekly this day at this time slot*/
- MB_TV_PERIODICITY_ANYTIME, /**< the recording should be repeated anytime the event is on */
- MB_TV_PERIODICITY_LAST
- } mb_tv_periodicity_t;
- /** Machblue TV recording attributes type */
- typedef struct {
- int id; /**< unique recording id */
- mb_size_t size; /**< recording size in KB */
- mb_time_t start_time; /**< recording start time in seconds since
- 01/01/1970 UTC */
- mb_time_t end_time; /**< recording end time in seconds since
- 01/01/1970 UTC */
- mb_time_t delete_time; /**< recording automatic delete time in seconds
- since 01/01/1970 UTC */
- mb_tv_periodicity_t periodicity; /**< recording periodicity, i.e. if the recording
- is part of a series, the periodicity of the
- series. */
- mb_char_t extra_info[MB_TV_RA_EXTRA_LENGTH]; /**< system dependent extra recording info */
- } mb_tv_recording_attributes_t;
- /** Machblue TV recording state enum */
- typedef enum {
- MB_TV_RS_RECORDING = 0, /**< recording state */
- MB_TV_RS_PLAYING, /**< playing back state */
- MB_TV_RS_STORED, /**< stored state */
- MB_TV_RS_DELETED, /**< deleted state */
- MB_TV_RS_SCHEDULED, /**< scheduled state -- i.e. programmed but not yet recorded */
- MB_TV_RS_LAST
- } mb_tv_recording_state_t;
- /** Machblue TV vod session state enum type */
- typedef enum {
- MB_TV_VOD_ERROR_STATE = 0, /**< vod session error state */
- MB_TV_VOD_DISCONNECTED_STATE, /**< vod session disconnected state */
- MB_TV_VOD_CONNECTED_STATE, /**< vod session connected state */
- MB_TV_VOD_LAST_STATE
- } mb_tv_vod_session_state_t;
- /** Machblue TV pin type */
- typedef enum {
- MB_TV_PURCHASE_PIN = 0, /**< purchase pin type */
- MB_TV_PARENTAL_CONTROL_PIN, /**< parental control pin type */
- MB_TV_LAST_PIN_TYPE
- } mb_tv_pin_type_t;
- /** Machblue System Capabilities type */
- typedef enum {
- MB_TV_SCALED_VIDEO_CAP = 0x1, /**< device is scaled video capable */
- MB_TV_HD_CAP = 0x2, /**< device is capable of displaying High Definition content */
- MB_TV_PVR_CAP = 0x4, /**< device is capable of recording event */
- MB_TV_PIP_CAP = 0x8, /**< device is picture in picture capable */
- MB_TV_LAST_CAP
- } mb_tv_device_caps_t;
- /** Machblue TV device info type */
- typedef struct {
- mb_char_t manufacturer[MB_TV_DEVICE_MANUFACTURER_LENGTH]; /**< manufacturer name */
- mb_char_t model[MB_TV_DEVICE_MODEL_LENGTH]; /**< model name */
- mb_char_t os_name[MB_TV_DEVICE_OS_LENGTH]; /**< os name */
- mb_char_t os_version[MB_TV_DEVICE_OS_VERSION_LENGTH]; /**< os version */
- mb_char_t resident_app[MB_TV_DEVICE_RES_APP_LENGTH]; /**< resident application name */
- mb_char_t unique_id[MB_TV_DEVICE_UNIQUE_ID_LENGTH]; /**< unique device id */
- mb_char_t mac_address[MB_TV_DEVICE_MAC_ADDRESS_LENGTH]; /**< mac address (empty if not available) */
- mb_char_t ip_address[MB_TV_DEVICE_IP_ADDRESS_LENGTH]; /**< ip address (0.0.0.0 if not available) */
- unsigned long capabilities; /**< device capabilities bitfield defined
- in mb_tv_device_caps_t.
- @see mb_tv_device_caps_t */
- mb_char_t extra_info[MB_TV_DEVICE_EXTRA_LENGTH]; /**< system dependent extra device info */
- } mb_tv_device_info_t;
- /** Machblue TV device state type */
- typedef enum {
- MB_TV_BOOTING_STATE = 0, /**< booting state */
- MB_TV_POWER_OFF_STATE, /**< power off state */
- MB_TV_POWER_ON_STATE, /**< power on state */
- MB_TV_LAST_STATE /**< */
- } mb_tv_device_state_t;
- /*----------------------------------------------------------
- | Functions definition below this line
- +----------------------------------------------------------*/
- #ifdef __cplusplus
- } /* extern "C" */
- #endif /* __cplusplus */
- #endif /* _MACHBLUE_TV_DEFINES_H_ */