Repository navigation
docs: per-package MIGRATE.md as the single source for breaking changes #5801
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
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
48a7914
quest(m1): claim migrate
kixelated 50fa718
docs: add a MIGRATE.md skeleton to every published package
kixelated ebb12f6
docs: backfill MIGRATE.md for the core and Rust media crates
kixelated efed304
docs: backfill MIGRATE.md for JS media, moq-ffi, and moq-c
kixelated 28bb534
docs: backfill MIGRATE.md for the Python and Go wrappers
kixelated 974f8b0
docs: backfill MIGRATE.md for the Kotlin, Swift, and Dart wrappers
kixelated cb38943
docs: backfill MIGRATE.md for moq-relay, moq-cli, and moq-gst
kixelated ea3c9c5
docs: make the upgrade page a rollout guide and MIGRATE.md index
kixelated 4e53df7
docs: tell breaking PRs to add a MIGRATE.md entry; complete the quest
kixelated 916e363
quest: record the settled MIGRATE.md decisions
kixelated 5302093
Merge main into quest/m1/migrate
kixelated e5790cf
Merge branch 'main' of github.com:moq-dev/moq into migrate-ready
kixelated 5ee34d3
docs: before/after snippets for every rewritable MIGRATE.md break
kixelated 4e3e59c
Merge branch 'main' of github.com:moq-dev/moq into migrate-ready
kixelated 0140221
docs(moq-net): migrate custom transports to send groups (#5711)
kixelated c8bee58
docs: add the moq-clock-macros MIGRATE.md stub
kixelated b263856
docs: move the --hop cluster-id note to moq-cli, name the MOQ_HOP exc…
kixelated b51918e
docs: fold binary migration links into existing paragraphs, fix revie…
kixelated 68a3ec5
Merge branch 'main' of github.com:moq-dev/moq into migrate-ready
kixelated c4d42d7
docs(kio): drop the wait -> Pending mapping, wait is still public
kixelated 91fbb22
docs(py): await the video consumer subscription in MIGRATE.md
kixelated d4bcb6e
Merge remote-tracking branch 'origin/main' into fix-5801
kixelated 5716e12
docs: migrate archive per-track durations (#5715)
kixelated 4a0fe7b
Merge remote-tracking branch 'origin/main' into fix-5801
kixelated c3b414d
docs: migrate auth Access caps, webtransport rollout, binding gaps
kixelated e64ce32
docs(upgrade): read MIGRATE.md at the target release's tag
kixelated 67d400e
Merge origin/main into quest/m1/migrate
kixelated e6720b7
Merge remote-tracking branch 'origin/main' into fix-5801
kixelated 92b6982
docs(moq-video): close the encoder color example's code fence
kixelated 3bb56be
Merge remote-tracking branch 'origin/main' into HEAD
kixelated 8f05b04
Merge commit 'd76e44404ec73455808bb1a5adc6d6ef1d760690' into HEAD
kixelated 1b2e8ad
docs: migrate #5806 catalog version and #5815 data-track breaks
kixelated ef891da
docs: migrate #5695 auth, #5770 datagrams, #5845 reserve, #5727 C++ n…
kixelated a7506f6
docs(swift): use the id label in the native codec snippet
kixelated 515b4f6
docs(upgrade): read released sections from main's MIGRATE.md
kixelated 6cbec52
docs: add moq-ice's guide and moq-net's lingering finish
kixelated ab9adf5
docs(auth): name the webtransport transport in @moq/auth's guide
kixelated e5f31a0
Merge branch 'main' of github.com:moq-dev/moq into HEAD
kixelated 7ad3bbe
docs: migrate #5700 announced instances, #5777 recv bandwidth, #5803,…
kixelated 3c233fe
docs(bindings): cover #5700 and #5803 in each binding guide
kixelated 0114be2
docs(upgrade): snippets are for breaks that change code or config
kixelated f7d63e5
docs: MIGRATE.md entries give a migration path
kixelated 1263aac
docs(migrate): migration paths in moq-ffi, moq-c, C++ guides
kixelated 5e8dd2c
docs(migrate): migration paths in Kotlin and Dart guides
kixelated 0fef09e
docs(migrate): migration paths in Go and Swift guides
kixelated 92911dd
docs(migrate): migration paths in Python and moq-net guides
kixelated 3a48f7c
docs(migrate): migration paths in moq-mux and QUIC runtime guides
kixelated b74f7f8
docs(migrate): migration paths in JavaScript guides
kixelated 2d4f96a
docs(migrate): migration paths in the remaining Rust guides
kixelated 94d8aef
Merge origin/main into quest/m1/migrate
kixelated 1438bdf
docs(migrate): lb_id alone is a valid load-balancer setting
kixelated bc4f487
docs(upgrade): upgrade verifiers before issuing capped grants
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Migrating the C++ moq library | ||
|
|
||
| How to update your code for each breaking change, newest first. | ||
|
|
||
| ## Unreleased | ||
|
|
||
| ### Subscriptions carry group ranges (#5732) | ||
|
|
||
| `Subscription::group_start` and `group_end` are replaced by `ranges`, a list of `Range` whose ends are an `Anchor` (an absolute group and frame, or a count of groups before the latest), and an optional `order`. | ||
| To start at group `n`, pass one range starting at the absolute anchor for group `n`, frame 0. | ||
|
|
||
| ### Receive estimates come from `Session::recv_bandwidth` (#5777) | ||
|
|
||
| The connection stats no longer carry a receive estimate. | ||
| Hold the consumer `Session::recv_bandwidth` returns to request PROBE, read it with `peek()` or wait with `changed()`, and `cancel()` it to stop. | ||
|
|
||
| ```cpp | ||
| auto bandwidth = session->recv_bandwidth(); | ||
| auto rate = bandwidth ? bandwidth->peek() : std::nullopt; | ||
| ``` | ||
|
|
||
| ### `AnnouncedBroadcast::available()` waits for the next publisher instance (#5700) | ||
|
|
||
| The first call returns the broadcast serving the path, as before. | ||
| Each later call waits for the next instance to take over the path, instead of returning whatever serves it now. | ||
|
|
||
| ### A timed track refuses a group that rewinds (#5803) | ||
|
|
||
| Writing a frame fails with `TimestampMismatch` when a group's first frame starts before a lower-sequence group's, or after a higher one's. | ||
| A publisher whose timeline restarts publishes a new broadcast instead. | ||
|
|
||
| ### Bandwidth reserves a track's demand (#5845) | ||
|
|
||
| `Bandwidth::reserve` takes the track's `demand()` instead of the producer, and no longer fails: pass `ok(track->demand())`. | ||
|
|
||
| ### Generated types drop the `Moq` prefix (#5727) | ||
|
|
||
| `moq::MoqFoo` is `moq::Foo`, the name the aliases already gave it. | ||
| `moq::expected` is `tl::expected` at every C++ standard instead of `std::expected` under C++23, and `MOQ_ABI`, `MOQ_ABI_NAME`, and `MOQ_IMPLEMENTATION` are gone. | ||
|
|
||
| ### Media subscribe and fetch take a catalog rendition (#5834) | ||
|
|
||
| `moq::MediaTrackConfig` and `moq::MediaGroupConfig` replace `name` and `container` with a `moq::Rendition` and follow its broadcast and track themselves. | ||
|
|
||
| ```cpp | ||
| auto media = ok(moq::MediaTrackConsumer::subscribe(broadcast, {moq::Rendition::kVideo{id, video}}).get()); | ||
| ``` | ||
|
|
||
| ### Native codecs have audio and video types (#5694) | ||
|
|
||
| `BroadcastProducer::encode_audio` / `encode_video` are `moq::AudioProducer::init` / `moq::VideoProducer::init`, which take a `moq::MediaCatalogProducer`. | ||
| The audio track name moves into `AudioEncoderOutput::track`, and a zero `frame_duration_us` takes the codec's own frame. | ||
| `BroadcastConsumer::decode_audio` / `decode_video` are `moq::AudioConsumer::subscribe` / `moq::VideoConsumer::subscribe`, taking the broadcast first. | ||
| Producers expose subscriber state only through `demand()`, and a video `gop` is a `moq::VideoGop` keyframe variant. | ||
| `moq::AudioEncoder` / `moq::VideoEncoder` encode without publishing. | ||
|
|
||
| ```cpp | ||
| moq::AudioEncoderOutput output{moq::AudioCodec::opus()}; | ||
| output.track = "audio"; | ||
| auto catalog = ok(moq::MediaCatalogProducer::init(broadcast)); | ||
| auto audio = ok(moq::AudioProducer::init(catalog, input, output, nullptr)); | ||
| ``` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Migrating the obs-moq plugin | ||
|
|
||
| How to update your OBS setup for each breaking change, newest first. | ||
|
|
||
| ## Unreleased | ||
|
kixelated marked this conversation as resolved.
|
||
|
|
||
| ### The video bitrate follows the bandwidth estimate (#5845) | ||
|
|
||
| The configured video bitrate is now a ceiling: the encoder drops below it when the uplink narrows, with no opt-out. | ||
| An encoder shared with a recording follows too, so give the recording its own encoder to keep it at the full rate. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| # Migrating the Dart moq package | ||
|
|
||
| How to update your code for each breaking change, newest first. | ||
|
|
||
| ## Unreleased | ||
|
|
||
| ### Subscriptions carry group ranges (#5732) | ||
|
|
||
| `Subscription.groupStart` and `groupEnd` are replaced by `ranges`, a list of `Range` whose ends are an `Anchor` (an absolute group and frame, or a count of groups before the latest), and an optional `order`. | ||
| To start at group `n`, pass one range starting at the absolute anchor for group `n`, frame 0. | ||
|
|
||
| ### Receive estimates come from `Session.recvBandwidth` (#5777) | ||
|
|
||
| The connection stats no longer carry a receive estimate. | ||
| Hold the consumer `Session.recvBandwidth` returns to request PROBE, read it with `peek()` or wait with `changed()`, and `cancel()` it to stop. | ||
| Replace `stats().estimatedRecvRateBps` with `recvBandwidth()?.peek()`. | ||
|
|
||
| ### `AnnouncedBroadcast.available()` waits for the next publisher instance (#5700) | ||
|
|
||
| The first call returns the broadcast serving the path, as before. | ||
| Each later call waits for the next instance to take over the path, instead of returning whatever serves it now. | ||
|
|
||
| ### A timed track refuses a group that rewinds (#5803) | ||
|
|
||
| Writing a frame fails with `TimestampMismatch` when a group's first frame starts before a lower-sequence group's, or after a higher one's. | ||
| A publisher whose timeline restarts publishes a new broadcast instead. | ||
|
|
||
| ### Bandwidth reserves a track's demand (#5845) | ||
|
|
||
| `Bandwidth.reserve` takes the track's `demand()` instead of the producer, and no longer throws. | ||
| Pass `demand: track.demand()` instead of `track: track`. | ||
|
|
||
| ### Media subscribe and fetch take a catalog rendition (#5834) | ||
|
|
||
| `media.TrackConfig` and `media.GroupConfig` replace `name` and `container` with a `rendition` (`media.VideoRendition` or `media.AudioRendition`) and follow its broadcast and track themselves. | ||
|
|
||
| ```dart | ||
| final config = media.TrackConfig(rendition: media.VideoRendition(id: id, config: video)); | ||
| ``` | ||
|
|
||
| ### Background panics are reported (#5562) | ||
|
|
||
| A panic in a background task throws `TaskMoqException` with the panic message as `reason`, and other objects keep running. | ||
|
|
||
| ### Announcements are events with a restart | ||
|
|
||
| `Moq.announcements()` is `announced(...).updates()`, a `Stream<AnnounceEvent>`: `AnnounceEventStart`, `AnnounceEventUpdate`, `AnnounceEventEnd`, or `AnnounceEventRestart`, each carrying an `Announce`. | ||
| `AnnounceUpdate` is gone. | ||
| A restart means another publisher instance now serves the prefix: request the path again. | ||
|
|
||
| ```dart | ||
| moq.announced().updates().listen((event) { | ||
| switch (event) { | ||
| case AnnounceEventStart(:final announce) || | ||
| AnnounceEventRestart(:final announce): | ||
| subscribe(announce.prefix); | ||
| default: | ||
| } | ||
| }); | ||
| ``` | ||
|
|
||
| ### "Epoch" means only the publisher epoch (#5146) | ||
|
|
||
| `Moq.epoch` is `connects`. | ||
|
|
||
| ### The consume origin is `consume` | ||
|
|
||
| `ConnectOptions.subscribe` is `consume`. | ||
| A value the native side cannot use fails `Moq.connect` with `ConfigMoqException`, including a bad bind address. | ||
| A server request takes its origins in `accept(publish: ..., consume: ...)`, where null inherits the server's origin. | ||
|
|
||
| ### Data tracks wrap a track | ||
|
|
||
| `BroadcastProducer.publishJsonSnapshot` / `publishJsonStream`, the binary variants, and the matching consumers are gone. | ||
| Create the track, then wrap it with `package:moq/json.dart` (or `package:moq/flate.dart` for opaque bytes). | ||
|
|
||
| ```dart | ||
| final state = moq_json.SnapshotProducer( | ||
| broadcast: broadcast, | ||
| track: broadcast.publishTrack(name: 'state', info: null), | ||
| config: moq_json.SnapshotConfig(), | ||
| ); | ||
| ``` | ||
|
|
||
| ### Media lives in `package:moq/media.dart` | ||
|
|
||
| `BroadcastProducer.publishAudio`, `publishVideo`, `publishContainer`, their `OnTrack` and `Stream` variants, `setVideoProperties`, and `setCatalogSection`, and the consumer's catalog and media subscriptions, are gone, along with the `MediaProducer`, `MediaConsumer`, and `MediaGroupConsumer` aliases. | ||
| Use `media.TrackProducer.audio` / `video`, `ContainerProducer`, `CatalogProducer`, `CatalogConsumer.subscribe`, `TrackConsumer.subscribe`, and `GroupConsumer.fetch`. | ||
| Producers drop `name`, `used`, and `unused`; read them through `demand()`. | ||
|
|
||
| ```dart | ||
| final audio = media.TrackProducer.audio(broadcast: broadcast, target: media.Named(null), init: init); | ||
| ``` | ||
|
|
||
| ### Container byte-stream importers take an init record | ||
|
|
||
| `media.ContainerStreamProducer` takes a `ContainerStreamInit` holding the format instead of a bare format. | ||
| Its optional `timebase`, also on `ContainerInit`, shares one source's offset across container imports. | ||
| Replace `format: ...` with `init: media.ContainerStreamInit(format: ...)`. | ||
|
|
||
| ### Timestamps are optional | ||
|
|
||
| `Frame.timestampUs` and `Datagram.timestampUs` are nullable, null on a frame read from an untimed track, and so are their `timestamp` getters. | ||
| A raw write to a timed track without a timestamp throws `TimestampMismatch` instead of going out at 0, and whole-frame media writes require one. | ||
| `media.CatalogProducer.now()` samples the broadcast clock for local-event stamps. | ||
| Pass `timestampUs` when writing to a timed track, and handle a null `timestamp` when reading. | ||
|
|
||
| ### Subscriber staleness is `maxDelay` | ||
|
|
||
| `Subscription.maxAgeUs` / `maxAge` is `maxDelayUs` / `maxDelay`. | ||
| `TrackInfo.maxAge` keeps its name: it is the publisher's retention. | ||
|
|
||
| ### Error payloads are named `reason` | ||
|
|
||
| Exceptions that carried a positional string (`Transport`, `Internal`, `Connect`, ...) name it `reason`. | ||
| Read `reason` instead of `v0`. | ||
|
|
||
| ### `Transport` gains `webTransport` | ||
|
|
||
| A WebTransport session reports `MoqTransport.webTransport`; `quic` now means raw QUIC only, so an exhaustive `switch` needs one more case. | ||
| Match `MoqTransport.webTransport` wherever you matched `MoqTransport.quic`. | ||
|
|
||
| ### `stalled` is `enabled` (#4915) | ||
|
|
||
| `media.Video.stalled` is `enabled`, defaulting to true with the meaning inverted, and `media.Audio` gains `enabled`. | ||
| Replace `!video.stalled` with `video.enabled`. | ||
|
|
||
| ### Routes have one cost (#4661) | ||
|
|
||
| `MoqRoute.cold` is removed; drop the `cold` argument. | ||
|
|
||
| ### `BroadcastProducer.finish()` is removed (#4152) | ||
|
|
||
| Call `close()` instead. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.