1 /*****************************************************************************
2 * dvb.h : functions to control a DVB card under Linux with v4l2
3 *****************************************************************************
4 * Copyright (C) 1998-2004 VideoLAN
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>
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 *****************************************************************************/
27 /*****************************************************************************
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 #define CA "/dev/dvb/adapter%d/ca%d"
35 /*****************************************************************************
37 *****************************************************************************/
45 typedef struct frontend_t frontend_t;
51 void (* pf_handle)( access_t *, int, uint8_t *, int );
52 void (* pf_close)( access_t *, int );
53 void (* pf_manage)( access_t *, int );
58 #define MAX_CI_SLOTS 16
59 #define MAX_SESSIONS 32
64 demux_handle_t p_demux_handles[MAX_DEMUX];
65 frontend_t *p_frontend;
66 vlc_bool_t b_budget_mode;
71 vlc_bool_t pb_active_slot[MAX_CI_SLOTS];
72 vlc_bool_t pb_tc_has_data[MAX_CI_SLOTS];
73 en50221_session_t p_sessions[MAX_SESSIONS];
74 mtime_t i_ca_timeout, i_ca_next_event;
81 #define TELETEXT0_TYPE 3
82 #define SUBTITLE0_TYPE 4
84 #define TYPE_INTERVAL 5
87 /*****************************************************************************
89 *****************************************************************************/
90 int E_(FrontendOpen)( access_t * );
91 int E_(FrontendSet)( access_t * );
92 void E_(FrontendClose)( access_t * );
94 int E_(DMXSetFilter)( access_t *, int i_pid, int * pi_fd, int i_type );
95 int E_(DMXUnsetFilter)( access_t *, int i_fd );
97 int E_(DVROpen)( access_t * );
98 void E_(DVRClose)( access_t * );
100 int E_(CAMOpen)( access_t * );
101 int E_(CAMPoll)( access_t * );
102 int E_(CAMSet)( access_t *, uint8_t **, int );
103 void E_(CAMClose)( access_t * );
105 int E_(en50221_Poll)( access_t * );
106 int E_(en50221_SetCAPMT)( access_t *, uint8_t **, int );
107 void E_(en50221_End)( access_t * );