[vlc-devel] [RFC PATCH 2/7] packetizer: h264: expose nal type in h264_nal.h

Thomas Guillem thomas at gllm.fr
Thu Apr 23 19:30:50 CEST 2015


---
 modules/packetizer/h264.c     | 23 -----------------------
 modules/packetizer/h264_nal.h | 23 +++++++++++++++++++++++
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index d260901..778b439 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -147,29 +147,6 @@ struct decoder_sys_t
     cc_data_t cc_next;
 };
 
-enum nal_unit_type_e
-{
-    NAL_UNKNOWN = 0,
-    NAL_SLICE   = 1,
-    NAL_SLICE_DPA   = 2,
-    NAL_SLICE_DPB   = 3,
-    NAL_SLICE_DPC   = 4,
-    NAL_SLICE_IDR   = 5,    /* ref_idc != 0 */
-    NAL_SEI         = 6,    /* ref_idc == 0 */
-    NAL_SPS         = 7,
-    NAL_PPS         = 8,
-    NAL_AU_DELIMITER= 9
-    /* ref_idc == 0 for 6,9,10,11,12 */
-};
-
-/* Defined in H.264 annex D */
-enum sei_type_e
-{
-    SEI_PIC_TIMING = 1,
-    SEI_USER_DATA_REGISTERED = 4,
-    SEI_RECOVERY_POINT = 6
-};
-
 #define BLOCK_FLAG_PRIVATE_AUD (1 << BLOCK_FLAG_PRIVATE_SHIFT)
 
 static block_t *Packetize( decoder_t *, block_t ** );
diff --git a/modules/packetizer/h264_nal.h b/modules/packetizer/h264_nal.h
index 7028fcf..6358fe6 100644
--- a/modules/packetizer/h264_nal.h
+++ b/modules/packetizer/h264_nal.h
@@ -43,6 +43,29 @@
 #define PROFILE_H264_MVC_STEREO_HIGH      128
 #define PROFILE_H264_MVC_MULTIVIEW_HIGH   118
 
+enum nal_unit_type_e
+{
+    NAL_UNKNOWN = 0,
+    NAL_SLICE   = 1,
+    NAL_SLICE_DPA   = 2,
+    NAL_SLICE_DPB   = 3,
+    NAL_SLICE_DPC   = 4,
+    NAL_SLICE_IDR   = 5,    /* ref_idc != 0 */
+    NAL_SEI         = 6,    /* ref_idc == 0 */
+    NAL_SPS         = 7,
+    NAL_PPS         = 8,
+    NAL_AU_DELIMITER= 9
+    /* ref_idc == 0 for 6,9,10,11,12 */
+};
+
+/* Defined in H.264 annex D */
+enum sei_type_e
+{
+    SEI_PIC_TIMING = 1,
+    SEI_USER_DATA_REGISTERED = 4,
+    SEI_RECOVERY_POINT = 6
+};
+
 /* Parse the SPS/PPS Metadata and convert it to annex b format */
 int convert_sps_pps( decoder_t *p_dec, const uint8_t *p_buf,
                      uint32_t i_buf_size, uint8_t *p_out_buf,
-- 
2.1.3




More information about the vlc-devel mailing list