Add DreX fourCCs
[vlc.git] / modules / access / dvb / dvb.h
bloba5dcaf4a78be1e03c2fbde251485e3951d191694
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 /*****************************************************************************
27 * Local structures
28 *****************************************************************************/
29 typedef struct demux_handle_t
31 int i_pid;
32 int i_handle;
33 int i_type;
34 } demux_handle_t;
36 typedef struct frontend_t frontend_t;
37 typedef struct
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;
44 typedef struct
46 bool b_has_signal;
47 bool b_has_carrier;
48 bool b_has_lock;
49 } frontend_status_t;
51 #define MAX_DEMUX 256
53 struct scan_t;
54 struct scan_parameter_t;
56 struct access_sys_t
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;
64 struct cam *p_cam;
66 /* */
67 int i_read_once;
69 int i_stat_counter;
71 /* Scan */
72 struct scan_t *scan;
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
83 /*****************************************************************************
84 * Prototypes
85 *****************************************************************************/
87 int FrontendOpen( access_t * );
88 void FrontendPoll( access_t *p_access );
89 int FrontendSet( access_t * );
90 void FrontendClose( access_t * );
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 * );
96 int DMXSetFilter( access_t *, int i_pid, int * pi_fd, int i_type );
97 int DMXUnsetFilter( access_t *, int i_fd );
99 int DVROpen( access_t * );
100 void DVRClose( access_t * );