Giter Club home page Giter Club logo

dvbsi4j's Introduction

License

dvbsi4j uses dual license, GPL or commercial license.

Introduction

dvbsi4j is an efficient and scalable Java-based software SDK. This will make the analysis of PSI SI of digital TV more simple and intuitive. RD can be liberated from the heavy PSI SI table analysis and only need to focus on business logic .

Features

Scalable SDK

dvbsi4j can simply analyze the general syntax in DTV SPEC and generate SDK. Current support bellow DTV SPEC,You can simply extend it.

Please see DVB Syntax for detail. Here is sample for create SDK GeneratorSDK

Customize PID/ Table ID filter

User can customize the PID filters easily for runtime usage.

dvbConfig.json is a configuration file in json format, you can configure PID Table ID filter here, and you can change it through API at runtime. please reference DecodePATPMT.java for detail, this example show how to set PMT PID filter after receive PAT.

Simple API to access Section/Descriptor data

/**
 * <code>
 * program_association_section () {                         - ❶ root node
 *     table_id                        8       uimsbf  
 *     section_syntax_indicator        1       bslbf   
 *     noused                          1       bslbf   
 *     reserved                        2       bslbf   
 *     section_length                  12      uimsbf  
 *     transport_stream_id             16      uimsbf  
 *     reserved                        2       bslbf   
 *     version_number                  5       uimsbf  
 *     current_next_indicator          1       bslbf   
 *     section_number                  8       uimsbf  
 *     last_section_number             8       uimsbf  
 *     
 *     for (i=0; i<N;i++) /*programs* / {                   - ❷ default named programs
 *                                                               user can change it in syntax
 *         program_number              16      uimsbf       - ❸
 *         reserved                    3       bslbf   
 *         if(program_number == 0x0) {
 *             network_PID             13      uimsbf  
 *         }
 *         else {
 *             program_map_PID         13      uimsbf       - ❹
 *         }
 *     }
 *     
 *     CRC_32                          32      rpchof  
 * }
 * </code>
 */

log.info("\n" + section.dumpTextResult());
log.info("\n" + section.dumpSectionRawPacket());
List<NodeValue> root     = (List<NodeValue>) section.getRoot();      /* ❶ */

List<NodeValue> programsNodeList = TSUtil.getObjectByName(root, "programs"); /* ❷ */

/** loop each program in programs */
for (NodeValue _programNode : programsNodeList) {
    List<NodeValue> program = _programNode.getValue();
    int     program_number = TSUtil.getObjectByName(program, "program_number"); /* ❸ */

    if (program_number != 0) {
        int program_map_PID = TSUtil.getObjectByName(program, "program_map_PID"); /** ❹ */

        /** dynamic set PMT PID filter */
        section.getBitStream().getPIDFilter().addPidFilter(program_map_PID, "PMT pid=>" + program_map_PID);
    }
}

Sample text result from DecodePATPMT.java :
DecodePATPMT:88  
table_id                                          0          [0x0         ]
section_syntax_indicator                          1          [0x1         ]
noused                                            0          [0x0         ]
reserved                                          3          [0x3         ]
section_length                                    37         [0x25        ]
transport_stream_id                               32778      [0x800A      ]
reserved                                          3          [0x3         ]
version_number                                    5          [0x5         ]
current_next_indicator                            1          [0x1         ]
section_number                                    0          [0x0         ]
last_section_number                               0          [0x0         ]
programs                                                                      /* ❷ */
  program                                         
    program_number                                0          [0x0         ]
    reserved                                      7          [0x7         ]
    network_PID                                   16         [0x10        ]
  program                                         
    program_number                                33984      [0x84C0      ]
    reserved                                      7          [0x7         ]
    program_map_PID                               1020       [0x3FC       ]
  program                                         
    program_number                                33472      [0x82C0      ]
    reserved                                      7          [0x7         ]
    program_map_PID                               1030       [0x406       ]
  program                                         
    program_number                                34048      [0x8500      ]
    reserved                                      7          [0x7         ]
    program_map_PID                               1040       [0x410       ]
  program                                         
    program_number                                33664      [0x8380      ]
    reserved                                      7          [0x7         ]
    program_map_PID                               1060       [0x424       ]
  program                                         
    program_number                                32842      [0x804A      ]
    reserved                                      7          [0x7         ]
    program_map_PID                               1010       [0x3F2       ]
  program                                         
    program_number                                34112      [0x8540      ]
    reserved                                      7          [0x7         ]
    program_map_PID                               1070       [0x42E       ]
CRC_32                                            3893584241 [0xE8136171  ]

Sample

Sample

dvbsi4j's People

Contributors

fy-create avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.