Giter Site home page Giter Site logo

j-schultz / rtp.jitter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alpartis/rtp.jitter

0.0 0.0 0.0 39 KB

jitter buffer for RTP using c++ and STL only. Has no external dependencies. Suitable for Android NDK as well as other typical platforms.

Makefile 1.11% C++ 98.89%

rtp.jitter's Introduction

project:    rtp.jitter
owner:      [email protected]
license:    MIT open source

Coding style/standards guidelines are important.  The standards that
will be enforced are summarized as follows:

1. indent with 4 spaces (no tabs allowed)
2. Unix line endings
3. NO Hungarian notation

With exceptions noted above, standards for this project follow much
of Linux kernel and Google guidelines:

    https://www.kernel.org/doc/Documentation/CodingStyle
    http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

 helpful commentary on this topic:

    http://www.linuxjournal.com/article/5780
    http://thundernet.com/alanpartis/articles/standards.shtml



-----

design discussion:

    this is a jitter buffer for RTP packets based on C++11 and STL.

    Memory management is something to be wary of; we will store our own
    pointer to given packets in our buffer and will return copies of these
    pointers when packets are popped off the buffer.  In the case of a
    buffer reset, or similar activity, we will go ahead and delete any
    packets in our buffer at the time.

    This implementation assumes that it is operating in a multi-threaded
    environment and syncronizes all operations/methods.

    Requirements:
        R0: eliminate effects of jitter in RTP packet arrival
        R1: detect and track missing packets in RTP stream
        R2: allow configuration of depth and packet size (in milliseconds)
        R3: track and report ongoing jitter stats:
                dropped packets
                out of order packets
                missed packets
                jitter (lifetime)
                max jitter (lifetime)
                current depth

    The RTPJitter will manage an internal buffer of RTP frames.  The application
    layer adds and removes packets from this buffer through the .push() and
    .pop() interface.  It is up to the application to manage and schedule this
    process on its own thread.

    A jitter buffer introduces a configured delay in the delivery and
    processing of packets; this is the "depth" in milliseconds of the buffer.
    Once the first packet is received into an empty buffer, the "depth" timer
    starts.  Once it expires, packets will be delivered upon request in the
    .pop() function until the buffer becomes empty again.

    The remaining logic involves how to handle newly arriving packets and
    handle the exception cases: missing or out-of-order packets.  ... and how
    to detect and address jitter.

    Jitter will be calculated as the mean deviation from the expected based on
    details, definitions, and sample code from RFC3550 section 6.4.1 and
    Appendix A.8.

    The jitter buffer will not examine, or differentiate, packets based on SSRC.


    note 1 - we use a std::deque to implement the internal buffer because it
        allows us to ignore the details of memory management for the buffer
        as it may grow and shrink.


rtp.jitter's People

Contributors

alpartis 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.