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.

cbuf.h 795B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef CBUF_H
  2. #define CBUF_H
  3. #include <netdb.h>
  4. // Circular buffer
  5. typedef struct {
  6. pthread_mutex_t *lock;
  7. char *name;
  8. int size; /* Buffer size, must be (bufsize % 1316) == 0 */
  9. int pos; /* Up to where the buffer is filled */
  10. int writepos; /* Up to where the buffer is get */
  11. void *buffer; /* The buffer data */
  12. uint64_t input;
  13. uint64_t output;
  14. int pos_wrapped;
  15. int debug_get;
  16. } CBUF;
  17. CBUF *cbuf_init(int buffer_size, char *name);
  18. void cbuf_free(CBUF **buffer);
  19. int cbuf_fill(CBUF *b, uint8_t *data, int datasize);
  20. void *cbuf_get(CBUF *b, int size, int *ret_datasize);
  21. void *cbuf_peek(CBUF *b, int size, int *ret_datasize);
  22. void cbuf_copy(CBUF *src, CBUF *dest);
  23. int cbuf_data_size(CBUF *b);
  24. void cbuf_poison(CBUF *b, char poison_byte);
  25. void cbuf_dump(CBUF *b);
  26. #endif