projects
/
platform
/
upstream
/
gstreamer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port gtk-doc comments to their equivalent markdown syntax
[platform/upstream/gstreamer.git]
/
gst
/
gstelementfactory.c
diff --git
a/gst/gstelementfactory.c
b/gst/gstelementfactory.c
index
a690355
..
7d54d45
100644
(file)
--- a/
gst/gstelementfactory.c
+++ b/
gst/gstelementfactory.c
@@
-23,6
+23,7
@@
/**
* SECTION:gstelementfactory
/**
* SECTION:gstelementfactory
+ * @title: GstElementFactory
* @short_description: Create GstElements from a factory
* @see_also: #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
*
* @short_description: Create GstElements from a factory
* @see_also: #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
*
@@
-36,9
+37,8
@@
*
* The following code example shows you how to create a GstFileSrc element.
*
*
* The following code example shows you how to create a GstFileSrc element.
*
- * <example>
- * <title>Using an element factory</title>
- * <programlisting language="c">
+ * ## Using an element factory
+ * |[<!-- language="C" -->
* #include <gst/gst.h>
*
* GstElement *src;
* #include <gst/gst.h>
*
* GstElement *src;
@@
-51,8
+51,7
@@
* src = gst_element_factory_create (srcfactory, "src");
* g_return_if_fail (src != NULL);
* ...
* src = gst_element_factory_create (srcfactory, "src");
* g_return_if_fail (src != NULL);
* ...
- * </programlisting>
- * </example>
+ * ]|
*/
#include "gst_private.h"
*/
#include "gst_private.h"
@@
-123,7
+122,8
@@
gst_element_factory_finalize (GObject * object)
* Search for an element factory of the given name. Refs the returned
* element factory; caller is responsible for unreffing.
*
* Search for an element factory of the given name. Refs the returned
* element factory; caller is responsible for unreffing.
*
- * Returns: (transfer full): #GstElementFactory if found, NULL otherwise
+ * Returns: (transfer full) (nullable): #GstElementFactory if found,
+ * %NULL otherwise
*/
GstElementFactory *
gst_element_factory_find (const gchar * name)
*/
GstElementFactory *
gst_element_factory_find (const gchar * name)
@@
-186,7
+186,7
@@
gst_element_factory_cleanup (GstElementFactory * factory)
/**
* gst_element_register:
/**
* gst_element_register:
- * @plugin: (allow-none): #GstPlugin to register the element with, or NULL for
+ * @plugin: (allow-none): #GstPlugin to register the element with, or
%
NULL for
* a static element.
* @name: name of elements of this type
* @rank: rank of element (higher rank means more importance when autoplugging)
* a static element.
* @name: name of elements of this type
* @rank: rank of element (higher rank means more importance when autoplugging)
@@
-195,7
+195,7
@@
gst_element_factory_cleanup (GstElementFactory * factory)
* Create a new elementfactory capable of instantiating objects of the
* @type and add the factory to @plugin.
*
* Create a new elementfactory capable of instantiating objects of the
* @type and add the factory to @plugin.
*
- * Returns:
TRUE, if the registering succeeded,
FALSE on error
+ * Returns:
%TRUE, if the registering succeeded, %
FALSE on error
*/
gboolean
gst_element_register (GstPlugin * plugin, const gchar * name, guint rank,
*/
gboolean
gst_element_register (GstPlugin * plugin, const gchar * name, guint rank,
@@
-328,15
+328,15
@@
detailserror:
/**
* gst_element_factory_create:
* @factory: factory to instantiate
/**
* gst_element_factory_create:
* @factory: factory to instantiate
- * @name: (allow-none): name of new element, or NULL to automatically create
+ * @name: (allow-none): name of new element, or
%
NULL to automatically create
* a unique name
*
* Create a new element of the type defined by the given elementfactory.
* It will be given the name supplied, since all elements require a name as
* their first argument.
*
* a unique name
*
* Create a new element of the type defined by the given elementfactory.
* It will be given the name supplied, since all elements require a name as
* their first argument.
*
- * Returns: (transfer floating)
: new #GstElement or NULL if the element couldn't
- * be created
+ * Returns: (transfer floating)
(nullable): new #GstElement or %NULL
+ *
if the element couldn't
be created
*/
GstElement *
gst_element_factory_create (GstElementFactory * factory, const gchar * name)
*/
GstElement *
gst_element_factory_create (GstElementFactory * factory, const gchar * name)
@@
-385,6
+385,9
@@
gst_element_factory_create (GstElementFactory * factory, const gchar * name)
if (!g_atomic_pointer_compare_and_exchange (&oclass->elementfactory, NULL,
factory))
gst_object_unref (factory);
if (!g_atomic_pointer_compare_and_exchange (&oclass->elementfactory, NULL,
factory))
gst_object_unref (factory);
+ else
+ /* This ref will never be dropped as the class is never destroyed */
+ GST_OBJECT_FLAG_SET (factory, GST_OBJECT_FLAG_MAY_BE_LEAKED);
GST_DEBUG ("created element \"%s\"", GST_OBJECT_NAME (factory));
GST_DEBUG ("created element \"%s\"", GST_OBJECT_NAME (factory));
@@
-414,15
+417,16
@@
no_element:
/**
* gst_element_factory_make:
* @factoryname: a named factory to instantiate
/**
* gst_element_factory_make:
* @factoryname: a named factory to instantiate
- * @name: (allow-none): name of new element, or NULL to automatically create
+ * @name: (allow-none): name of new element, or
%
NULL to automatically create
* a unique name
*
* Create a new element of the type defined by the given element factory.
* a unique name
*
* Create a new element of the type defined by the given element factory.
- * If name is NULL, then the element will receive a guaranteed unique name,
+ * If name is
%
NULL, then the element will receive a guaranteed unique name,
* consisting of the element factory name and a number.
* If name is given, it will be given the name supplied.
*
* consisting of the element factory name and a number.
* If name is given, it will be given the name supplied.
*
- * Returns: (transfer floating): new #GstElement or NULL if unable to create element
+ * Returns: (transfer floating) (nullable): new #GstElement or %NULL
+ * if unable to create element
*/
GstElement *
gst_element_factory_make (const gchar * factoryname, const gchar * name)
*/
GstElement *
gst_element_factory_make (const gchar * factoryname, const gchar * name)
@@
-446,6
+450,7
@@
gst_element_factory_make (const gchar * factoryname, const gchar * name)
goto create_failed;
gst_object_unref (factory);
goto create_failed;
gst_object_unref (factory);
+
return element;
/* ERRORS */
return element;
/* ERRORS */
@@
-500,8
+505,8
@@
gst_element_factory_get_element_type (GstElementFactory * factory)
*
* Get the metadata on @factory with @key.
*
*
* Get the metadata on @factory with @key.
*
- * Returns:
the metadata with @key on @factory or %NULL when there was no
- * metadata with the given @key.
+ * Returns:
(nullable): the metadata with @key on @factory or %NULL
+ *
when there was no
metadata with the given @key.
*/
const gchar *
gst_element_factory_get_metadata (GstElementFactory * factory,
*/
const gchar *
gst_element_factory_get_metadata (GstElementFactory * factory,
@@
-516,7
+521,7
@@
gst_element_factory_get_metadata (GstElementFactory * factory,
*
* Get the available keys for the metadata on @factory.
*
*
* Get the available keys for the metadata on @factory.
*
- * Returns: (transfer full) (element-type utf8) (array zero-terminated=1):
+ * Returns: (transfer full) (element-type utf8) (array zero-terminated=1)
(nullable)
:
* a %NULL-terminated array of key strings, or %NULL when there is no
* metadata. Free with g_strfreev() when no longer needed.
*/
* a %NULL-terminated array of key strings, or %NULL when there is no
* metadata. Free with g_strfreev() when no longer needed.
*/
@@
-619,13
+624,13
@@
gst_element_factory_get_uri_type (GstElementFactory * factory)
* gst_element_factory_get_uri_protocols:
* @factory: a #GstElementFactory
*
* gst_element_factory_get_uri_protocols:
* @factory: a #GstElementFactory
*
- * Gets a
NULL-terminated array of protocols this element supports or
NULL if
+ * Gets a
%NULL-terminated array of protocols this element supports or %
NULL if
* no protocols are supported. You may not change the contents of the returned
* array, as it is still owned by the element factory. Use g_strdupv() to
* make a copy of the protocol string array if you need to.
*
* Returns: (transfer none) (array zero-terminated=1): the supported protocols
* no protocols are supported. You may not change the contents of the returned
* array, as it is still owned by the element factory. Use g_strdupv() to
* make a copy of the protocol string array if you need to.
*
* Returns: (transfer none) (array zero-terminated=1): the supported protocols
- * or NULL
+ * or
%
NULL
*/
const gchar *const *
gst_element_factory_get_uri_protocols (GstElementFactory * factory)
*/
const gchar *const *
gst_element_factory_get_uri_protocols (GstElementFactory * factory)
@@
-642,7
+647,7
@@
gst_element_factory_get_uri_protocols (GstElementFactory * factory)
*
* Check if @factory implements the interface with name @interfacename.
*
*
* Check if @factory implements the interface with name @interfacename.
*
- * Returns:
#
TRUE when @factory implement the interface.
+ * Returns:
%
TRUE when @factory implement the interface.
*/
gboolean
gst_element_factory_has_interface (GstElementFactory * factory,
*/
gboolean
gst_element_factory_has_interface (GstElementFactory * factory,
@@
-727,6
+732,12
@@
gst_element_factory_list_is_type (GstElementFactory * factory,
if (!res && (type & GST_ELEMENT_FACTORY_TYPE_FORMATTER))
res = (strstr (klass, "Formatter") != NULL);
if (!res && (type & GST_ELEMENT_FACTORY_TYPE_FORMATTER))
res = (strstr (klass, "Formatter") != NULL);
+ if (!res && (type & GST_ELEMENT_FACTORY_TYPE_DECRYPTOR))
+ res = (strstr (klass, "Decryptor") != NULL);
+
+ if (!res && (type & GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR))
+ res = (strstr (klass, "Encryptor") != NULL);
+
/* Filter by media type now, we only test if it
* matched any of the types above or only checking the media
* type was requested. */
/* Filter by media type now, we only test if it
* matched any of the types above or only checking the media
* type was requested. */