Repository navigation
feat: end a broadcast with close() in every language #4031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6b1026e
f884e9b
c3cce03
415ffc1
4cc3a7f
8ef24b6
f84ed1d
89af8ab
9b618ee
8b0c592
eef8cb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ video, _ := broadcast.EncodeVideo( | |
| ) | ||
| _ = video.Write(moq.VideoFrame{TimestampUs: pts, Data: rgba}) | ||
| _ = broadcast.Announce(moq.Route{}) | ||
| broadcast.Finish() // keep the producer reachable while publishing, then finish explicitly | ||
| broadcast.Close() // keep the producer reachable while publishing, then close explicitly | ||
| ``` | ||
|
|
||
| For locally encoded media, call `MediaProducer.Flush(timestampUs)` after `WriteFrame` with the same broadcast-clock PTS. It measures catalog jitter at the transport handoff. File, pipe, and network imports should omit `Flush`; built-in encoders observe their own output. | ||
|
|
@@ -76,7 +76,8 @@ Call `media.Discontinuity()` when the source seeks, pauses, or changes its time | |
| The three advertising operations: `client.CreateBroadcast(path)` (or | ||
| `origin.CreateBroadcast`) returns an unannounced producer, invisible to everyone; | ||
| `broadcast.Announce(route)` / `broadcast.Unannounce()` own that exact-path | ||
| advertisement; `origin.Dynamic(prefix, route)` claims `prefix` and every | ||
| advertisement, and `broadcast.Close()` ends the broadcast for good (a second | ||
| call is a no-op; `Finish` is its deprecated alias); `origin.Dynamic(prefix, route)` claims `prefix` and every | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Remove deprecated API mentions from the documentation. Each of these lines names
As per coding guidelines, 📍 Affects 3 files
🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| path beneath it (`""` for everything). Hold the returned `OriginDynamic` | ||
| while the claim should stay advertised, and reject the requests you will not | ||
| serve. A route is a capability, not an inventory. `Announced(options)` combines | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: moq-dev/moq
Length of output: 4731
🏁 Script executed:
Repository: moq-dev/moq
Length of output: 21202
🤖 get_repo_knowledge executed:
get_repo_knowledge moq-dev/moq /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/learnings /tmp/coderabbit-repo-knowledge/moq-dev-moq-f8e40a3a/conventionsLength of output: 47799
Remove deprecated broadcast-finish aliases from
/doc.The
/docconvention requires removing prose that mentions deprecated items. Retain the close descriptions and remove only the alias references.Suggested documentation fix
📝 Committable suggestion
🤖 Prompt for AI Agents