]> git.sesse.net Git - vlc/blob - modules/access/dvb/dvb.h
DVB scan: re-enable the old plugin
[vlc] / modules / access / dvb / dvb.h
1 /*****************************************************************************
2  * dvb.h : functions to control a DVB card under Linux with v4l2
3  *****************************************************************************
4  * Copyright (C) 1998-2005 the VideoLAN team
5  *
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>
10  *
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.
15  *
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.
20  *
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  *****************************************************************************/
25
26 /*****************************************************************************
27  * Local structures
28  *****************************************************************************/
29 typedef struct demux_handle_t
30 {
31     int i_pid;
32     int i_handle;
33     int i_type;
34 } demux_handle_t;
35
36 typedef struct frontend_t frontend_t;
37 typedef struct
38 {
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;
43
44 typedef struct
45 {
46     bool b_has_signal;
47     bool b_has_carrier;
48     bool b_has_lock;
49 } frontend_status_t;
50
51 #define MAX_DEMUX 256
52
53 struct scan_t;
54 struct scan_parameter_t;
55
56 struct access_sys_t
57 {
58     int i_handle, i_frontend_handle;
59     demux_handle_t p_demux_handles[MAX_DEMUX];
60     frontend_t *p_frontend;
61     mtime_t i_frontend_timeout;
62     bool b_budget_mode;
63
64     struct cam *p_cam;
65
66     /* */
67     int i_read_once;
68
69     int i_stat_counter;
70
71     /* Scan */
72     struct scan_t *scan;
73 };
74
75 #define VIDEO0_TYPE     1
76 #define AUDIO0_TYPE     2
77 #define TELETEXT0_TYPE  3
78 #define SUBTITLE0_TYPE  4
79 #define PCR0_TYPE       5
80 #define TYPE_INTERVAL   5
81 #define OTHER_TYPE     21
82
83 /*****************************************************************************
84  * Prototypes
85  *****************************************************************************/
86
87 int  FrontendOpen( access_t * );
88 void FrontendPoll( access_t *p_access );
89 int  FrontendSet( access_t * );
90 void FrontendClose( access_t * );
91
92 int  FrontendGetStatistic( access_t *, frontend_statistic_t * );
93 void FrontendGetStatus( access_t *, frontend_status_t * );
94 int  FrontendGetScanParameter( access_t *, struct scan_parameter_t * );
95
96 int DMXSetFilter( access_t *, int i_pid, int * pi_fd, int i_type );
97 int DMXUnsetFilter( access_t *, int i_fd );
98
99 int  DVROpen( access_t * );
100 void DVRClose( access_t * );