Data tracks core - #990
Open
ladvoc wants to merge 9 commits into
Open
Conversation
ladvoc
force-pushed
the
ladvoc/data-track-core
branch
from
September 4, 2026 16:04
f15a229 to
b7b6532
Compare
ladvoc
marked this pull request as ready for review
September 4, 2026 16:07
ladvoc
force-pushed
the
ladvoc/data-track-core
branch
from
September 4, 2026 22:58
b7b6532 to
1c85018
Compare
For consistency with other client SDKs.
ladvoc
force-pushed
the
ladvoc/data-track-core
branch
from
September 8, 2026 21:55
5572d61 to
dc69ba0
Compare
cnderrauber
reviewed
Sep 11, 2026
| "time" | ||
| ) | ||
|
|
||
| const timestampRate = 90_000 |
Contributor
There was a problem hiding this comment.
rename to clockRate? as same as media clockrate
| } | ||
|
|
||
| func (t timestamp) isBefore(other timestamp) bool { | ||
| return int32(t-other) < 0 |
Contributor
There was a problem hiding this comment.
nitpick: Both a.isBefore(b) and b.isBefore(a) are true when the distance of a and b is 2^31 . Maybe add check:
if t-other == 1<<31 {
return t < other
}
| func (d *depacketizer) frameFromSingle(packet dtp.Packet, options depacketizerPushOptions) depacketizerPushResult { | ||
| var result depacketizerPushResult | ||
| if len(d.partials) >= options.maxPartialFrames { | ||
| result.drop = d.evictOldest(packet.FrameNumber) |
Contributor
There was a problem hiding this comment.
The single frame has not been appended to the partials, do we still need to evict one?
| } | ||
|
|
||
| func finalize(frameNumber uint16, partial *partialFrame, endSequence uint16) depacketizerPushResult { | ||
| received := uint16(len(partial.payloads)) |
Contributor
There was a problem hiding this comment.
We can add a quick check if received != 1 + endSequece - partial.StartSequence for the incomplete frame and return earlier.
| value uint16 | ||
| } | ||
|
|
||
| func (a *handleAllocator) get() (trackHandle, bool) { |
Contributor
There was a problem hiding this comment.
Use an explicit error like handle reaches limits?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds core types (e.g., info, frame, schema, etc.) and packetizer/depacketizer.
Areas to review:
Closes BOT-541