Skip to content

Commit

Permalink
add mimeType to metadata
Browse files Browse the repository at this point in the history
since the mapping from payload type to the codec mime type
is nontrivial in environments like workers.

Defined similar to webrtc-stats:
  https://w3c.github.io/webrtc-stats/#dom-rtccodecstats-mimetype
  • Loading branch information
fippo committed Oct 10, 2023
1 parent 7721c15 commit 52909d9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ dictionary RTCEncodedVideoFrameMetadata {
sequence<unsigned long> contributingSources;
long long timestamp; // microseconds
unsigned long rtpTimestamp;
DOMString mimeType;
};
</pre>

Expand Down Expand Up @@ -381,7 +382,7 @@ dictionary RTCEncodedVideoFrameMetadata {
<dd>
<p>
The media presentation timestamp (PTS) in microseconds of raw frame, matching the
{{VideoFrame/timestamp}} for raw frames which correspond to this frame.
{{VideoFrame/timestamp}} for raw frames which correspond to this frame.
</p>
</dd>
<dt>
Expand All @@ -394,6 +395,15 @@ dictionary RTCEncodedVideoFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
</p>
</dd>
<dt>
<dfn dict-member>mimeType</dfn> <span class="idlMemberType">DOMString</span>
</dt>
<dd>
<p>
The codec MIME media type/subtype defined in the IANA media types registry
[[!IANA-MEDIA-TYPES]], e.g. video/VP8.
</p>
</dd>
</dl>


Expand Down Expand Up @@ -473,6 +483,7 @@ dictionary RTCEncodedAudioFrameMetadata {
sequence&lt;unsigned long&gt; contributingSources;
short sequenceNumber;
unsigned long rtpTimestamp;
DOMString mimeType;
};
</pre>
### Members ### {#RTCEncodedAudioFrameMetadata-members}
Expand Down Expand Up @@ -525,6 +536,15 @@ dictionary RTCEncodedAudioFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
</p>
</dd>
<dt>
<dfn dict-member>mimeType</dfn> <span class="idlMemberType">DOMString</span>
</dt>
<dd>
<p>
The codec MIME media type/subtype defined in the IANA media types registry
[[!IANA-MEDIA-TYPES]], e.g. audio/opus.
</p>
</dd>
</dl>

## <dfn interface>RTCEncodedAudioFrame</dfn> interface ## {#RTCEncodedAudioFrame-interface}
Expand Down

0 comments on commit 52909d9

Please sign in to comment.