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

Unified Diff: webrtc/modules/include/module_common_types.h

Issue 2528343002: H.264 packetization mode 0 (try 3) (Closed)
Patch Set: Changed from enum to enum class Created 4 years 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
Index: webrtc/modules/include/module_common_types.h
diff --git a/webrtc/modules/include/module_common_types.h b/webrtc/modules/include/module_common_types.h
index a5ea5c8e2d7da8327573eb74b1795087dd8f0085..1fbca8e5dc39401f9f58afb94fe8f3b7208f15e5 100644
--- a/webrtc/modules/include/module_common_types.h
+++ b/webrtc/modules/include/module_common_types.h
@@ -260,6 +260,15 @@ enum H264PacketizationTypes {
// that was too large to fit into a single packet.
};
+// Packetization modes are defined in RFC 6184 section 6
+// Due to the structure containing this being initialized with zeroes
+// in some places, and mode 1 being default, mode 1 needs to have the value
+// zero. https://crbug.com/webrtc/6803
+enum class H264PacketizationMode {
+ NonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed
+ SingleNalUnit // Mode 0 - only single NALU allowed
+};
+
struct NaluInfo {
uint8_t type;
int sps_id;
@@ -273,14 +282,19 @@ struct NaluInfo {
const size_t kMaxNalusPerPacket = 10;
struct RTPVideoHeaderH264 {
- uint8_t nalu_type; // The NAL unit type. If this is a header for a
- // fragmented packet, it's the NAL unit type of
- // the original data. If this is the header for an
- // aggregated packet, it's the NAL unit type of
- // the first NAL unit in the packet.
+ // The NAL unit type. If this is a header for a
+ // fragmented packet, it's the NAL unit type of
+ // the original data. If this is the header for an
+ // aggregated packet, it's the NAL unit type of
+ // the first NAL unit in the packet.
+ uint8_t nalu_type;
+ // The packetization type of this buffer - single, aggregated or fragmented.
H264PacketizationTypes packetization_type;
NaluInfo nalus[kMaxNalusPerPacket];
size_t nalus_length;
+ // The packetization mode of this transport. Packetization mode
+ // determines which packetization types are allowed when packetizing.
+ H264PacketizationMode packetization_mode;
hbos 2016/12/02 10:21:26 (Thinking its strange that this information is in
hta-webrtc 2016/12/02 11:09:01 The code that has the header doesn't have a link t
hbos 2016/12/02 11:58:42 Acknowledged.
};
union RTPVideoTypeHeader {

Powered by Google App Engine
This is Rietveld 408576698