kb_machblue_tv_stream.c
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:9k
- //*****************************************************************************
- //File Name: kb_machblue_tv_stream.c
- //
- //Description: stream function
- //
- // used by Machblue DVB Player to control the streams running in a service context.
- //
- //Author: steven
- //
- //Date: 2007.01.20
- //
- //Version: v1.0
- //*****************************************************************************
- #include "machblue_defines.h"
- #include "machblue_porting_core.h"
- #include "machblue_tv_defines.h"
- #include "machblue_tv_customer.h"
- #include "machblue_tv_porting.h"
- #include "kb_machblue_client_data.h"
- #include "kb_machblue_client_define.h"
- /**
- * This function releases a stream controller object.
- * stream_controller < stream controller object to release >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_release(mb_tv_stream_controller_t stream_controller)
- {
- return MB_SUCCESS;
- }
- /**
- * This function retrieves the number of streams of a stream
- * controller object.
- * stream_controller < stream_controller managing the streams >
- * stream_count < pointer to int to store stream count >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_stream_count_get(mb_tv_stream_controller_t stream_controller,int *stream_count)
- {
- return MB_SUCCESS;
- }
- /**
- * This function retrieves streams' descriptions from a stream
- * controller object.
- * This function is ASYNCHRONOUS. The system should send an
- * MB_TV_NR_STREAMS_INFO_GET notification once the request is completed.
- * @see MB_TV_NR_STREAMS_INFO_GET
- * stream_controller < stream controller to query >
- * start_stream_pos < position of the first stream info to get (0 based) >
- * stream_count < pointer to number of stream info to retrieve.
- This pointer should be updated with number of stream info actually retrieved >
- * stream_info_list < pointer to stream info list to update with streams >
-
- * @return MB_SUCCESS on success MB_FAILURE
- * otherwise.
- */
- mb_error_t mb_tv_stc_streams_info_get(mb_tv_stream_controller_t stream_controller,int start_stream_pos,
- int *stream_count,mb_tv_stream_info_t *stream_info_list)
- {
- return MB_SUCCESS;
- }
- /**
- * This function retrieves the state of a given stream type.
- * stream_controller < stream controller to query >
- * stream_type < stream type >
- * state < pointer to state enum to update >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_stream_state_get(mb_tv_stream_controller_t stream_controller,
- mb_tv_stream_type_t stream_type,mb_tv_stream_state_t *state)
- {
- return MB_SUCCESS;
- }
- /**
- * This function enables a given stream type.
- * This function is ASYNCHRONOUS. The system should send an
- * MB_TV_NR_STREAM_ENABLED or an MB_TV_NR_STREAM_ERROR
- * notification once the request is completed.
- * @see MB_TV_NR_STREAM_ENABLED
- * @see MB_TV_NR_STREAM_ERROR
- * stream_controller < stream controller to use >
- * stream_type < type of stream to enable >
- * stream_tag < tag of stream to enable >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_stream_enable(mb_tv_stream_controller_t stream_controller,
- mb_tv_stream_type_t stream_type,mb_char_t *stream_tag)
- {
- return MB_SUCCESS;
- }
- /**
- * This function disables a given stream type.
- * This function is ASYNCHRONOUS. The system should send an
- * MB_TV_NR_STREAM_DISABLED or an MB_TV_NR_STREAM_ERROR notification
- * once the request is completed.
- * @see MB_TV_NR_STREAM_DISABLED
- * @see MB_TV_NR_STREAM_ERROR
- * stream_controller < stream controller to use >
- * stream_type < type of stream to disable >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_stream_disable(mb_tv_stream_controller_t stream_controller,mb_tv_stream_type_t stream_type)
- {
- return MB_SUCCESS;
- }
- /**
- * This function sends a trick play command to a stream controller.
- * This function is ASYNCHRONOUS. The system should send an
- * MB_TV_NR_TRICK_PLAY notification once the request is completed.
- * @see MB_TV_NR_TRICK_PLAY
- * stream_controller < stream controller to use >
- * command < trick play command to execute >
- * param < trick play command parameter >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_trick_play(mb_tv_stream_controller_t stream_controller,
- mb_tv_trick_play_cmd_t command,long param)
- {
- return MB_SUCCESS;
- }
- /**
- * This function retrieves the current trick play state of a stream controller.
- * stream_controller < stream controller to use >
- * pb_speed < pointer to the playback speed integer to update hundredths of normal speed >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_playback_speed_get(mb_tv_stream_controller_t stream_controller,int *pb_speed)
- {
- return MB_SUCCESS;
- }
- /**
- * This function returns the current playback position in the
- * currently running video stream.
- * stream_controller < stream controller to query >
- * pb_buffer_start < pointer to start of the playback buffer to update in nano-seconds.
- For a VOD or Recording playback the playback buffer
- start time should be set to 0.
- For a live stream on a PVR system, this correspond to the start
- time of the review buffer in nano-seconds since 01/01/1970 UTC.
- For a live stream on a non PVR system, this corresponds to the
- current time in nano-seconds since 01/01/1970 UTC. >
- * pb_buffer_end < pointer to end of the playback buffer to update in nano-seconds.
- For a VOD or Recording playback the playback buffer end time
- should be set to the VOD playback or recording duration in nano-seconds.
- For a live stream on a PVR system, this correspond to the end time
- time of the review buffer ("live" position) in nano-seconds since 01/01/1970 UTC.
- For a live stream on a non PVR system, this corresponds to the
- current time in nano-seconds since 01/01/1970. >
- * pb_current_pos < pointer to the current playback position in the playback buffer to update in nano-seconds.
- For a VOD or Recording playback this corresponds to the distance
- in nano-seconds between the playback head and the playback buffer start.
- For a live stream on a PVR system this corresponds to the recorded
- timestamp in nano-seconds since 01/01/1970 UTC at the current location of the playback head.
- For a live stream on a non PVR system, the current time in
- nano-seconds since 01/01/1970 should be returned. >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_playback_position_get(mb_tv_stream_controller_t stream_controller,
- mb_system_time_t *pb_buffer_start,mb_system_time_t *pb_buffer_end,mb_system_time_t *pb_current_pos)
- {
- return MB_SUCCESS;
- }
- /**
- * This function sets a video playback position notification request.
- * The system should send an MB_TV_NR_PLAYBACK_POSITION_NOTIFY
- * notification to the player as soon as the requested video
- * playback position value is reached.
- * @see MB_TV_NR_PLAYBACK_POSITION_NOTIFY
- * stream_controller < stream controller to use >
- * pb_pos_value < video playback position value to watch for in nano-seconds.
- For a VOD or Recording playback this corresponds to the distance
- in nano-seconds between the trigger and the playback buffer start.
- For a live stream on a PVR system this corresponds to the recorded
- timestamp in nano-seconds since 01/01/1970 UTC at the location of the trigger.
- For a live stream on a non PVR system, this corresponds to the time
- in nano-seconds since 01/01/1970 of the trigger. >
-
- * @return MB_SUCCESS on success, MB_FAILURE otherwise.
- */
- mb_error_t mb_tv_stc_playback_position_notify(mb_tv_stream_controller_t stream_controller,mb_system_time_t *pb_pos_value)
- {
- return MB_SUCCESS;
- }