[jitsi-dev] [libjitsi] Implements SSRC rewriting (experimental). (#63)

You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/libjitsi/pull/63

-- Commit Summary --

  * Implements SSRC rewriting (experimental).

-- File Changes --

    M src/org/jitsi/impl/neomedia/MediaStreamImpl.java (42)
    M src/org/jitsi/impl/neomedia/RawPacket.java (44)
    A src/org/jitsi/impl/neomedia/transform/SsrcRewritingEngine.java (1090)
    M src/org/jitsi/service/neomedia/MediaStream.java (15)

-- Patch Links --

https://github.com/jitsi/libjitsi/pull/63.patch
https://github.com/jitsi/libjitsi/pull/63.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/63

+ @Override
+ public RawPacket transform(RawPacket pkt)
+ {
+ if (!initialized || pkt == null)
+ {
+ return pkt;
+ }
+
+ // Use the SSRC of the RTP packet to find which
+ // <tt>SsrcGroupRewriter</tt> to use.
+ int ssrc = pkt.getSSRC();
+ SsrcGroupRewriter ssrcGroupRewriter
+ = origin2rewriter.get(ssrc);
+
+ // If there is an <tt>SsrcGroupRewriter</tt>, rewrite the
+ // package, otherwise return it unaltered.

s/package/packet/

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/63/files#r41470954

+ // class with static methods so that we don't have to create
+ // new RawPacket's each time we want to use those methods.
+ // For example, PacketBufferUtils sounds like an appropriate
+ // name for this class.
+ RawPacket p = new RawPacket(
+ inRTCPPacket.data,
+ inRTCPPacket.offset,
+ inRTCPPacket.length);
+
+ int ssrc = p.getRTCPSSRC();
+
+ SsrcGroupRewriter ssrcGroupRewriter
+ = origin2rewriter.get(ssrc);
+
+ // If there is an <tt>SsrcGroupRewriter</tt>, rewrite
+ // the package, otherwise include it unaltered.

s/package/packet/

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/63/files#r41470998

Merged #63.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/63#event-450457465