tsdecrypt reads and decrypts CSA encrypted incoming mpeg transport stream over UDP/RTP using code words obtained from OSCAM or similar CAM server. tsdecrypt communicates with CAM server using cs378x (camd35 over tcp) protocol or newcamd protocol. https://georgi.unixsol.org/programs/tsdecrypt/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FFdecsa.h 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* FFdecsa -- fast decsa algorithm
  2. *
  3. * Copyright (C) 2003-2004 fatih89r
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19. #ifndef FFDECSA_H
  20. #define FFDECSA_H
  21. //----- public interface
  22. // -- how many packets can be decrypted at the same time
  23. // This is an info about internal decryption parallelism.
  24. // You should try to call decrypt_packets with more packets than the number
  25. // returned here for performance reasons (use get_suggested_cluster_size to know
  26. // how many).
  27. int get_internal_parallelism(void);
  28. // -- how many packets you should have in a cluster when calling decrypt_packets
  29. // This is a suggestion to achieve optimal performance; typically a little
  30. // higher than what get_internal_parallelism returns.
  31. // Passing less packets could slow down the decryption.
  32. // Passing more packets is never bad (if you don't spend a lot of time building
  33. // the list).
  34. int get_suggested_cluster_size(void);
  35. // -- alloc & free the key structure
  36. void *get_key_struct(void);
  37. void free_key_struct(void *keys);
  38. // -- set control words, 8 bytes each
  39. void set_control_words(void *keys, const unsigned char *even, const unsigned char *odd);
  40. // -- set even control word, 8 bytes
  41. void set_even_control_word(void *keys, const unsigned char *even);
  42. // -- set odd control word, 8 bytes
  43. void set_odd_control_word(void *keys, const unsigned char *odd);
  44. // -- get control words, 8 bytes each
  45. //void get_control_words(void *keys, unsigned char *even, unsigned char *odd);
  46. // -- decrypt many TS packets
  47. // This interface is a bit complicated because it is designed for maximum speed.
  48. // Please read doc/how_to_use.txt.
  49. int decrypt_packets(void *keys, unsigned char **cluster);
  50. #endif