datetime: Improve documentation a bit to explain when NULL is returned

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
This commit is contained in:
Sebastian Dröge 2020-11-25 13:35:57 +02:00
parent c35d47127b
commit 16733a82f4

View file

@ -70,14 +70,14 @@ static void gst_date_time_free (GstDateTime * datetime);
/**
* gst_date_time_new_from_g_date_time:
* @dt: (transfer full): the #GDateTime. The new #GstDateTime takes ownership.
* @dt: (transfer full) (nullable): the #GDateTime. The new #GstDateTime takes ownership.
*
* Creates a new #GstDateTime from a #GDateTime object.
*
* Free-function: gst_date_time_unref
*
* Returns: (transfer full) (nullable): a newly created #GstDateTime,
* or %NULL on error
* or %NULL if @dt is %NULL.
*/
GstDateTime *
gst_date_time_new_from_g_date_time (GDateTime * dt)
@ -106,7 +106,8 @@ gst_date_time_new_from_g_date_time (GDateTime * dt)
* Free-function: g_date_time_unref
*
* Returns: (transfer full) (nullable): a newly created #GDateTime, or
* %NULL on error
* %NULL on error or if @datetime does not have a year, month, day, hour,
* minute and second.
*/
GDateTime *
gst_date_time_to_g_date_time (GstDateTime * datetime)