{"id":923,"date":"2023-03-28T22:17:49","date_gmt":"2023-03-28T14:17:49","guid":{"rendered":"https:\/\/www.fanyamin.com\/wordpress\/?p=923"},"modified":"2023-03-28T22:17:49","modified_gmt":"2023-03-28T14:17:49","slug":"h-264-packetization-types","status":"publish","type":"post","link":"https:\/\/www.fanyamin.com\/wordpress\/?p=923","title":{"rendered":"H.264 packetization types"},"content":{"rendered":"<p>\u5728\u89c6\u9891\u4f1a\u8bae\u4e2d H264 \u7684 NAL: Network Abstraction Layer \u5305\u7c7b\u578b\u57fa\u672c\u4e0a\u6709\u4e09\u79cd<br \/>\n1) Single NAL unit \u5355\u4e2a NALU<br \/>\n2) STAP-A: Single Time Aggregation Packet \u5355\u65f6\u95f4\u805a\u5408\u5305<br \/>\n3) FU-A: Fragmentation Unit Packet \u7247\u6bb5\u5355\u5143\u5305<\/p>\n<pre><code>\/\/ The packetization types that we support: single, aggregated, and fragmented.\nenum H264PacketizationTypes {\n  kH264SingleNalu,  \/\/ This packet contains a single NAL unit.\n  kH264StapA,       \/\/ This packet contains STAP-A (single time\n                    \/\/ aggregation) packets. If this packet has an\n                    \/\/ associated NAL unit type, it&#039;ll be for the\n                    \/\/ first such aggregated packet.\n  kH264FuA,         \/\/ This packet contains a FU-A (fragmentation\n                    \/\/ unit) packet, meaning it is a part of a frame\n                    \/\/ that was too large to fit into a single packet.\n};\n\n\/\/ Packetization modes are defined in RFC 6184 section 6\n\/\/ Due to the structure containing this being initialized with zeroes\n\/\/ in some places, and mode 1 being default, mode 1 needs to have the value\n\/\/ zero. https:\/\/crbug.com\/webrtc\/6803\nenum class H264PacketizationMode {\n  NonInterleaved = 0,  \/\/ Mode 1 - STAP-A, FU-A is allowed\n  SingleNalUnit        \/\/ Mode 0 - only single NALU allowed\n};\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u89c6\u9891\u4f1a\u8bae\u4e2d H264 \u7684 NAL: Network Abstraction Layer \u5305\u7c7b\u578b\u57fa\u672c\u4e0a\u6709\u4e09\u79cd 1) Single NAL unit \u5355\u4e2a NALU 2) STAP-A: Single Time Aggregation Packet \u5355\u65f6\u95f4\u805a\u5408\u5305 3) FU-A: Fragmentation Unit Packet \u7247\u6bb5\u5355\u5143\u5305 \/\/ The packetization types that we support: single, aggregated, and fragmented. enum H264PacketizationTypes { kH264SingleNalu, \/\/ This packet contains a single NAL unit. kH264StapA, \/\/ This packet contains [&hellip;] <a class=\"read-more\" href=\"https:\/\/www.fanyamin.com\/wordpress\/?p=923\" title=\"Permanent Link to: H.264 packetization types\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-923","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/923"}],"collection":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=923"}],"version-history":[{"count":1,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/923\/revisions"}],"predecessor-version":[{"id":925,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/923\/revisions\/925"}],"wp:attachment":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}