mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
toc: API: Add gst_toc_entry_type_to_string()
This commit is contained in:
parent
10396f12d4
commit
71d1af2b66
4 changed files with 22 additions and 0 deletions
|
@ -2702,6 +2702,7 @@ gst_toc_copy
|
|||
gst_toc_find_entry
|
||||
gst_toc_entry_get_start_stop
|
||||
gst_toc_entry_set_start_stop
|
||||
gst_toc_entry_type_to_string
|
||||
<SUBSECTION Standard>
|
||||
GST_TYPE_TOC_ENTRY_TYPE
|
||||
<SUBSECTION Private>
|
||||
|
|
19
gst/gsttoc.c
19
gst/gsttoc.c
|
@ -977,6 +977,25 @@ gst_toc_entry_get_start_stop (const GstTocEntry * entry, gint64 * start,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_toc_entry_type_to_string:
|
||||
* @type: a #GstTocEntryType.
|
||||
*
|
||||
* Converts @type to a string representation.
|
||||
*
|
||||
* Returns: Returns the human-readable @type. Can be NULL if an error occurred.
|
||||
* Since: 0.11.92
|
||||
*/
|
||||
const gchar *
|
||||
gst_toc_entry_type_to_string (GstTocEntryType type)
|
||||
{
|
||||
const gchar *entry_types[] = { "chapter", "edition" };
|
||||
|
||||
g_return_val_if_fail ((gint) type >= 0
|
||||
&& (gint) type < G_N_ELEMENTS (entry_types), NULL);
|
||||
return entry_types[type];
|
||||
}
|
||||
|
||||
gboolean
|
||||
__gst_toc_structure_get_updated (const GstStructure * toc)
|
||||
{
|
||||
|
|
|
@ -105,6 +105,7 @@ GstToc * gst_toc_copy (const GstToc *toc);
|
|||
|
||||
void gst_toc_entry_set_start_stop (GstTocEntry *entry, gint64 start, gint64 stop);
|
||||
gboolean gst_toc_entry_get_start_stop (const GstTocEntry *entry, gint64 *start, gint64 *stop);
|
||||
const gchar * gst_toc_entry_type_to_string (GstTocEntryType type);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -1128,6 +1128,7 @@ EXPORTS
|
|||
gst_toc_entry_new_with_pad
|
||||
gst_toc_entry_set_start_stop
|
||||
gst_toc_entry_type_get_type
|
||||
gst_toc_entry_type_to_string
|
||||
gst_toc_find_entry
|
||||
gst_toc_free
|
||||
gst_toc_new
|
||||
|
|
Loading…
Reference in a new issue