1 /*****************************************************************************
2 * dvb.h : functions to control a DVB card under Linux with v4l2
3 *****************************************************************************
4 * Copyright (C) 1998-2005 the VideoLAN team
6 * Authors: Johan Bilien <jobi@via.ecp.fr>
7 * Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
8 * Christopher Ross <chris@tebibyte.org>
9 * Christophe Massiot <massiot@via.ecp.fr>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
24 *****************************************************************************/
26 /*****************************************************************************
28 *****************************************************************************/
29 typedef struct demux_handle_t
36 typedef struct frontend_t frontend_t;
39 int i_snr; /**< Signal Noise ratio */
40 int i_ber; /**< Bitrate error ratio */
41 int i_signal_strenth; /**< Signal strength */
42 } frontend_statistic_t;
51 typedef struct scan_parameter_t scan_parameter_t;
52 typedef struct scan_t scan_t;
60 int i_handle, i_frontend_handle;
61 demux_handle_t p_demux_handles[MAX_DEMUX];
62 frontend_t *p_frontend;
63 mtime_t i_frontend_timeout;
74 /* Local HTTP server */
75 httpd_host_t *p_httpd_host;
76 httpd_file_sys_t *p_httpd_file;
77 httpd_redirect_t *p_httpd_redir;
79 vlc_mutex_t httpd_mutex;
80 vlc_cond_t httpd_cond;
81 mtime_t i_httpd_timeout;
82 bool b_request_frontend_info, b_request_mmi_info;
83 char *psz_frontend_info, *psz_mmi_info;
93 #define TELETEXT0_TYPE 3
94 #define SUBTITLE0_TYPE 4
96 #define TYPE_INTERVAL 5
99 /*****************************************************************************
101 *****************************************************************************/
103 int FrontendOpen( access_t * );
104 void FrontendPoll( access_t *p_access );
105 int FrontendSet( access_t * );
106 void FrontendClose( access_t * );
108 void FrontendStatus( access_t * );
111 int FrontendGetStatistic( access_t *, frontend_statistic_t * );
112 void FrontendGetStatus( access_t *, frontend_status_t * );
113 int FrontendGetScanParameter( access_t *, scan_parameter_t * );
115 int DMXSetFilter( access_t *, int i_pid, int * pi_fd, int i_type );
116 int DMXUnsetFilter( access_t *, int i_fd );
118 int DVROpen( access_t * );
119 void DVRClose( access_t * );
121 int CAMOpen( access_t * );
122 int CAMPoll( access_t * );
123 int CAMSet( access_t *, dvbpsi_pmt_t * );
124 void CAMClose( access_t * );
126 void CAMStatus( access_t * );
130 int HTTPOpen( access_t *p_access );
131 void HTTPClose( access_t *p_access );
132 const char *HTTPExtractValue( const char *psz_uri, const char *psz_name,
133 char *psz_value, int i_value_max );
135 /*****************************************************************************
137 *****************************************************************************/
138 #define STRINGIFY( z ) UGLY_KLUDGE( z )
139 #define UGLY_KLUDGE( z ) #z