{"id":19433566,"url":"https://github.com/edporras/sigen","last_synced_at":"2026-05-10T23:58:40.801Z","repository":{"id":34003868,"uuid":"37759055","full_name":"edporras/sigen","owner":"edporras","description":"Legacy MPG PSI and DVB SI table generation library written in C++","archived":false,"fork":false,"pushed_at":"2022-05-02T21:12:06.000Z","size":1801,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"devel","last_synced_at":"2025-02-18T05:15:23.529Z","etag":null,"topics":["broadcast","dvb","dvb-si","mpg-psi"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edporras.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-20T05:32:31.000Z","updated_at":"2020-03-30T08:00:26.000Z","dependencies_parsed_at":"2022-07-13T21:35:06.001Z","dependency_job_id":null,"html_url":"https://github.com/edporras/sigen","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edporras%2Fsigen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edporras%2Fsigen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edporras%2Fsigen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edporras%2Fsigen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edporras","download_url":"https://codeload.github.com/edporras/sigen/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240613712,"owners_count":19829214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcast","dvb","dvb-si","mpg-psi"],"created_at":"2024-11-10T14:40:17.269Z","updated_at":"2026-05-10T23:58:35.763Z","avatar_url":"https://github.com/edporras.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"C++ Si Generation Library 2.8.2\n===============================\n\nA C++ [MPG PSI](https://en.wikipedia.org/wiki/Program-specific_information) and\n[DVB SI](https://en.wikipedia.org/wiki/Digital_Video_Broadcasting)\ntable generation library based on the ETSI EN 300 468 and ISO/IEC\n13818-1 standards. The library has support most tables: CAT, PAT, PMT,\nNIT, SDT, BAT, TDT, TOT, RST, and ST plus many MPG and DVB descriptors.\n\nI wrote the initial version of this library ca. 1999-2000 and updated\nit around 2003 with a few minor tweaks done since then. It was used in\nproduction but nobody had since been maintaining it so I was given\npermission to open the source so I could make changes to it if\nneeded.\n\nA Doxygen-generated reference [is available](http://edporras.github.io/sigen/docs/).\n\nThis is very legacy so now it's mainly a C++ feature playground. Also,\nsome of the logic could definitely be re-thought as it was done based\non customer requirements.\n\n\nBuilding\n========\n\n```\n  autoreconf -i\n  ./configure\n  make\n```\n\nSample Usage\n============\n\nSee tests/*.cc for more thorough examples of building various tables. Here's a snippet:\n\n```c++\n\n    // some dummy data\n    const ui16 network_pid = 0x20;\n    const ui16 xport_stream_id = 0x10;\n    const int num_services = 10;\n\n    // the binary table data will be written to a TStream\n    TStream t;\n\n    // Create an MPG Program Association Table\n    PAT pat( xport_stream_id, 0x01 );\n\n    // override the default maximum section length.. (optional)\n    pat.setMaxSectionLen( 900 );\n\n    // add the services (programs).. first, set the network pid (required for\n    // some systems)\n    pat.addNetworkPid( network_pid );\n\n    for (int i = 0; i \u003c num_services; i++)\n    {\n        // each service has an id and pmt pid associated with it..\n        ui16 service_id = 100 + i;\n        ui16 pmt_pid = 200 + i;\n\n        pat.addProgram( service_id, pmt_pid );\n    }\n\n    // for debug output\n    DUMP(pat);\n\n    // this builds the binary section data onto the TStream object\n    pat.buildSections(t);\n\n    //\n    // create a DVB Time and Date Table with the current time\n    TDT tdt;\n    DUMP(tdt);     // debug output to stderr to see table data\n\n    // write table data onto the TStream\n    tdt.buildSections(t);\n\n    //\n    // we now have a TStream that holds a list\u003cSection *\u003e..\n\n    DUMP(t);       // debug - dump the contents of the TStream binary data\n\n    // you can write it to disk, packetize it, etc\n    t.write(\"tables.ts\");\n```\n\nProgram output:\n\n\n```\n- - PAT Dump - -\nTable id            : 0\nSection syn. ind.   : 0x1\nrsvrd. future use   : 0\nreserved            : 0x3\nTable length        : 49 (0x31)\nXport stream id     : 16 (0x10)\nreserved            : 0x3\nVersion number      : 0x1\nCurrent next ind.   : 0x1\n\n Program number      : 0 (0)\n reserved            : 0x7\n Pid                 : 32 (0x20)\n\n Program number      : 100 (0x64)\n reserved            : 0x7\n Pid                 : 200 (0xc8)\n\n Program number      : 101 (0x65)\n reserved            : 0x7\n Pid                 : 201 (0xc9)\n\n Program number      : 102 (0x66)\n reserved            : 0x7\n Pid                 : 202 (0xca)\n\n Program number      : 103 (0x67)\n reserved            : 0x7\n Pid                 : 203 (0xcb)\n\n Program number      : 104 (0x68)\n reserved            : 0x7\n Pid                 : 204 (0xcc)\n\n Program number      : 105 (0x69)\n reserved            : 0x7\n Pid                 : 205 (0xcd)\n\n Program number      : 106 (0x6a)\n reserved            : 0x7\n Pid                 : 206 (0xce)\n\n Program number      : 107 (0x6b)\n reserved            : 0x7\n Pid                 : 207 (0xcf)\n\n Program number      : 108 (0x6c)\n reserved            : 0x7\n Pid                 : 208 (0xd0)\n\n Program number      : 109 (0x6d)\n reserved            : 0x7\n Pid                 : 209 (0xd1)\n\n\n- - TDT Dump - -\nTable id            : 0x70\nSection syn. ind.   : 0\nrsvrd. future use   : 0x1\nreserved            : 0x3\nTable length        : 5 (0x5)\nUTC                 : 0xdf69 (6/20/2015), 19:00:17\n\n-- Section dump - num_sections: 2 --\n\n- sec: 0, length: 56, size (max): 900, data:\n[0000] 00 b0 35 00 10 c3 00 00 00 00 e0 20 00 64 e0 c8   ..5........ .d..\n[0016] 00 65 e0 c9 00 66 e0 ca 00 67 e0 cb 00 68 e0 cc   .e...f...g...h..\n[0032] 00 69 e0 cd 00 6a e0 ce 00 6b e0 cf 00 6c e0 d0   .i...j...k...l..\n[0048] 00 6d e0 d1 4f 73 46 ef                           .m..OsF.\n\n- sec: 1, length: 8, size (max): 8, data:\n[0000] 70 70 05 df 69 19 00 17                           pp..i...\n\n```\n\n\nKnown Problems\n==============\n\nThere are a few descriptors that needed to be implemented - see\n[TODO](TODO). They were not required by the customer so they never\nmade it in. Regardless, this library was used on at least two\nproduction systems (N.A. and Spain) and to generate tables for\nvarious testing environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedporras%2Fsigen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedporras%2Fsigen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedporras%2Fsigen/lists"}