aboutsummaryrefslogtreecommitdiff
path: root/plugins/rtp/src/device.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2021-12-18 21:43:12 +0100
committerMarvin W <git@larma.de>2021-12-18 21:43:12 +0100
commit4f80a9f5ccea5eaf6a78a841af417c597eb7db73 (patch)
treefe57f53210e0bdd2b36dffcebbf516eca74c7911 /plugins/rtp/src/device.vala
parent09cd060889c27f51d43e1e2dc127c2a13595234d (diff)
downloaddino-4f80a9f5ccea5eaf6a78a841af417c597eb7db73.tar.gz
dino-4f80a9f5ccea5eaf6a78a841af417c597eb7db73.zip
RTP: Correctly handle timestamp after re-enabling a stream
Diffstat (limited to 'plugins/rtp/src/device.vala')
-rw-r--r--plugins/rtp/src/device.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/rtp/src/device.vala b/plugins/rtp/src/device.vala
index 89d499ed..de46bea4 100644
--- a/plugins/rtp/src/device.vala
+++ b/plugins/rtp/src/device.vala
@@ -96,7 +96,7 @@ public class Dino.Plugins.Rtp.Device : MediaDevice, Object {
return element;
}
- public Gst.Element? link_source(PayloadType? payload_type = null, uint ssrc = Random.next_int(), int seqnum_offset = -1) {
+ public Gst.Element? link_source(PayloadType? payload_type = null, uint ssrc = Random.next_int(), int seqnum_offset = -1, uint32 timestamp_offset = 0) {
if (!is_source) return null;
if (element == null) create();
links++;
@@ -122,8 +122,12 @@ public class Dino.Plugins.Rtp.Device : MediaDevice, Object {
var payload = (Gst.RTP.BasePayload) ((Gst.Bin) payloaders[payload_type][ssrc]).get_by_name(@"$(id)_$(codec)_$(ssrc)_rtp_pay");
payload.ssrc = ssrc;
payload.seqnum_offset = seqnum_offset;
+ if (timestamp_offset != 0) {
+ payload.timestamp_offset = timestamp_offset;
+ }
pipe.add(payloaders[payload_type][ssrc]);
codec_tees[payload_type].link(payloaders[payload_type][ssrc]);
+ debug("Payload for %s with %s using ssrc %u, seqnum_offset %u, timestamp_offset %u", media, codec, ssrc, seqnum_offset, timestamp_offset);
}
if (!payloader_tees.has_key(payload_type)) {
payloader_tees[payload_type] = new HashMap<uint, Gst.Element>();