You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Packetize always sets the Marker bit for the last payload in a sequence. I don't believe that that is semantically appropriate. The marker bit is defined to be application- (codec-)specific.
For applications which send either no packets or occasional comfort-noise packets during silence, the first packet of a talkspurt, that is, the first packet after a silence period during which packets have not been transmitted contiguously, SHOULD be distinguished by setting the marker bit in the RTP data header to one. The marker bit in all other packets is zero. The beginning of a talkspurt MAY be used to adjust the playout delay to reflect changing network delays. Applications without silence suppression MUST set the marker bit to zero.
Packetizer option sets packetizer global option, but codec specific marker bit should be set for each packet.
So, I don't think packetizer option cleanly and generally implement this. (Disabling marker bit of all packets can be implemented, but can't implement codec specific marker bit logic)
Activity
Sean-Der commentedon Oct 24, 2025
This is a tough one, I am not sure how to solve it.
I think the responsibility should lie with the
Payloader. Instead of returning a[][]bytemaybe it should return a[]PacketizedThen
Packetizedwould be{[]byte, markerBit}? That would give all the codecs the ability to make as they please.@at-wat What do you think? Also try to solve
https://github.com/pion/rtp/issues/70Sean-Der commentedon Oct 24, 2025
Maybe we could try solving this with a
With..?I will try it a few different ways and see what feels best.
JoTurk commentedon Oct 24, 2025
@Sean-Der I had this idea when i was fixing #111 #305 to fix this too, with an option.
But i don't remember why i actually didn't commit to it 🤔
at-wat commentedon Oct 28, 2025
Packetizer option sets packetizer global option, but codec specific marker bit should be set for each packet.
So, I don't think packetizer option cleanly and generally implement this. (Disabling marker bit of all packets can be implemented, but can't implement codec specific marker bit logic)
JoTurk commentedon Oct 28, 2025
I thought about implementing it like a filter WithMarkerBitFilter((packet byte[]) => bool), but thinking about it now it feels like a bad hack 🤔