ges: Mark GValue in child property setters as const

We can't change the vmethod at this point so just cast. This makes
the API more explicit so it is better in all cases.
This commit is contained in:
Thibault Saunier 2018-11-02 09:30:28 -03:00
parent 412fd0107c
commit 534855d42e
2 changed files with 6 additions and 6 deletions

View file

@ -1387,7 +1387,7 @@ not_found:
*/ */
void void
ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self, ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
GParamSpec * pspec, GValue * value) GParamSpec * pspec, const GValue * value)
{ {
ChildPropHandler *handler; ChildPropHandler *handler;
GESTimelineElementClass *klass; GESTimelineElementClass *klass;
@ -1401,7 +1401,7 @@ ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
klass = GES_TIMELINE_ELEMENT_GET_CLASS (self); klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);
g_assert (klass->set_child_property); g_assert (klass->set_child_property);
klass->set_child_property (self, handler->child, pspec, value); klass->set_child_property (self, handler->child, pspec, (GValue *) value);
return; return;
@ -1428,7 +1428,7 @@ not_found:
*/ */
gboolean gboolean
ges_timeline_element_set_child_property (GESTimelineElement * self, ges_timeline_element_set_child_property (GESTimelineElement * self,
const gchar * property_name, GValue * value) const gchar * property_name, const GValue * value)
{ {
GParamSpec *pspec; GParamSpec *pspec;
GESTimelineElementClass *klass; GESTimelineElementClass *klass;
@ -1441,7 +1441,7 @@ ges_timeline_element_set_child_property (GESTimelineElement * self,
klass = GES_TIMELINE_ELEMENT_GET_CLASS (self); klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);
g_assert (klass->set_child_property); g_assert (klass->set_child_property);
klass->set_child_property (self, child, pspec, value); klass->set_child_property (self, child, pspec, (GValue *) value);
gst_object_unref (child); gst_object_unref (child);
g_param_spec_unref (pspec); g_param_spec_unref (pspec);

View file

@ -287,7 +287,7 @@ ges_timeline_element_set_child_property_valist (GESTimelineElement * self,
GES_API void GES_API void
ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self, ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
GParamSpec * pspec, GParamSpec * pspec,
GValue * value); const GValue * value);
GES_API GES_API
void ges_timeline_element_set_child_properties (GESTimelineElement * self, void ges_timeline_element_set_child_properties (GESTimelineElement * self,
const gchar * first_property_name, const gchar * first_property_name,
@ -296,7 +296,7 @@ void ges_timeline_element_set_child_properties (GESTimelineElement * self,
GES_API GES_API
gboolean ges_timeline_element_set_child_property (GESTimelineElement *self, gboolean ges_timeline_element_set_child_property (GESTimelineElement *self,
const gchar *property_name, const gchar *property_name,
GValue * value); const GValue * value);
GES_API GES_API
gboolean ges_timeline_element_get_child_property (GESTimelineElement *self, gboolean ges_timeline_element_get_child_property (GESTimelineElement *self,