Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/bin/srt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ source (`--connect`); `moq export srt` serves SRT to players or pushes to a
remote. The payload is MPEG-TS, so the same codecs and behavior as
[`import ts`](/bin/ts) apply: H.264/H.265 video and AAC, MP2, AC-3, E-AC-3, or
Opus audio. A lost or flagged-corrupt packet drops only its unit and the session
stays up; video freezes until the next keyframe that arrives intact. A unit
that arrives whole but does not decode ends the session with the cause.
stays up; video freezes until the next keyframe that arrives intact. A unit,
PES header, or adaptation field that arrives whole but does not parse ends the
session with the cause.

```bash
# Accept a contribution feed and publish it
Expand Down
11 changes: 7 additions & 4 deletions doc/bin/ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ Damage in the source is the importer's concern, not MoQ's. In semantic mode a
lost packet, or one the receiver flagged with the transport error indicator, is
dropped on its own PID, so video freezes until its next keyframe while the
other tracks carry on, and feed health (stalled streams, TR 101 290 counters)
is logged and reported without changing what publishes. A media unit that
arrives whole but does not decode ends the import with the cause.
is logged and reported without changing what publishes. A media unit, PES
header, or adaptation field that arrives whole but does not parse ends the
import with the cause: with neither loss nor the flag to explain it, the muxer
wrote it wrong. A packet or PES scrambled by conditional access is refused and
counted, and its stream resumes once it is clear, video at its next keyframe.
Passthrough carries damaged packets as they came.

## Evidence
Expand All @@ -225,7 +228,7 @@ details each grader and its negative controls.
| Whole PES (KLV, DVB AC-3) come back byte-equal outside PTS/DTS, at their placement | `just test ts --klv --strict`; [`pes_packet_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/pes_packet_test.rs) | Nightly, PR |
| MPEG-2 video decodes to the source's pictures | `just test ts --mpeg2`; [`routes_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/routes_test.rs) `mpeg2_video_rides_whole_and_survives_a_round_trip` | Nightly, PR |
| SCTE-35 and DSM-CC sections round-trip | [`export_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/export_test.rs) `scte35_fixtures_survive_roundtrip`; [`routes_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/routes_test.rs) `dsmcc_types_ride_as_sections` | PR |
| Refusals: PES clock fields, scrambling, ambiguous `0x86`, unclaimed PIDs | [`pes_packet_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/pes_packet_test.rs) `a_pes_with_a_field_no_rebase_reaches_refuses_its_stream`; [`routes_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/routes_test.rs) `ambiguous_streams_are_refused_and_latm_rides_whole`, `unclaimed_pids_count_once_the_pmt_is_in` | PR |
| Refusals: PES clock fields, scrambling, ambiguous `0x86`, unclaimed PIDs | [`pes_packet_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/pes_packet_test.rs) `a_pes_with_a_field_no_rebase_reaches_refuses_its_stream`; [`routes_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/routes_test.rs) `ambiguous_streams_are_refused_and_latm_rides_whole`, `unclaimed_pids_count_once_the_pmt_is_in`; [`import.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/import.rs) `scrambled_pes_is_refused_until_clear` | PR |
| DVB SI survives, on its own interval, pending versions dropped | [`export_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/export_test.rs) `service_layer_survives_roundtrip`, `si_pids_are_re_emitted_on_their_own_interval`; `just test ts-eit` | PR, Nightly |
| PMT revisions: streams joining and leaving, retypes, PID reuse | `just test ts --revision --strict`; [`revision_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/revision_test.rs) | Nightly, PR |
| PAT changes: moved PMT, programs added and dropped | [`revision_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/revision_test.rs) `a_moved_pmt_moves_behind_a_new_pat`; [`programs.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/programs.rs) `programs_follow_the_pat` | PR |
Expand Down Expand Up @@ -261,7 +264,7 @@ details each grader and its negative controls.
| Passthrough: a missing group leaves its time out and counts one gap; a cut group loses only its tail; a late run is dropped alone | [`release_test.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/release_test.rs) `a_group_never_delivered_leaves_its_time_out`, `a_group_cut_short_loses_only_its_tail`, `an_object_past_its_deadline_is_a_gap_in_that_release_only` | PR |
| Passthrough: an overflowing path keeps surviving packets in place through the source's last | `just test ts --passthrough --rate 7000000 --queue 250ms` | Nightly only |
| Source damage drops only the damaged PID's unit | [`import.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/import.rs) `damaged_tei_recovers`, `video_drops_a_partial_access_unit_across_a_continuity_break` | PR |
| A whole unit that does not decode ends the import | [`import.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/import.rs) `undecodable_nal_ends_the_import`, `malformed_opus_pes_ends_the_import_unpublished` | PR |
| A whole unit or header that does not parse ends the import | [`import.rs`](https://github.com/moq-dev/moq/blob/main/rs/moq-mux/src/container/ts/import.rs) `undecodable_nal_ends_the_import`, `malformed_opus_pes_ends_the_import_unpublished`, `malformed_headers_end_the_import`, `invalid_adaptation_fields_end_the_import_on_media_and_clock_pids` | PR |

### Not claimed

Expand Down
40 changes: 0 additions & 40 deletions quest/m1/ts-packet-abort.md

This file was deleted.

5 changes: 3 additions & 2 deletions rs/moq-mux/src/container/ts/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/// Why a TS import or export stopped.
///
/// A damaged packet, PES, or access unit is not one: the importer counts it in its
/// [`stats`](super::stats) and carries on.
/// A packet lost or flagged by the transport error indicator is not one: the importer counts
/// the unit it breaks in its [`stats`](super::stats) and carries on. An intact packet, header,
/// or unit that does not parse is one: [`Error::Malformed`].
#[derive(Clone, Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
Expand Down
Loading