]> git.sesse.net Git - vlc/blob - modules/access/dvb/dvb.h
2a821b3565ceac4e4b8532b2e119e122ad6479bc
[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-2004 VideoLAN
5  *
6  * Authors: Johan Bilien <jobi@via.ecp.fr>
7  *          Jean-Paul Saman <jpsaman@saman>
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 /*****************************************************************************
28  * Devices location
29  *****************************************************************************/
30 #define DMX      "/dev/dvb/adapter%d/demux%d"
31 #define FRONTEND "/dev/dvb/adapter%d/frontend%d"
32 #define DVR      "/dev/dvb/adapter%d/dvr%d"
33
34 /*****************************************************************************
35  * Local structures
36  *****************************************************************************/
37 typedef struct
38 {
39     int i_pid;
40     int i_handle;
41     int i_type;
42 } demux_handle_t;
43
44 typedef struct frontend_t frontend_t;
45
46 #define MAX_DEMUX 24
47
48 struct access_sys_t
49 {
50     int i_handle;
51     demux_handle_t p_demux_handles[MAX_DEMUX];
52     frontend_t *p_frontend;
53     vlc_bool_t b_budget_mode;
54 };
55
56 #define VIDEO0_TYPE     1
57 #define AUDIO0_TYPE     2
58 #define TELETEXT0_TYPE  3
59 #define SUBTITLE0_TYPE  4
60 #define PCR0_TYPE       5
61 #define TYPE_INTERVAL   5
62 #define OTHER_TYPE     21
63
64 /*****************************************************************************
65  * Prototypes
66  *****************************************************************************/
67 int  E_(FrontendOpen)( access_t * );
68 int  E_(FrontendSet)( access_t * );
69 void E_(FrontendClose)( access_t * );
70
71 int E_(DMXSetFilter)( access_t *, int i_pid, int * pi_fd, int i_type );
72 int E_(DMXUnsetFilter)( access_t *, int i_fd );
73
74 int  E_(DVROpen)( access_t * );
75 void E_(DVRClose)( access_t * );
76