h264parse: Add more NAL types for debugging output.

Register more NAL unit types so that they are dumped
by name in the debug output instead of being labelled
'Invalid'
This commit is contained in:
Jan Schmidt 2015-07-29 22:59:56 +10:00
parent 55373e21a8
commit c1b0d818bb
2 changed files with 13 additions and 4 deletions

View file

@ -127,9 +127,11 @@ typedef enum {
* @GST_H264_NAL_FILLER_DATA: Filler data nal lunit
* @GST_H264_NAL_SPS_EXT: Sequence parameter set (SPS) extension NAL unit
* @GST_H264_NAL_PREFIX_UNIT: Prefix NAL unit
* @GST_H264_NAL_SUBSET_SPS: Subset sequence parameter set (SPS) NAL unit
* @GST_H264_NAL_SUBSET_SPS: Subset sequence parameter set (SSPS) NAL unit
* @GST_H264_NAL_DEPTH_SPS: Depth parameter set (DPS) NAL unit
* @GST_H264_NAL_SLICE_AUX: Auxiliary coded picture without partitioning NAL unit
* @GST_H264_NAL_SLICE_EXT: Coded slice extension NAL unit
* @GST_H264_NAL_SLICE_DEPTH: Coded slice extension for depth or 3D-AVC texture view
*
* Indicates the type of H264 Nal Units
*/
@ -151,8 +153,10 @@ typedef enum
GST_H264_NAL_SPS_EXT = 13,
GST_H264_NAL_PREFIX_UNIT = 14,
GST_H264_NAL_SUBSET_SPS = 15,
GST_H264_NAL_DEPTH_SPS = 16,
GST_H264_NAL_SLICE_AUX = 19,
GST_H264_NAL_SLICE_EXT = 20
GST_H264_NAL_SLICE_EXT = 20,
GST_H264_NAL_SLICE_DEPTH = 21
} GstH264NalUnitType;
/**

View file

@ -492,13 +492,18 @@ static const gchar *nal_names[] = {
"Filler Data",
"SPS extension",
"Prefix",
"SPS Subset"
"SPS Subset",
"Depth Parameter Set",
"Reserved", "Reserved",
"Slice Aux Unpartitioned",
"Slice Extension",
"Slice Depth/3D-AVC Extension"
};
static const gchar *
_nal_name (GstH264NalUnitType nal_type)
{
if (nal_type <= GST_H264_NAL_SUBSET_SPS)
if (nal_type <= GST_H264_NAL_SLICE_DEPTH)
return nal_names[nal_type];
return "Invalid";
}