Skip to content

Commit

Permalink
Re-add data encodings/frames
Browse files Browse the repository at this point in the history
  • Loading branch information
pthatcherg committed Sep 6, 2019
1 parent ba1512e commit 17c2c3a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 11 deletions.
45 changes: 38 additions & 7 deletions index.bs
Expand Up @@ -1503,7 +1503,7 @@ Each stream offer contains the following properties:
the streaming session. Can be used by the receiver to request the
media session.

: friendly-name
: display-name
:: An optional name intended to be shown to a user, such that the
receiver may allow the user to choose which media streams to
receive, or if they are received automatically by the receiver,
Expand All @@ -1523,14 +1523,23 @@ Each stream offer contains the following properties:
default duration. They can differ by codec and potentially other
properties, but should be different encodings of the same video.

: data
:: A list of data encodings offered. A data encoding is a series of
data frames. Encodings define properties needed by the
receiver to know how to interpret the encoding, such as data type and
default duration. They can differ by data type and potentially other
properties, but should be different encodings of the same data.
(For encodings of different data, use distinct media streams,
not distinct encodints with the same media stream).


Each audio encoding offered defines the following properties:

: encoding-id
:: Identifies the audio encoding being offered. Must be unique within
the media stream. Can be the receiver to request an encoding.
the media stream.

: codec
: codec-name
:: The name of the codec used by the encoding.

: time-scale
Expand All @@ -1547,9 +1556,9 @@ Each video encoding offered defines the following properties:

: encoding-id
:: Identifies the video encoding being offered. Must be unique within
the media stream. Can be the receiver to request an encoding.
the media stream.

: codec
: codec-name
:: The name of the codec used by the encoding.

: time-scale
Expand All @@ -1567,6 +1576,25 @@ Each video encoding offered defines the following properties:
video-frame messagse smaller by not including the rotation for
video-frame messages that have the default rotation.

Each data encoding offered defines the following properties:

: encoding-id
:: Identifies the data encoding being offered. Must be unique within
the media stream.

: data-type-name
:: The name of the data type used by the encoding.

: time-scale
:: The time scale used by all data frames. This allows senders to
make data-frame messages smaller by not including the time scale
in each one.

: default-duration:
:: The duration of an data frame . This allows senders to make
data-frame messagse smaller by not including the duration for
data-frame messages that have the default duration.

After receiving a streaming-session-start-request message, a receiver
should send back a streaming-session-start-response message with the
following properties:
Expand All @@ -1593,6 +1621,9 @@ Each stream request contains the following properties:
should not exceed the maximum frame rate and should attempt to
send at the target bitrate, possibly exceeding it by a small amount.

: data (optional)
:: The requested data encoding, by encoding ID


During a streaming session, the receiver can modify the requests it
made for encodings by sending a streaming-session-modify-request
Expand Down Expand Up @@ -1718,7 +1749,7 @@ ending at the last dependent frame.
inferred from the properties of the encoding.


Data {#media-streaming-data}
Data {#streaming-data}
------------------------------------

Media senders may send timed data to media receivers by sending [=data-frame=] messages (see
Expand All @@ -1732,7 +1763,7 @@ QUIC streams, but more than one data frame may be sent in one QUIC stream if
that makes sense for a specific type of data.

: encoding-id
:: Identifies the media encoding to which this data frame belongs. This can be
:: Identifies the data encoding to which this data frame belongs. This can be
used to reference properties of the encoding such as the type of data and
time scale. Referencing properties of the encoding through the encoding id
helps to avoid sending duplicate information in every frame.
Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -2777,7 +2777,7 @@ <h3 class="heading settled" data-level="9.2" id="streaming-sessions"><span class
<p>An optional name intended to be shown to a user, such that the
receiver may allow the user to choose which media streams to
receive, or if they are received automatically by the receiver,
give the user some information about what th e media stream is.</p>
give the user some information about what the media stream is.</p>
<dt data-md>audio
<dd data-md>
<p>A list of audio encodings offered. An audio encoding is a series
Expand Down
38 changes: 35 additions & 3 deletions messages_appendix.cddl
Expand Up @@ -478,6 +478,7 @@ streaming-capabilities-response = {
streaming-capabilities = {
0: [* receive-audio-capability] ; receive-audio
1: [* receive-video-capability] ; receive-video
2: [* receive-data-capability] ; receive-data
}

format = {
Expand Down Expand Up @@ -513,6 +514,10 @@ receive-video-capability = {
? 8: bool ; supports-scaling
}

receive-data-capability = {
0: format ; data-type
}

; type key 134
streaming-session-start-request = {
request
Expand Down Expand Up @@ -560,32 +565,42 @@ streaming-session-terminate-event = {

media-stream-offer = {
1 : uint ; media-stream-id
? 2 : text ; friendly-name
? 2 : text ; display-name
? 3 : [1* audio-encoding-offer] ; audio
? 4 : [1* video-encoding-offer] ; video
? 5 : [1* data-encoding-offer] ; data
}

media-stream-request = {
1 : uint ; media-stream-id
? 2 : audio-encoding-request ; audio
? 3 : video-encoding-request ; video
? 4 : data-encoding-request ; data
}

audio-encoding-offer = {
1 : uint ; encoding-id
2 : text ; codec
2 : text ; codec-name
3 : uint ; time-scale
? 4 : uint ; default-duration
}

video-encoding-offer = {
1 : uint ; encoding-id
2 : text ; codec
2 : text ; codec-name
3 : uint ; time-scale
? 4 : uint ; default-duration
? 5 : video-rotation ; default-rotation
}

data-encoding-offer = {
1 : uint ; encoding-id
2 : text ; data-type-name
3 : uint ; time-scale
? 4 : uint ; default-duration
}


audio-encoding-request = {
1: uint ; encoding-id
}
Expand All @@ -596,6 +611,11 @@ video-encoding-request = {
? 3 : float32 ; max-frames-per-second
}

data-encoding-request = {
1: uint ; encoding-id
}


; type key 13
audio-frame = [
encoding-id: uint
Expand Down Expand Up @@ -626,6 +646,18 @@ video-frame-request = {
? 3: uint; highest-decoded-frame-sequence-number
}

; type key 15
data-frame = [
encoding-id: uint
sequence-number: uint
start-time: uint
payload: bytes
? optional: {
? 0: uint ; duration
? 1: media-time ; sync-time
}
]

ratio = [
antecedent: uint
consequent: uint
Expand Down

0 comments on commit 17c2c3a

Please sign in to comment.