ptp clock: fix annotations for gst_ptp_clock_new

* Set `name` as `nullable` same as for gst_ntp_clock_new.
* Set return value as nullable as the constructor can fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6251>
This commit is contained in:
François Laignel 2024-03-06 12:22:26 +01:00 committed by GStreamer Marge Bot
parent df00962cb8
commit 7b5a5afa3a
2 changed files with 4 additions and 4 deletions

View file

@ -587,12 +587,12 @@ GstPtpClock::internal-clock property will become non-NULL. You can
check this with gst_clock_wait_for_sync(), the GstClock::synced signal and check this with gst_clock_wait_for_sync(), the GstClock::synced signal and
gst_clock_is_synced().</doc> gst_clock_is_synced().</doc>
<source-position filename="../subprojects/gstreamer/libs/gst/net/gstptpclock.h"/> <source-position filename="../subprojects/gstreamer/libs/gst/net/gstptpclock.h"/>
<return-value transfer-ownership="full"> <return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve" filename="../subprojects/gstreamer/libs/gst/net/gstptpclock.c">A new #GstClock</doc> <doc xml:space="preserve" filename="../subprojects/gstreamer/libs/gst/net/gstptpclock.c">A new #GstClock</doc>
<type name="Gst.Clock" c:type="GstClock*"/> <type name="Gst.Clock" c:type="GstClock*"/>
</return-value> </return-value>
<parameters> <parameters>
<parameter name="name" transfer-ownership="none"> <parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve" filename="../subprojects/gstreamer/libs/gst/net/gstptpclock.c">Name of the clock</doc> <doc xml:space="preserve" filename="../subprojects/gstreamer/libs/gst/net/gstptpclock.c">Name of the clock</doc>
<type name="utf8" c:type="const gchar*"/> <type name="utf8" c:type="const gchar*"/>
</parameter> </parameter>

View file

@ -3266,7 +3266,7 @@ gst_ptp_clock_get_internal_time (GstClock * clock)
/** /**
* gst_ptp_clock_new: * gst_ptp_clock_new:
* @name: Name of the clock * @name: (nullable): Name of the clock
* @domain: PTP domain * @domain: PTP domain
* *
* Creates a new PTP clock instance that exports the PTP time of the master * Creates a new PTP clock instance that exports the PTP time of the master
@ -3281,7 +3281,7 @@ gst_ptp_clock_get_internal_time (GstClock * clock)
* check this with gst_clock_wait_for_sync(), the GstClock::synced signal and * check this with gst_clock_wait_for_sync(), the GstClock::synced signal and
* gst_clock_is_synced(). * gst_clock_is_synced().
* *
* Returns: (transfer full): A new #GstClock * Returns: (transfer full) (nullable): A new #GstClock
* *
* Since: 1.6 * Since: 1.6
*/ */