diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-03-04 12:33:30 +0100 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-03-04 12:33:30 +0100 |
commit | 7c27675cb85790652320cf231055ffee830ee595 (patch) | |
tree | 5c8fd561adae5678a61c7cb2fe33b18800c3789d /src/h264.c | |
parent | e3dbaea50b75bf2da6e7bc5baa1e82ba5adcd655 (diff) |
h264: add function to convert NAL unit type to a string
Diffstat (limited to 'src/h264.c')
-rw-r--r-- | src/h264.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -180,3 +180,26 @@ int h264_packetize(uint64_t rtp_ts, const uint8_t *buf, size_t len, return err; } + + +const char *h264_nalunit_name(int type) +{ + switch (type) { + + case H264_NAL_SLICE: return "SLICE"; + case H264_NAL_DPA: return "DPA"; + case H264_NAL_DPB: return "DPB"; + case H264_NAL_DPC: return "DPC"; + case H264_NAL_IDR_SLICE: return "IDR_SLICE"; + case H264_NAL_SEI: return "SEI"; + case H264_NAL_SPS: return "SPS"; + case H264_NAL_PPS: return "PPS"; + case H264_NAL_AUD: return "AUD"; + case H264_NAL_FILLER_DATA: return "FILLER"; + + case H264_NAL_FU_A: return "FU-A"; + case H264_NAL_FU_B: return "FU-B"; + } + + return "???"; +} |