|
SASC-NG
DVBSoftCAM
|
00001 /* FFdecsa -- fast decsa algorithm 00002 * 00003 * Copyright (C) 2003-2004 fatih89r 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 00021 #ifndef FFDECSA_H 00022 #define FFDECSA_H 00023 00024 //----- public interface 00025 00026 // -- how many packets can be decrypted at the same time 00027 // This is an info about internal decryption parallelism. 00028 // You should try to call decrypt_packets with more packets than the number 00029 // returned here for performance reasons (use get_suggested_cluster_size to know 00030 // how many). 00031 int get_internal_parallelism(void); 00032 00033 // -- how many packets you should have in a cluster when calling decrypt_packets 00034 // This is a suggestion to achieve optimal performance; typically a little 00035 // higher than what get_internal_parallelism returns. 00036 // Passing less packets could slow down the decryption. 00037 // Passing more packets is never bad (if you don't spend a lot of time building 00038 // the list). 00039 int get_suggested_cluster_size(void); 00040 00041 // -- alloc & free the key structure 00042 void *get_key_struct(void); 00043 void free_key_struct(void *keys); 00044 00045 // -- set control words, 8 bytes each 00046 void set_control_words(void *keys, const unsigned char *even, const unsigned char *odd); 00047 00048 // -- set even control word, 8 bytes 00049 void set_even_control_word(void *keys, const unsigned char *even); 00050 00051 // -- set odd control word, 8 bytes 00052 void set_odd_control_word(void *keys, const unsigned char *odd); 00053 00054 // -- get control words, 8 bytes each 00055 //void get_control_words(void *keys, unsigned char *even, unsigned char *odd); 00056 00057 // -- decrypt many TS packets 00058 // This interface is a bit complicated because it is designed for maximum speed. 00059 // Please read doc/how_to_use.txt. 00060 int decrypt_packets(void *keys, unsigned char **cluster); 00061 00062 #endif