]> git.sesse.net Git - vlc/blobdiff - modules/access/dvb/dvb.h
* modules/demux/ts.c, modules/access/dvb: Added support for the CAM device
[vlc] / modules / access / dvb / dvb.h
index dbe7c68fa43045e018b01c28dd5011be194c29d1..47ec46fa37db531a2709e8db9a989e5c23ef5bd3 100644 (file)
@@ -1,11 +1,12 @@
 /*****************************************************************************
  * dvb.h : functions to control a DVB card under Linux with v4l2
  *****************************************************************************
- * Copyright (C) 1998-2003 VideoLAN
+ * Copyright (C) 1998-2004 VideoLAN
  *
  * Authors: Johan Bilien <jobi@via.ecp.fr>
  *          Jean-Paul Saman <jpsaman@saman>
  *          Christopher Ross <chris@tebibyte.org>
+ *          Christophe Massiot <massiot@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #define DVR      "/dev/dvb/adapter%d/dvr%d"
 
 /*****************************************************************************
- * Prototypes
+ * Local structures
  *****************************************************************************/
-int ioctl_SetFrontend (input_thread_t * p_input, struct dvb_frontend_parameters fep, int b_polarisation,
-                       unsigned int u_lnb_lof1, unsigned int u_lnb_lof2, unsigned int u_lnb_slof,
-                       unsigned int u_adapter, unsigned int u_device );
-int ioctl_SetDMXFilter(input_thread_t * p_input, int i_pid, int *pi_fd, int i_type, unsigned int u_adapter, unsigned int u_device );
-int ioctl_UnsetDMXFilter(input_thread_t * p_input, int );
-int ioctl_InfoFrontend(input_thread_t * p_input, struct dvb_frontend_info *info, unsigned int u_adapter, unsigned int u_device );
+typedef struct
+{
+    int i_pid;
+    int i_handle;
+    int i_type;
+} demux_handle_t;
+
+typedef struct frontend_t frontend_t;
+
+#define MAX_DEMUX 24
+
+struct access_sys_t
+{
+    int i_handle;
+    demux_handle_t p_demux_handles[MAX_DEMUX];
+    frontend_t *p_frontend;
+    vlc_bool_t b_budget_mode;
+    vlc_bool_t b_cam;
+    int i_cam_handle;
+};
+
+#define VIDEO0_TYPE     1
+#define AUDIO0_TYPE     2
+#define TELETEXT0_TYPE  3
+#define SUBTITLE0_TYPE  4
+#define PCR0_TYPE       5
+#define TYPE_INTERVAL   5
+#define OTHER_TYPE     21
 
 /*****************************************************************************
- * dvb argument helper functions 
+ * Prototypes
  *****************************************************************************/
-fe_bandwidth_t dvb_DecodeBandwidth(input_thread_t * p_input, int bandwidth);
-fe_code_rate_t dvb_DecodeFEC(input_thread_t * p_input, int fec);
-fe_modulation_t dvb_DecodeModulation(input_thread_t * p_input, int modulation);
-fe_transmit_mode_t dvb_DecodeTransmission(input_thread_t * p_input, int transmission);
-fe_guard_interval_t dvb_DecodeGuardInterval(input_thread_t * p_input, int guard);
-fe_hierarchy_t dvb_DecodeHierarchy(input_thread_t * p_input, int hierarchy);
-fe_spectral_inversion_t dvb_DecodeInversion(input_thread_t * p_input, int inversion);
+int  E_(FrontendOpen)( access_t * );
+int  E_(FrontendSet)( access_t * );
+void E_(FrontendClose)( access_t * );
+
+int E_(DMXSetFilter)( access_t *, int i_pid, int * pi_fd, int i_type );
+int E_(DMXUnsetFilter)( access_t *, int i_fd );
+
+int  E_(DVROpen)( access_t * );
+void E_(DVRClose)( access_t * );
+
+int  E_(CAMOpen)( access_t * );
+int  E_(CAMSet)( access_t *, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t,
+                uint16_t, uint8_t * );
+void E_(CAMClose)( access_t * );