Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Unified Diff: webrtc/common_types.h

Issue 2954503002: Implement FrameMarking header extension support
Patch Set: remove unneeded change in comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/common_types.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 7b62dbca09bf63fc2e301f92e967ce62ce2ad488..5f9fe8fc7f63bc5ba85645dbb909bb47d06727b6 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -716,6 +716,47 @@ struct PlayoutDelay {
int max_ms;
};
+// For Frame Marking RTP Header Extension:
+// https://tools.ietf.org/html/draft-ietf-avtext-framemarking-04
+// This extensions provides meta-information about the RTP streams outside the
+// encrypted media payload, an RTP switch can do codec-agnostic
+// selective forwarding without decrypting the payload
+// o S: Start of Frame (1 bit) - MUST be 1 in the first packet in a
+// frame; otherwise MUST be 0.
+// o E: End of Frame (1 bit) - MUST be 1 in the last packet in a frame;
+// otherwise MUST be 0.
+// o I: Independent Frame (1 bit) - MUST be 1 for frames that can be
+// decoded independent of prior frames, e.g. intra-frame, VPX
+// keyframe, H.264 IDR [RFC6184], H.265 IDR/CRA/BLA/RAP [RFC7798];
+// otherwise MUST be 0.
+// o D: Discardable Frame (1 bit) - MUST be 1 for frames that can be
+// discarded, and still provide a decodable media stream; otherwise
+// MUST be 0.
+// o B: Base Layer Sync (1 bit) - MUST be 1 if this frame only depends
+// on the base layer; otherwise MUST be 0. If no scalability is
+// used, this MUST be 0.
+// o TID: Temporal ID (3 bits) - The base temporal layer starts with 0,
+// and increases with 1 for each higher temporal layer/sub-layer. If
+// no scalability is used, this MUST be 0.
+// o LID: Layer ID (8 bits) - Identifies the spatial and quality layer
+// encoded. If no scalability is used, this MUST be 0 or omitted.
+// When omitted, TL0PICIDX MUST also be omitted.
+// o TL0PICIDX: Temporal Layer 0 Picture Index (8 bits) - Running index
+// of base temporal layer 0 frames when TID is 0. When TID is not 0,
+// this indicates a dependency on the given index. If no scalability
+// is used, this MUST be 0 or omitted. When omitted, LID MUST also
+// be omitted.
+struct FrameMarks {
+ bool start_of_frame;
+ bool end_of_frame;
+ bool independent;
+ bool discardable;
+ bool base_layer_sync;
+ uint8_t temporal_layer_id;
+ uint8_t layer_id;
+ int16_t tl0_pic_idx;
+};
+
// Class to represent RtpStreamId which is a string.
// Unlike std::string, it can be copied with memcpy and cleared with memset.
// Empty value represent unset RtpStreamId.
@@ -791,6 +832,11 @@ struct RTPHeaderExtension {
// TODO(danilchap): Update url from draft to release version.
StreamId stream_id;
StreamId repaired_stream_id;
+
+ // For Frame Marking RTP Header Extension:
+ // https://tools.ietf.org/html/draft-ietf-avtext-framemarking-04#page-4
+ bool hasFrameMarks;
+ FrameMarks frame_marks = {false, false, false, false, false, 0, 0, 0};
};
struct RTPHeader {
« no previous file with comments | « no previous file | webrtc/common_types.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698