pike.git / src / modules / DVB / dvb.c

version» Context lines:

pike.git/src/modules/DVB/dvb.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dvb.c,v 1.12 2002/10/11 01:39:39 nilsson Exp $ + || $Id: dvb.c,v 1.13 2002/10/21 17:06:12 marcus Exp $   */      /*    * DVB module    *    * Creator: Honza Petrous <hop@unibase.cz>    *    * Credits:    * + Tuner zapping code inspired on 'szap' app from linux DVB driver    * package    * + PMT,PAT,ECM parsing code based on 'mgcam' app [ by badfish :]    *    * Distro: aconfig.h (automake-> config.h.in), configure.in, Makefile.in    *    * Todo:    * - remove crc32 table and use Gz.crc32() call    * - "Frontend", "Mux" ...    */      #include "config.h" -  + #include "module.h"    -  +    #ifdef HAVE_DVB      #include <stdio.h>   #include <stdlib.h>   #include <limits.h>   #include <string.h>   #include <errno.h>   #include <sys/ioctl.h>   #include <sys/types.h>   #include <sys/stat.h>
pike.git/src/modules/DVB/dvb.c:71:   #include "object.h"   #include "mapping.h"   #include "pike_macros.h"   #include "threads.h"   #include "fd_control.h"   #include "module_support.h"   #include "builtin_functions.h"   #include "operators.h"      #include "dvb.h" - #endif /* HAVE_DVB */ +     - /* MUST BE LAST */ - #include "module_magic.h" +     - #ifdef HAVE_DVB -  +    /* WARNING: It is a design limit of DVB-S full cards! */   #define MAX_PES_FD 8      #define _DMX_PES_RDS 129      #define MAX_DVB_READ_SIZE 4096   #define MAX_ERR_LEN 160      struct program *dvb_program;   struct program *dvb_stream_program;
pike.git/src/modules/DVB/dvb.c:1653:    } while (e != NULL);      }      /*    * ---------------------    * Pike module API    * ---------------------    */    - void pike_module_init() { + PIKE_MODULE_INIT {       /*    * Internal constant names    *    */    add_integer_constant("MUX_AUDIO", DMX_PES_AUDIO, 0);    add_integer_constant("MUX_VIDEO", DMX_PES_VIDEO, 0);    add_integer_constant("MUX_TELETEXT", DMX_PES_TELETEXT, 0);    add_integer_constant("MUX_SUBTITLE", DMX_PES_SUBTITLE, 0);    add_integer_constant("MUX_PCR", DMX_PES_PCR, 0);
pike.git/src/modules/DVB/dvb.c:1725:    set_exit_callback(exit_dvb_audio);       add_function("create", f_audio_create, "function(int|void:void)", 0);    add_function("mute", f_audio_mute, "function(int|void:int)", 0);    add_function("status", f_audio_status, "function(:mapping|int)", 0);    add_function("ctrl", f_audio_ctrl, "function(int|string:int)", 0);    add_function("mixer", f_audio_mixer, "function(int,int|void:int)", 0);       end_class("Audio", 0);    - } /* pike_module_init */ + } /* PIKE_MODULE_INIT */    - void pike_module_exit() { + PIKE_MODULE_EXIT {       if(dvb_program) {    free_program(dvb_program);    dvb_program = NULL;    } - } /* pike_module_exit */ + } /* PIKE_MODULE_EXIT */      #else    - void pike_module_init() { + PIKE_MODULE_INIT {       /*add_integer_constant("DVB support IS MISSING", 0, 0);*/   }    - void pike_module_exit() { + PIKE_MODULE_EXIT {   }      #endif