mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
formatter: Better document metadata registration
And fix xges mimetype to match typefind mimetype
This commit is contained in:
parent
ab340b5de0
commit
2c9cbc6d06
3 changed files with 28 additions and 13 deletions
|
@ -470,22 +470,37 @@ ges_formatter_get_default (void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_formatter_class_register_metas:
|
||||
* @klass: The class to register metas on
|
||||
* @name: The name of the formatter
|
||||
* @description: The formatter description
|
||||
* @extensions: A list of coma separated file extensions handled
|
||||
* by the formatter. The order of the extensions should match the
|
||||
* list of the structures inside @caps
|
||||
* @caps: The caps the formatter handled, they should match what
|
||||
* gstreamer typefind mechanism will report for the files the formatter
|
||||
* handles.
|
||||
* @version: The version of the formatter
|
||||
* @rank: The rank of the formatter
|
||||
*/
|
||||
void
|
||||
ges_formatter_class_register_metas (GESFormatterClass * class,
|
||||
ges_formatter_class_register_metas (GESFormatterClass * klass,
|
||||
const gchar * name, const gchar * description, const gchar * extensions,
|
||||
const gchar * mimetype, gdouble version, GstRank rank)
|
||||
const gchar * caps, gdouble version, GstRank rank)
|
||||
{
|
||||
class->name = g_strdup (name);
|
||||
class->description = g_strdup (description);
|
||||
class->extension = g_strdup (extensions);
|
||||
class->mimetype = g_strdup (mimetype);
|
||||
class->version = version;
|
||||
class->rank = rank;
|
||||
g_return_if_fail (klass->name);
|
||||
klass->name = g_strdup (name);
|
||||
klass->description = g_strdup (description);
|
||||
klass->extension = g_strdup (extensions);
|
||||
klass->mimetype = g_strdup (caps);
|
||||
klass->version = version;
|
||||
klass->rank = rank;
|
||||
|
||||
if (g_atomic_int_get (&initialized)
|
||||
&& g_type_class_peek (G_OBJECT_CLASS_TYPE (class)))
|
||||
gst_object_unref (ges_asset_request (G_OBJECT_CLASS_TYPE (class), NULL,
|
||||
NULL));
|
||||
&& g_type_class_peek (G_OBJECT_CLASS_TYPE (klass)))
|
||||
gst_object_unref (ges_asset_request (G_OBJECT_CLASS_TYPE (klass), NULL,
|
||||
NULL));
|
||||
}
|
||||
|
||||
/* Main Formatter methods */
|
||||
|
|
|
@ -150,7 +150,7 @@ void ges_formatter_class_register_metas (GESFormatterClass * klass,
|
|||
const gchar *name,
|
||||
const gchar *description,
|
||||
const gchar *extensions,
|
||||
const gchar *mimetype,
|
||||
const gchar *caps,
|
||||
gdouble version,
|
||||
GstRank rank);
|
||||
|
||||
|
|
|
@ -2084,7 +2084,7 @@ ges_xml_formatter_class_init (GESXmlFormatterClass * self_class)
|
|||
|
||||
ges_formatter_class_register_metas (GES_FORMATTER_CLASS (self_class),
|
||||
"ges", "GStreamer Editing Services project files",
|
||||
"xges", "application/ges", VERSION, GST_RANK_PRIMARY);
|
||||
"xges", "application/xges", VERSION, GST_RANK_PRIMARY);
|
||||
|
||||
basexmlformatter_class->save = _save;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue