Coder Social home page Coder Social logo

gfto / libtsfuncs Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 14.0 180 KB

libtsfuncs is a library for mpeg PSI parsing and generation.

Home Page: http://georgi.unixsol.org/programs/libtsfuncs/

License: MIT License

Makefile 0.48% C 99.35% Shell 0.17%

libtsfuncs's People

Contributors

amdmi3 avatar gmakedonski avatar lars18th avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

libtsfuncs's Issues

Compiler warning about left shift

Hi,

My compiler complained about a shift operation, and I believe the line 495 of descs.c needs a small change, as << has a higher precedence than &:

Replacing

lcn          = data[i+2] &~ 0xc0 << 8;          // 11xxxxxx

by

lcn          = (data[i+2] & ~0xc0) << 8;                // 11xxxxxx

looks more like the original intent of the code line.

Lack of DVB-T NIT public functions

Hi,

In the current "tsfuncs.h" header file, only functions for DVB-C are available:

  • ts_nit_add_frequency_list_descriptor_cable();
  • ts_nit_add_cable_delivery_descriptor();

I suggest to add the corresponding:

  • ts_nit_add_frequency_list_descriptor_terrestrial();
  • ts_nit_add_terrestrial_delivery_descriptor();

Thank you!

typo and check corrections

There is some little patch:

diff --git a/crc.c b/crc.c
index 6f9af50..3b86af1 100644
--- a/crc.c
+++ b/crc.c
@@ -46,7 +46,7 @@ uint32_t ts_crc32(uint8_t *data, int data_size) {
        return crc;
 }
 
-u_int32_t ts_crc32_section(struct ts_section_header *section_header) {
+uint32_t ts_crc32_section(struct ts_section_header *section_header) {
        return ts_crc32(section_header->section_data, section_header->section_data_len);
 }
 
diff --git a/tsfuncs.c b/tsfuncs.c
index 6d78479..84b94cf 100644
--- a/tsfuncs.c
+++ b/tsfuncs.c
@@ -265,7 +265,7 @@ uint8_t *ts_packet_header_parse(uint8_t *ts_packet, struct ts_header *ts_header)
        if (!ts_header->payload_field && ts_header->adapt_len > 183)
                goto return_error;
 
-       if (ts_header->payload_offset > TS_MAX_PAYLOAD_SIZE) // Validity check
+       if (ts_header->payload_offset > TS_PACKET_SIZE) // Validity check
                goto return_error;
 
        ts_header->payload_size = TS_PACKET_SIZE - ts_header->payload_offset;

HbbTV

Hi @gfto ,

I'm interested in add support for the HbbTV descriptor (AIT stream).
You know about the easier way to generate it?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.