00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #define DMX "/dev/dvb/adapter%d/demux%d"
00031 #define FRONTEND "/dev/dvb/adapter%d/frontend%d"
00032 #define DVR "/dev/dvb/adapter%d/dvr%d"
00033 #define CA "/dev/dvb/adapter%d/ca%d"
00034
00035
00036
00037
00038 typedef struct
00039 {
00040 int i_pid;
00041 int i_handle;
00042 int i_type;
00043 } demux_handle_t;
00044
00045 typedef struct frontend_t frontend_t;
00046
00047 typedef struct
00048 {
00049 int i_slot;
00050 int i_resource_id;
00051 void (* pf_handle)( access_t *, int, uint8_t *, int );
00052 void (* pf_close)( access_t *, int );
00053 void (* pf_manage)( access_t *, int );
00054 void *p_sys;
00055 } en50221_session_t;
00056
00057 #define MAX_DEMUX 256
00058 #define MAX_CI_SLOTS 16
00059 #define MAX_SESSIONS 32
00060 #define MAX_PROGRAMS 24
00061
00062 struct access_sys_t
00063 {
00064 int i_handle, i_frontend_handle;
00065 demux_handle_t p_demux_handles[MAX_DEMUX];
00066 frontend_t *p_frontend;
00067 vlc_bool_t b_budget_mode;
00068
00069
00070 int i_ca_handle;
00071 int i_nb_slots;
00072 vlc_bool_t pb_active_slot[MAX_CI_SLOTS];
00073 vlc_bool_t pb_tc_has_data[MAX_CI_SLOTS];
00074 en50221_session_t p_sessions[MAX_SESSIONS];
00075 mtime_t i_ca_timeout, i_ca_next_event, i_frontend_timeout;
00076 dvbpsi_pmt_t *pp_selected_programs[MAX_PROGRAMS];
00077
00078
00079 int i_read_once;
00080 };
00081
00082 #define VIDEO0_TYPE 1
00083 #define AUDIO0_TYPE 2
00084 #define TELETEXT0_TYPE 3
00085 #define SUBTITLE0_TYPE 4
00086 #define PCR0_TYPE 5
00087 #define TYPE_INTERVAL 5
00088 #define OTHER_TYPE 21
00089
00090
00091
00092
00093 int E_(FrontendOpen)( access_t * );
00094 void E_(FrontendPoll)( access_t *p_access );
00095 int E_(FrontendSet)( access_t * );
00096 void E_(FrontendClose)( access_t * );
00097
00098 int E_(DMXSetFilter)( access_t *, int i_pid, int * pi_fd, int i_type );
00099 int E_(DMXUnsetFilter)( access_t *, int i_fd );
00100
00101 int E_(DVROpen)( access_t * );
00102 void E_(DVRClose)( access_t * );
00103
00104 int E_(CAMOpen)( access_t * );
00105 int E_(CAMPoll)( access_t * );
00106 int E_(CAMSet)( access_t *, dvbpsi_pmt_t * );
00107 void E_(CAMClose)( access_t * );
00108
00109 int E_(en50221_Poll)( access_t * );
00110 int E_(en50221_SetCAPMT)( access_t *, dvbpsi_pmt_t * );
00111 void E_(en50221_End)( access_t * );
00112