libtsfuncs is a library for mpeg PSI parsing and generation. https://georgi.unixsol.org/programs/libtsfuncs/
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.

tsfuncs_pat_test.c 747B

123456789101112131415161718192021222324252627282930313233343536373839
  1. void ts_test_pat() {
  2. struct ts_pat *pat = ts_pat_init_empty();
  3. ts_pat_dump(pat);
  4. ts_pat_check_generator(pat, 0);
  5. ts_pat_add_program(pat, 1, 0x100);
  6. ts_pat_dump(pat);
  7. /*
  8. // ts_pat_check_generator(pat);
  9. struct ts_pat *pat1 = calloc(1, sizeof(struct ts_pat));
  10. ts_pat_init(pat1, pat->packet_data);
  11. ts_pat_dump(pat1);
  12. ts_pat_free(pat1);
  13. */
  14. /*
  15. ts_pat_add_program(pat, 1, 0x100);
  16. ts_pat_add_program(pat, 2, 0x100);
  17. ts_pat_add_program(pat, 3, 0x100);
  18. ts_pat_dump(pat);
  19. ts_pat_check_generator(pat);
  20. ts_pat_del_program(pat, 3);
  21. ts_pat_dump(pat);
  22. ts_pat_check_generator(pat);
  23. // int i;
  24. // for (i=0;i<10;i++) {
  25. // ts_pat_add_program(pat, i+10, (i+5)*10);
  26. // }
  27. ts_pat_dump(pat);
  28. ts_pat_check_generator(pat);
  29. */
  30. ts_pat_free(pat);
  31. }