mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-29 12:25:37 +00:00
codecparsers: add slice type name for h265
Add a method to convert the slice type to a descriptive name. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5908>
This commit is contained in:
parent
9c250179c6
commit
f337d37d6d
2 changed files with 30 additions and 0 deletions
|
@ -4131,6 +4131,33 @@ gst_h265_profile_from_string (const gchar * string)
|
|||
return GST_H265_PROFILE_INVALID;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_h265_slice_type_to_string:
|
||||
* @slice_type: a #GstH265SliceType
|
||||
*
|
||||
* Returns the descriptive name for the #GstH265SliceType.
|
||||
*
|
||||
* Returns: (nullable): the name for @slice_type or %NULL on error
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
const gchar *
|
||||
gst_h265_slice_type_to_string (GstH265SliceType slice_type)
|
||||
{
|
||||
switch (slice_type) {
|
||||
case GST_H265_P_SLICE:
|
||||
return "P";
|
||||
case GST_H265_B_SLICE:
|
||||
return "B";
|
||||
case GST_H265_I_SLICE:
|
||||
return "I";
|
||||
default:
|
||||
GST_ERROR ("unknown %d slice type", slice_type);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_h265_write_sei_registered_user_data (NalWriter * nw,
|
||||
GstH265RegisteredUserData * rud)
|
||||
|
|
|
@ -2196,6 +2196,9 @@ const gchar * gst_h265_profile_to_string (GstH265Profile profile);
|
|||
GST_CODEC_PARSERS_API
|
||||
GstH265Profile gst_h265_profile_from_string (const gchar * string);
|
||||
|
||||
GST_CODEC_PARSERS_API
|
||||
const gchar * gst_h265_slice_type_to_string (GstH265SliceType slice_type);
|
||||
|
||||
GST_CODEC_PARSERS_API
|
||||
GstMemory * gst_h265_create_sei_memory (guint8 layer_id,
|
||||
guint8 temporal_id_plus1,
|
||||
|
|
Loading…
Reference in a new issue