Conversation
d1ea31c to
d734710
Compare
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
=========================================
Coverage ? 86.64%
=========================================
Files ? 33
Lines ? 7772
Branches ? 0
=========================================
Hits ? 6734
Misses ? 1038
Partials ? 0
Continue to review full report at Codecov.
|
MushMal
left a comment
There was a problem hiding this comment.
Mostly minor comments but please take a look at the BO issue
| NULL, | ||
| &pSampleStreamingSession->pVideoRtcRtpTransceiver)); | ||
|
|
||
| CHK_STATUS(transceiverOnBandwidthEstimation(pSampleStreamingSession->pVideoRtcRtpTransceiver, |
There was a problem hiding this comment.
MINOR: Suggest to think through how the bandwidth handler could differentiate between the transceivers. Either have different handlers for audio and video or in this simple case customData could be the differentiator (bad).
There was a problem hiding this comment.
I think users will pass a handle to their encoders as customData, and go from there. If I was doing GStreamer I would pass a *GSTElement and have it configure everytime.
| * RtcOnBandwidthEstimation is a KVS specific method | ||
| * | ||
| */ | ||
| typedef VOID (*RtcOnBandwidthEstimation)(UINT64, DOUBLE); |
There was a problem hiding this comment.
One more important question. Can the comment contain the link or something to the RFC describing the DOUBLE?
There was a problem hiding this comment.
In https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00#section-2.2 it is given as a mantissa + exponent. I chose DOUBLE just because of the return value of ldexp
| CHK_STATUS(resendPacketOnNack(&rtcpPacket, pKvsPeerConnection)); | ||
| } else if (rtcpPacket.header.packetType == RTCP_PACKET_TYPE_PAYLOAD_SPECIFIC_FEEDBACK && | ||
| rtcpPacket.header.receptionReportCount == RTCP_FEEDBACK_MESSAGE_TYPE_APPLICATION_LAYER_FEEDBACK && | ||
| isRembPacket(rtcpPacket.payload, rtcpPacket.payloadLength) == STATUS_SUCCESS) |
There was a problem hiding this comment.
CHK_STATUS(isRembPacket(...))
There was a problem hiding this comment.
I don't want it to set the return value. We can have some packets that are this value, and then we just want to skip (but not actually an error). I want to keep iterating the compound packet.
There was a problem hiding this comment.
Oh, of course. You could use STATUS_SUCCEEDED(isRembPacket(...)). Not a big issue
| UINT64 item; | ||
|
|
||
| CHK_STATUS(rembValueGet(pRtcpPacket->payload, pRtcpPacket->payloadLength, &maximumBitRate, NULL, &ssrcListLen)); | ||
| CHK(NULL != (pSsrcList = (PUINT32) MEMCALLOC(1, SIZEOF(UINT32) * ssrcListLen)), STATUS_STORE_OUT_OF_MEMORY); |
There was a problem hiding this comment.
How big do you expect the buffer to be? If this is anything less than 100K you can simply use stack buffer without dynamic alloc
There was a problem hiding this comment.
You ok with me doing a uint32_t ssrcList[255] = {}?
| } | ||
|
|
||
| CleanUp: | ||
| SAFE_MEMFREE(pSsrcList); |
There was a problem hiding this comment.
In case of on-the-stack buffer you don't need this line
| mantissa &= RTCP_PACKET_REMB_MANTISSA_BITMASK; | ||
|
|
||
| exponent = pPayload[RTCP_PACKET_REMB_IDENTIFIER_OFFSET + 5] >> 2; | ||
| maximumBitRate = ldexp(mantissa, exponent); |
There was a problem hiding this comment.
We should think of adding these things to PICs #commondefs
5cd45dc to
8aba01d
Compare
Add new callback to RtcRtpTransceiver 'onBandwidthEstimation'. This is now fired everytime we get an REMB packet. In the future we will also fire this for sender side estimation, but at this time nothing is implemented. Resolves #114
| CHK_STATUS(resendPacketOnNack(&rtcpPacket, pKvsPeerConnection)); | ||
| } else if (rtcpPacket.header.packetType == RTCP_PACKET_TYPE_PAYLOAD_SPECIFIC_FEEDBACK && | ||
| rtcpPacket.header.receptionReportCount == RTCP_FEEDBACK_MESSAGE_TYPE_APPLICATION_LAYER_FEEDBACK && | ||
| isRembPacket(rtcpPacket.payload, rtcpPacket.payloadLength) == STATUS_SUCCESS) |
There was a problem hiding this comment.
Oh, of course. You could use STATUS_SUCCEEDED(isRembPacket(...)). Not a big issue
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
==========================================
- Coverage 86.95% 86.64% -0.32%
==========================================
Files 33 33
Lines 7698 7773 +75
==========================================
+ Hits 6694 6735 +41
- Misses 1004 1038 +34
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
=========================================
Coverage ? 86.67%
=========================================
Files ? 33
Lines ? 7769
Branches ? 0
=========================================
Hits ? 6734
Misses ? 1035
Partials ? 0
Continue to review full report at Codecov.
|
Add new callback to RtcRtpTransceiver 'onBandwidthEstimation'.
This is now fired everytime we get an REMB packet. In the future we will
also fire this for sender side estimation, but at this time nothing is
implemented.
Resolves #114