SASC
DVBSoftCAM

plugin_getsid.h

Go to the documentation of this file.
00001 #ifndef _PLUGIN_GETSID_H_
00002 #define _PLUGIN_GETSID_H_
00003 
00004 #include "process_req.h"
00005 #include "messages.h"
00006 #define PLUGIN_GETSID 8
00007 
00008 #define MAX_EPID 128
00009 struct nit_data {
00010   unsigned int frequency;
00011   unsigned short orbit;
00012   unsigned char is_east;
00013   unsigned char polarization;
00014   unsigned char modulation;
00015   unsigned int symbolrate;
00016   unsigned char fec;
00017   unsigned char type;
00018 };
00019 
00020 struct sid_msg {
00021   struct list_head list;
00022   unsigned long sid;
00023   int calen;
00024   int epid_count;
00025   unsigned char ca[1024];
00026   int epid[MAX_EPID];
00027   unsigned char epidtype[MAX_EPID];
00028   struct nit_data nit;
00029 };
00030 
00031 struct epid {
00032   struct list_head list;
00033   unsigned int epid;
00034   unsigned char type;
00035 };
00036 
00037 struct sid {
00038   struct list_head list;
00039   unsigned long sid;
00040   struct list_head epid;
00041   unsigned char ca[1024];
00042   int calen;
00043 };
00044 
00045 struct dmxcmd {
00046   struct list_head list;
00047   int pid;
00048   int fd;
00049   int checked;
00050   struct sid *sid;
00051 };
00052 
00053 struct sid_data {
00054   struct list_head list;
00055   struct common_data *common;
00056 
00057   struct list_head cmdqueue;
00058   struct list_head sidlist;
00059 
00060   struct nit_data nit;
00061   int has_map;
00062   int removed_sid;
00063   int sendmsg;
00064   unsigned char tunecache[256]; //Should be large enough
00065   pthread_t thread;
00066   pthread_mutex_t mutex;
00067   pthread_cond_t cond;
00068 };
00069 
00070 enum {
00071   GETSID_CMD_RESET  = 0,
00072   GETSID_CMD_START  = 1,
00073   GETSID_CMD_PID    = 2
00074 };
00075 
00076 enum
00077 {
00078     // video
00079     MPEG1Video     = 0x01, 
00080     MPEG2Video     = 0x02, 
00081     MPEG4Video     = 0x10, 
00082     H264Video      = 0x1b, 
00083     OpenCableVideo = 0x80,
00084 
00085     // audio
00086     MPEG1Audio     = 0x03, 
00087     MPEG2Audio     = 0x04, 
00088     MPEG2AudioAmd1 = 0x11, 
00089     AACAudio       = 0x0f, 
00090     AC3Audio       = 0x81,
00091     DTSAudio       = 0x8a,
00092 
00093     // DSM-CC Object Carousel
00094     DSMCC          = 0x08, 
00095     DSMCC_A        = 0x0a, 
00096     DSMCC_B        = 0x0b, 
00097     DSMCC_C        = 0x0c, 
00098     DSMCC_D        = 0x0d, 
00099     DSMCC_DL       = 0x14, 
00100     MetaDataPES    = 0x15, 
00101     MetaDataSec    = 0x16, 
00102     MetaDataDC     = 0x17, 
00103     MetaDataOC     = 0x18, 
00104     MetaDataDL     = 0x19, 
00105 
00106     // other
00107     PrivSec        = 0x05, 
00108     PrivData       = 0x06, 
00109 
00110     MHEG           = 0x07, 
00111     H222_1         = 0x09, 
00112 
00113     MPEG2Aux       = 0x0e, 
00114 
00115     FlexMuxPES     = 0x12, 
00116     FlexMuxSec     = 0x13, 
00117 
00118     MPEG2IPMP      = 0x1a, 
00119     MPEG2IPMP2     = 0x7f, 
00120 
00121     // special id's, not actually ID's but can be used in FindPIDs
00122     AnyMask        = 0xFFFF0000,
00123     AnyVideo       = 0xFFFF0001,
00124     AnyAudio       = 0xFFFF0002,
00125 };
00126 
00127 void free_sidmsg(struct sid_msg *sidmsg);
00128 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines