scan.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_DVBPSI_DR_H
00024 #ifdef _DVBPSI_DR_43_H_
00025 # define DVBPSI_USE_NIT 1
00026 # include <dvbpsi/nit.h>
00027 #endif
00028 #else
00029 #ifdef _DVBPSI_DR_43_H_
00030 # define DVBPSI_USE_NIT 1
00031 # include "nit.h"
00032 #endif
00033 #endif
00034
00035 #ifndef DVBPSI_USE_NIT
00036 # warning NIT is not supported by your libdvbpsi version
00037 #endif
00038
00039 typedef enum
00040 {
00041 SCAN_NONE,
00042 SCAN_DVB_T,
00043 SCAN_DVB_S,
00044 SCAN_DVB_C,
00045 } scan_type_t;
00046
00047 typedef struct
00048 {
00049 scan_type_t type;
00050 bool b_exhaustive;
00051 struct
00052 {
00053 int i_min;
00054 int i_max;
00055 int i_step;
00056
00057 int i_count;
00058 } frequency;
00059
00060 struct
00061 {
00062
00063 int i_min;
00064 int i_max;
00065 int i_step;
00066
00067 int i_count;
00068 } bandwidth;
00069
00070 } scan_parameter_t;
00071
00072 typedef struct
00073 {
00074 int i_frequency;
00075 int i_bandwidth;
00076 } scan_configuration_t;
00077
00078 typedef enum
00079 {
00080 SERVICE_UNKNOWN = 0,
00081 SERVICE_DIGITAL_RADIO,
00082 SERVICE_DIGITAL_TELEVISION,
00083 SERVICE_DIGITAL_TELEVISION_AC_SD,
00084 SERVICE_DIGITAL_TELEVISION_AC_HD,
00085 } scan_service_type_t;
00086
00087 typedef struct
00088 {
00089 int i_program;
00090 scan_configuration_t cfg;
00091 int i_snr;
00092
00093 scan_service_type_t type;
00094 char *psz_name;
00095 int i_channel;
00096 bool b_crypted;
00097
00098
00099 int i_network_id;
00100
00101 int i_nit_version;
00102 int i_sdt_version;
00103
00104 } scan_service_t;
00105
00106 typedef struct
00107 {
00108 vlc_object_t *p_obj;
00109
00110 scan_configuration_t cfg;
00111 int i_snr;
00112
00113 dvbpsi_handle pat;
00114 dvbpsi_pat_t *p_pat;
00115 int i_nit_pid;
00116
00117 dvbpsi_handle sdt;
00118 dvbpsi_sdt_t *p_sdt;
00119
00120 #ifdef DVBPSI_USE_NIT
00121 dvbpsi_handle nit;
00122 dvbpsi_nit_t *p_nit;
00123 #endif
00124
00125 } scan_session_t;
00126
00127 typedef struct
00128 {
00129 vlc_object_t *p_obj;
00130 struct dialog_progress_bar_t *p_dialog;
00131 int64_t i_index;
00132 scan_parameter_t parameter;
00133 int64_t i_time_start;
00134
00135 int i_service;
00136 scan_service_t **pp_service;
00137 } scan_t;
00138
00139
00140 scan_service_t *scan_service_New( int i_program, const scan_configuration_t *p_cfg );
00141 void scan_service_Delete( scan_service_t *p_srv );
00142
00143 int scan_Init( vlc_object_t *p_obj, scan_t *p_scan, const scan_parameter_t *p_parameter );
00144 void scan_Clean( scan_t *p_scan );
00145
00146 int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg );
00147
00148 block_t *scan_GetM3U( scan_t *p_scan );
00149 bool scan_IsCancelled( scan_t *p_scan );
00150
00151 int scan_session_Init( vlc_object_t *p_obj, scan_session_t *p_session, const scan_configuration_t *p_cfg );
00152 void scan_session_Clean( scan_t *p_scan, scan_session_t *p_session );
00153 bool scan_session_Push( scan_session_t *p_scan, block_t *p_block );
00154 void scan_service_SetSNR( scan_session_t *p_scan, int i_snr );
00155