mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
parse: Fix transfer annotations for parse_launch functions.
gst_parse_launchv, gst_parse_launchv_full and gst_parse_launch_full all return floating refs, the same as gst_parse_launch, which just calls gst_parse_launch_full internally anyway. Add a unit test assertion to check it's true. Spotted by nemequ on IRC.
This commit is contained in:
parent
2bcafd4d56
commit
1a148ecb16
2 changed files with 5 additions and 3 deletions
|
@ -207,7 +207,7 @@ _gst_parse_escape (const gchar * str)
|
|||
* @error will contain an error message if an erroneuos pipeline is specified.
|
||||
* An error does not mean that the pipeline could not be constructed.
|
||||
*
|
||||
* Returns: (transfer full): a new element on success and %NULL on failure.
|
||||
* Returns: (transfer floating): a new element on success and %NULL on failure.
|
||||
*/
|
||||
GstElement *
|
||||
gst_parse_launchv (const gchar ** argv, GError ** error)
|
||||
|
@ -227,7 +227,7 @@ gst_parse_launchv (const gchar ** argv, GError ** error)
|
|||
* @error will contain an error message if an erroneous pipeline is specified.
|
||||
* An error does not mean that the pipeline could not be constructed.
|
||||
*
|
||||
* Returns: (transfer full): a new element on success; on failure, either %NULL
|
||||
* Returns: (transfer floating): a new element on success; on failure, either %NULL
|
||||
* or a partially-constructed bin or element will be returned and @error will
|
||||
* be set (unless you passed #GST_PARSE_FLAG_FATAL_ERRORS in @flags, then
|
||||
* %NULL will always be returned on failure)
|
||||
|
@ -304,7 +304,7 @@ gst_parse_launch (const gchar * pipeline_description, GError ** error)
|
|||
* the @error is set. In this case there was a recoverable parsing error and you
|
||||
* can try to play the pipeline.
|
||||
*
|
||||
* Returns: (transfer full): a new element on success, %NULL on failure. If
|
||||
* Returns: (transfer floating): a new element on success, %NULL on failure. If
|
||||
* more than one toplevel element is specified by the @pipeline_description,
|
||||
* all elements are put into a #GstPipeline, which then is returned.
|
||||
*/
|
||||
|
|
|
@ -48,6 +48,8 @@ setup_pipeline (const gchar * pipe_descr)
|
|||
g_error_free (error);
|
||||
}
|
||||
fail_unless (pipeline != NULL, "Failed to create pipeline %s", pipe_descr);
|
||||
/* Newly returned object should be floating reffed */
|
||||
fail_unless (g_object_is_floating (pipeline));
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue