Commit c8380cb0 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

gst: sprinkle some G_GNUC_MALLOC

Maybe gcc can do something clever with that, or at least
warn us if we don't save the return value somewhere.
parent 33078aae
...@@ -39,7 +39,7 @@ G_BEGIN_DECLS ...@@ -39,7 +39,7 @@ G_BEGIN_DECLS
typedef struct _GstAtomicQueue GstAtomicQueue; typedef struct _GstAtomicQueue GstAtomicQueue;
GstAtomicQueue * gst_atomic_queue_new (guint initial_size); GstAtomicQueue * gst_atomic_queue_new (guint initial_size) G_GNUC_MALLOC;
void gst_atomic_queue_ref (GstAtomicQueue * queue); void gst_atomic_queue_ref (GstAtomicQueue * queue);
void gst_atomic_queue_unref (GstAtomicQueue * queue); void gst_atomic_queue_unref (GstAtomicQueue * queue);
......
...@@ -300,9 +300,9 @@ struct _GstBufferClass { ...@@ -300,9 +300,9 @@ struct _GstBufferClass {
GType gst_buffer_get_type (void); GType gst_buffer_get_type (void);
/* allocation */ /* allocation */
GstBuffer * gst_buffer_new (void); GstBuffer * gst_buffer_new (void) G_GNUC_MALLOC;
GstBuffer * gst_buffer_new_and_alloc (guint size); GstBuffer * gst_buffer_new_and_alloc (guint size) G_GNUC_MALLOC;
GstBuffer * gst_buffer_try_new_and_alloc (guint size); GstBuffer * gst_buffer_try_new_and_alloc (guint size) G_GNUC_MALLOC;
/** /**
* gst_buffer_set_data: * gst_buffer_set_data:
...@@ -490,11 +490,11 @@ GstCaps* gst_buffer_get_caps (GstBuffer *buffer); ...@@ -490,11 +490,11 @@ GstCaps* gst_buffer_get_caps (GstBuffer *buffer);
void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps); void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps);
/* creating a subbuffer */ /* creating a subbuffer */
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint offset, guint size); GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint offset, guint size) G_GNUC_MALLOC;
/* span, two buffers, intelligently */ /* span, two buffers, intelligently */
gboolean gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2); gboolean gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2);
GstBuffer* gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len); GstBuffer* gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len) G_GNUC_MALLOC;
/** /**
* gst_value_set_buffer: * gst_value_set_buffer:
......
...@@ -218,7 +218,7 @@ GstBuffer * gst_buffer_list_get (GstBufferList *l ...@@ -218,7 +218,7 @@ GstBuffer * gst_buffer_list_get (GstBufferList *l
/* iterator */ /* iterator */
GType gst_buffer_list_iterator_get_type (void); GType gst_buffer_list_iterator_get_type (void);
GstBufferListIterator * gst_buffer_list_iterate (GstBufferList *list); GstBufferListIterator * gst_buffer_list_iterate (GstBufferList *list) G_GNUC_MALLOC;
void gst_buffer_list_iterator_free (GstBufferListIterator *it); void gst_buffer_list_iterator_free (GstBufferListIterator *it);
guint gst_buffer_list_iterator_n_buffers (const GstBufferListIterator *it); guint gst_buffer_list_iterator_n_buffers (const GstBufferListIterator *it);
......
...@@ -208,18 +208,18 @@ struct _GstStaticCaps { ...@@ -208,18 +208,18 @@ struct _GstStaticCaps {
}; };
GType gst_caps_get_type (void); GType gst_caps_get_type (void);
GstCaps * gst_caps_new_empty (void); GstCaps * gst_caps_new_empty (void) G_GNUC_MALLOC;
GstCaps * gst_caps_new_any (void); GstCaps * gst_caps_new_any (void) G_GNUC_MALLOC;
GstCaps * gst_caps_new_simple (const char *media_type, GstCaps * gst_caps_new_simple (const char *media_type,
const char *fieldname, const char *fieldname,
...); ...) G_GNUC_MALLOC;
GstCaps * gst_caps_new_full (GstStructure *struct1, ...); GstCaps * gst_caps_new_full (GstStructure *struct1, ...) G_GNUC_MALLOC;
GstCaps * gst_caps_new_full_valist (GstStructure *structure, GstCaps * gst_caps_new_full_valist (GstStructure *structure,
va_list var_args); va_list var_args) G_GNUC_MALLOC;
/* reference counting */ /* reference counting */
GstCaps * gst_caps_ref (GstCaps *caps); GstCaps * gst_caps_ref (GstCaps *caps);
GstCaps * gst_caps_copy (const GstCaps *caps); GstCaps * gst_caps_copy (const GstCaps *caps) G_GNUC_MALLOC;
GstCaps * gst_caps_make_writable (GstCaps *caps) G_GNUC_WARN_UNUSED_RESULT; GstCaps * gst_caps_make_writable (GstCaps *caps) G_GNUC_WARN_UNUSED_RESULT;
void gst_caps_unref (GstCaps *caps); void gst_caps_unref (GstCaps *caps);
...@@ -240,8 +240,8 @@ guint gst_caps_get_size (const GstCaps *caps); ...@@ -240,8 +240,8 @@ guint gst_caps_get_size (const GstCaps *caps);
GstStructure * gst_caps_get_structure (const GstCaps *caps, GstStructure * gst_caps_get_structure (const GstCaps *caps,
guint index); guint index);
GstStructure * gst_caps_steal_structure (GstCaps *caps, GstStructure * gst_caps_steal_structure (GstCaps *caps,
guint index); guint index) G_GNUC_WARN_UNUSED_RESULT;
GstCaps * gst_caps_copy_nth (const GstCaps *caps, guint nth); GstCaps * gst_caps_copy_nth (const GstCaps *caps, guint nth) G_GNUC_MALLOC;
void gst_caps_truncate (GstCaps *caps); void gst_caps_truncate (GstCaps *caps);
void gst_caps_set_value (GstCaps *caps, void gst_caps_set_value (GstCaps *caps,
const char *field, const char *field,
...@@ -274,15 +274,15 @@ gboolean gst_caps_is_strictly_equal (const GstCaps *caps1, ...@@ -274,15 +274,15 @@ gboolean gst_caps_is_strictly_equal (const GstCaps *caps1,
/* operations */ /* operations */
GstCaps * gst_caps_intersect (const GstCaps *caps1, GstCaps * gst_caps_intersect (const GstCaps *caps1,
const GstCaps *caps2); const GstCaps *caps2) G_GNUC_MALLOC;
GstCaps * gst_caps_intersect_full (const GstCaps *caps1, GstCaps * gst_caps_intersect_full (const GstCaps *caps1,
const GstCaps *caps2, const GstCaps *caps2,
GstCapsIntersectMode mode); GstCapsIntersectMode mode) G_GNUC_MALLOC;
GstCaps * gst_caps_subtract (const GstCaps *minuend, GstCaps * gst_caps_subtract (const GstCaps *minuend,
const GstCaps *subtrahend); const GstCaps *subtrahend) G_GNUC_MALLOC;
GstCaps * gst_caps_union (const GstCaps *caps1, GstCaps * gst_caps_union (const GstCaps *caps1,
const GstCaps *caps2); const GstCaps *caps2) G_GNUC_MALLOC;
GstCaps * gst_caps_normalize (const GstCaps *caps); GstCaps * gst_caps_normalize (const GstCaps *caps) G_GNUC_MALLOC;
gboolean gst_caps_do_simplify (GstCaps *caps); gboolean gst_caps_do_simplify (GstCaps *caps);
#if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_DISABLE_DEPRECATED) #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_DISABLE_DEPRECATED)
...@@ -294,8 +294,8 @@ GstCaps * gst_caps_load_thyself (xmlNodePtr parent); ...@@ -294,8 +294,8 @@ GstCaps * gst_caps_load_thyself (xmlNodePtr parent);
/* utility */ /* utility */
void gst_caps_replace (GstCaps **caps, void gst_caps_replace (GstCaps **caps,
GstCaps *newcaps); GstCaps *newcaps);
gchar * gst_caps_to_string (const GstCaps *caps); gchar * gst_caps_to_string (const GstCaps *caps) G_GNUC_MALLOC;
GstCaps * gst_caps_from_string (const gchar *string); GstCaps * gst_caps_from_string (const gchar *string) G_GNUC_MALLOC;
G_END_DECLS G_END_DECLS
......
...@@ -45,19 +45,19 @@ gint gst_date_time_get_second (const GstDateTime * datetime); ...@@ -45,19 +45,19 @@ gint gst_date_time_get_second (const GstDateTime * datetime);
gint gst_date_time_get_microsecond (const GstDateTime * datetime); gint gst_date_time_get_microsecond (const GstDateTime * datetime);
gfloat gst_date_time_get_time_zone_offset (const GstDateTime * datetime); gfloat gst_date_time_get_time_zone_offset (const GstDateTime * datetime);
GstDateTime *gst_date_time_new_from_unix_epoch_local_time (gint64 secs); GstDateTime *gst_date_time_new_from_unix_epoch_local_time (gint64 secs) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_from_unix_epoch_utc (gint64 secs); GstDateTime *gst_date_time_new_from_unix_epoch_utc (gint64 secs) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_local_time (gint year, gint month, GstDateTime *gst_date_time_new_local_time (gint year, gint month,
gint day, gint hour, gint day, gint hour,
gint minute, gint minute,
gdouble seconds); gdouble seconds) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new (gfloat tzoffset, GstDateTime *gst_date_time_new (gfloat tzoffset,
gint year, gint month, gint year, gint month,
gint day, gint hour, gint day, gint hour,
gint minute, gint minute,
gdouble seconds); gdouble seconds) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_now_local_time (void); GstDateTime *gst_date_time_new_now_local_time (void) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_now_utc (void); GstDateTime *gst_date_time_new_now_utc (void) G_GNUC_MALLOC;
GstDateTime *gst_date_time_ref (GstDateTime * datetime); GstDateTime *gst_date_time_ref (GstDateTime * datetime);
void gst_date_time_unref (GstDateTime * datetime); void gst_date_time_unref (GstDateTime * datetime);
......
...@@ -160,8 +160,8 @@ gboolean gst_element_factory_has_interface (GstElementFacto ...@@ -160,8 +160,8 @@ gboolean gst_element_factory_has_interface (GstElementFacto
const gchar *interfacename); const gchar *interfacename);
GstElement* gst_element_factory_create (GstElementFactory *factory, GstElement* gst_element_factory_create (GstElementFactory *factory,
const gchar *name); const gchar *name) G_GNUC_MALLOC;
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name); GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name) G_GNUC_MALLOC;
/* FIXME 0.11: move these two into our private headers */ /* FIXME 0.11: move these two into our private headers */
void __gst_element_factory_add_static_pad_template (GstElementFactory *elementfactory, void __gst_element_factory_add_static_pad_template (GstElementFactory *elementfactory,
...@@ -303,12 +303,12 @@ gboolean gst_element_factory_list_is_type (GstElementFactory *factory, ...@@ -303,12 +303,12 @@ gboolean gst_element_factory_list_is_type (GstElementFactory *factory,
GstElementFactoryListType type); GstElementFactoryListType type);
GList * gst_element_factory_list_get_elements (GstElementFactoryListType type, GList * gst_element_factory_list_get_elements (GstElementFactoryListType type,
GstRank minrank); GstRank minrank) G_GNUC_MALLOC;
GList * gst_element_factory_list_filter (GList *list, const GstCaps *caps, GList * gst_element_factory_list_filter (GList *list, const GstCaps *caps,
GstPadDirection direction, GstPadDirection direction,
gboolean subsetonly); gboolean subsetonly) G_GNUC_MALLOC;
G_END_DECLS G_END_DECLS
#endif /* __GST_ELEMENT_FACTORY_H__ */ #endif /* __GST_ELEMENT_FACTORY_H__ */
...@@ -441,7 +441,7 @@ gst_event_copy (const GstEvent * event) ...@@ -441,7 +441,7 @@ gst_event_copy (const GstEvent * event)
/* custom event */ /* custom event */
GstEvent* gst_event_new_custom (GstEventType type, GstStructure *structure); GstEvent* gst_event_new_custom (GstEventType type, GstStructure *structure) G_GNUC_MALLOC;
const GstStructure * const GstStructure *
gst_event_get_structure (GstEvent *event); gst_event_get_structure (GstEvent *event);
...@@ -453,22 +453,22 @@ guint32 gst_event_get_seqnum (GstEvent *event); ...@@ -453,22 +453,22 @@ guint32 gst_event_get_seqnum (GstEvent *event);
void gst_event_set_seqnum (GstEvent *event, guint32 seqnum); void gst_event_set_seqnum (GstEvent *event, guint32 seqnum);
/* flush events */ /* flush events */
GstEvent * gst_event_new_flush_start (void); GstEvent * gst_event_new_flush_start (void) G_GNUC_MALLOC;
GstEvent * gst_event_new_flush_stop (void); GstEvent * gst_event_new_flush_stop (void) G_GNUC_MALLOC;
/* EOS event */ /* EOS event */
GstEvent * gst_event_new_eos (void); GstEvent * gst_event_new_eos (void) G_GNUC_MALLOC;
/* newsegment events */ /* newsegment events */
GstEvent* gst_event_new_new_segment (gboolean update, gdouble rate, GstEvent* gst_event_new_new_segment (gboolean update, gdouble rate,
GstFormat format, GstFormat format,
gint64 start, gint64 stop, gint64 start, gint64 stop,
gint64 position); gint64 position) G_GNUC_MALLOC;
GstEvent* gst_event_new_new_segment_full (gboolean update, gdouble rate, GstEvent* gst_event_new_new_segment_full (gboolean update, gdouble rate,
gdouble applied_rate, gdouble applied_rate,
GstFormat format, GstFormat format,
gint64 start, gint64 stop, gint64 start, gint64 stop,
gint64 position); gint64 position) G_GNUC_MALLOC;
void gst_event_parse_new_segment (GstEvent *event, void gst_event_parse_new_segment (GstEvent *event,
gboolean *update, gboolean *update,
gdouble *rate, gdouble *rate,
...@@ -484,20 +484,20 @@ void gst_event_parse_new_segment_full (GstEvent *event, ...@@ -484,20 +484,20 @@ void gst_event_parse_new_segment_full (GstEvent *event,
gint64 *position); gint64 *position);
/* tag event */ /* tag event */
GstEvent* gst_event_new_tag (GstTagList *taglist); GstEvent* gst_event_new_tag (GstTagList *taglist) G_GNUC_MALLOC;
void gst_event_parse_tag (GstEvent *event, GstTagList **taglist); void gst_event_parse_tag (GstEvent *event, GstTagList **taglist);
/* buffer */ /* buffer */
GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize, GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize,
gboolean async); gboolean async) G_GNUC_MALLOC;
void gst_event_parse_buffer_size (GstEvent *event, GstFormat *format, gint64 *minsize, void gst_event_parse_buffer_size (GstEvent *event, GstFormat *format, gint64 *minsize,
gint64 *maxsize, gboolean *async); gint64 *maxsize, gboolean *async);
/* QOS events */ /* QOS events */
GstEvent* gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff, GstEvent* gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff,
GstClockTime timestamp); GstClockTime timestamp) G_GNUC_MALLOC;
GstEvent* gst_event_new_qos_full (GstQOSType type, gdouble proportion, GstEvent* gst_event_new_qos_full (GstQOSType type, gdouble proportion,
GstClockTimeDiff diff, GstClockTime timestamp); GstClockTimeDiff diff, GstClockTime timestamp) G_GNUC_MALLOC;
void gst_event_parse_qos (GstEvent *event, gdouble *proportion, GstClockTimeDiff *diff, void gst_event_parse_qos (GstEvent *event, gdouble *proportion, GstClockTimeDiff *diff,
GstClockTime *timestamp); GstClockTime *timestamp);
void gst_event_parse_qos_full (GstEvent *event, GstQOSType *type, void gst_event_parse_qos_full (GstEvent *event, GstQOSType *type,
...@@ -506,21 +506,21 @@ void gst_event_parse_qos_full (GstEvent *event, GstQOSType *ty ...@@ -506,21 +506,21 @@ void gst_event_parse_qos_full (GstEvent *event, GstQOSType *ty
/* seek event */ /* seek event */
GstEvent* gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags, GstEvent* gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
GstSeekType start_type, gint64 start, GstSeekType start_type, gint64 start,
GstSeekType stop_type, gint64 stop); GstSeekType stop_type, gint64 stop) G_GNUC_MALLOC;
void gst_event_parse_seek (GstEvent *event, gdouble *rate, GstFormat *format, void gst_event_parse_seek (GstEvent *event, gdouble *rate, GstFormat *format,
GstSeekFlags *flags, GstSeekFlags *flags,
GstSeekType *start_type, gint64 *start, GstSeekType *start_type, gint64 *start,
GstSeekType *stop_type, gint64 *stop); GstSeekType *stop_type, gint64 *stop);
/* navigation event */ /* navigation event */
GstEvent* gst_event_new_navigation (GstStructure *structure); GstEvent* gst_event_new_navigation (GstStructure *structure) G_GNUC_MALLOC;
/* latency event */ /* latency event */
GstEvent* gst_event_new_latency (GstClockTime latency); GstEvent* gst_event_new_latency (GstClockTime latency) G_GNUC_MALLOC;
void gst_event_parse_latency (GstEvent *event, GstClockTime *latency); void gst_event_parse_latency (GstEvent *event, GstClockTime *latency);
/* step event */ /* step event */
GstEvent* gst_event_new_step (GstFormat format, guint64 amount, gdouble rate, GstEvent* gst_event_new_step (GstFormat format, guint64 amount, gdouble rate,
gboolean flush, gboolean intermediate); gboolean flush, gboolean intermediate) G_GNUC_MALLOC;
void gst_event_parse_step (GstEvent *event, GstFormat *format, guint64 *amount, void gst_event_parse_step (GstEvent *event, GstFormat *format, guint64 *amount,
gdouble *rate, gboolean *flush, gboolean *intermediate); gdouble *rate, gboolean *flush, gboolean *intermediate);
......
...@@ -65,7 +65,7 @@ GstProxyPad* gst_proxy_pad_get_internal (GstProxyPad *pad); ...@@ -65,7 +65,7 @@ GstProxyPad* gst_proxy_pad_get_internal (GstProxyPad *pad);
const GstQueryType* gst_proxy_pad_query_type_default (GstPad *pad); const GstQueryType* gst_proxy_pad_query_type_default (GstPad *pad);
gboolean gst_proxy_pad_event_default (GstPad *pad, GstEvent *event); gboolean gst_proxy_pad_event_default (GstPad *pad, GstEvent *event);
gboolean gst_proxy_pad_query_default (GstPad *pad, GstQuery *query); gboolean gst_proxy_pad_query_default (GstPad *pad, GstQuery *query);
GstIterator* gst_proxy_pad_iterate_internal_links_default (GstPad *pad); GstIterator* gst_proxy_pad_iterate_internal_links_default (GstPad *pad) G_GNUC_MALLOC;
GstFlowReturn gst_proxy_pad_bufferalloc_default (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf); GstFlowReturn gst_proxy_pad_bufferalloc_default (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf);
GstFlowReturn gst_proxy_pad_chain_default (GstPad *pad, GstBuffer *buffer); GstFlowReturn gst_proxy_pad_chain_default (GstPad *pad, GstBuffer *buffer);
GstFlowReturn gst_proxy_pad_chain_list_default (GstPad *pad, GstBufferList *list); GstFlowReturn gst_proxy_pad_chain_list_default (GstPad *pad, GstBufferList *list);
...@@ -112,11 +112,11 @@ struct _GstGhostPadClass ...@@ -112,11 +112,11 @@ struct _GstGhostPadClass
GType gst_ghost_pad_get_type (void); GType gst_ghost_pad_get_type (void);
GstPad* gst_ghost_pad_new (const gchar *name, GstPad *target); GstPad* gst_ghost_pad_new (const gchar *name, GstPad *target) G_GNUC_MALLOC;
GstPad* gst_ghost_pad_new_no_target (const gchar *name, GstPadDirection dir); GstPad* gst_ghost_pad_new_no_target (const gchar *name, GstPadDirection dir) G_GNUC_MALLOC;
GstPad* gst_ghost_pad_new_from_template (const gchar *name, GstPad * target, GstPadTemplate * templ); GstPad* gst_ghost_pad_new_from_template (const gchar *name, GstPad * target, GstPadTemplate * templ) G_GNUC_MALLOC;
GstPad* gst_ghost_pad_new_no_target_from_template (const gchar *name, GstPadTemplate * templ); GstPad* gst_ghost_pad_new_no_target_from_template (const gchar *name, GstPadTemplate * templ) G_GNUC_MALLOC;
GstPad* gst_ghost_pad_get_target (GstGhostPad *gpad); GstPad* gst_ghost_pad_get_target (GstGhostPad *gpad);
gboolean gst_ghost_pad_set_target (GstGhostPad *gpad, GstPad *newtarget); gboolean gst_ghost_pad_set_target (GstGhostPad *gpad, GstPad *newtarget);
......
...@@ -63,13 +63,13 @@ struct _GstIndexFactoryClass { ...@@ -63,13 +63,13 @@ struct _GstIndexFactoryClass {
GType gst_index_factory_get_type (void); GType gst_index_factory_get_type (void);
GstIndexFactory* gst_index_factory_new (const gchar *name, GstIndexFactory* gst_index_factory_new (const gchar *name,
const gchar *longdesc, GType type); const gchar *longdesc, GType type) G_GNUC_MALLOC;
void gst_index_factory_destroy (GstIndexFactory *factory); void gst_index_factory_destroy (GstIndexFactory *factory);
GstIndexFactory* gst_index_factory_find (const gchar *name); GstIndexFactory* gst_index_factory_find (const gchar *name);
GstIndex* gst_index_factory_create (GstIndexFactory *factory); GstIndex* gst_index_factory_create (GstIndexFactory *factory) G_GNUC_MALLOC;
GstIndex* gst_index_factory_make (const gchar *name); GstIndex* gst_index_factory_make (const gchar *name) G_GNUC_MALLOC;
G_END_DECLS G_END_DECLS
......
...@@ -229,7 +229,7 @@ GstIterator* gst_iterator_new (guint size, ...@@ -229,7 +229,7 @@ GstIterator* gst_iterator_new (guint size,
GstIteratorNextFunction next, GstIteratorNextFunction next,
GstIteratorItemFunction item, GstIteratorItemFunction item,
GstIteratorResyncFunction resync, GstIteratorResyncFunction resync,
GstIteratorFreeFunction free); GstIteratorFreeFunction free) G_GNUC_MALLOC;
GstIterator* gst_iterator_new_list (GType type, GstIterator* gst_iterator_new_list (GType type,
GMutex *lock, GMutex *lock,
...@@ -237,12 +237,12 @@ GstIterator* gst_iterator_new_list (GType type, ...@@ -237,12 +237,12 @@ GstIterator* gst_iterator_new_list (GType type,
GList **list, GList **list,
gpointer owner, gpointer owner,
GstIteratorItemFunction item, GstIteratorItemFunction item,
GstIteratorDisposeFunction free); GstIteratorDisposeFunction free) G_GNUC_MALLOC;
GstIterator* gst_iterator_new_single (GType type, GstIterator* gst_iterator_new_single (GType type,
gpointer object, gpointer object,
GstCopyFunction copy, GstCopyFunction copy,
GFreeFunc free); GFreeFunc free) G_GNUC_MALLOC;
/* using iterators */ /* using iterators */
GstIteratorResult gst_iterator_next (GstIterator *it, gpointer *elem); GstIteratorResult gst_iterator_next (GstIterator *it, gpointer *elem);
...@@ -253,7 +253,7 @@ void gst_iterator_push (GstIterator *it, GstIterator *other); ...@@ -253,7 +253,7 @@ void gst_iterator_push (GstIterator *it, GstIterator *other);
/* higher-order functions that operate on iterators */ /* higher-order functions that operate on iterators */
GstIterator* gst_iterator_filter (GstIterator *it, GCompareFunc func, GstIterator* gst_iterator_filter (GstIterator *it, GCompareFunc func,
gpointer user_data); gpointer user_data) G_GNUC_MALLOC;
GstIteratorResult gst_iterator_fold (GstIterator *it, GstIteratorResult gst_iterator_fold (GstIterator *it,
GstIteratorFoldFunction func, GstIteratorFoldFunction func,
GValue *ret, gpointer user_data); GValue *ret, gpointer user_data);
......
This diff is collapsed.
...@@ -188,8 +188,8 @@ struct _GstMiniObjectClass { ...@@ -188,8 +188,8 @@ struct _GstMiniObjectClass {
GType gst_mini_object_get_type (void); GType gst_mini_object_get_type (void);
GstMiniObject* gst_mini_object_new (GType type); GstMiniObject* gst_mini_object_new (GType type) G_GNUC_MALLOC;
GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object); GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object) G_GNUC_MALLOC;
gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object); gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
GstMiniObject* gst_mini_object_make_writable (GstMiniObject *mini_object); GstMiniObject* gst_mini_object_make_writable (GstMiniObject *mini_object);
...@@ -232,7 +232,7 @@ GType gst_param_spec_mini_object_get_type (void); ...@@ -232,7 +232,7 @@ GType gst_param_spec_mini_object_get_type (void);
GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick, GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick,
const char *blurb, GType object_type, const char *blurb, GType object_type,
GParamFlags flags); GParamFlags flags) G_GNUC_MALLOC;
/* GValue stuff */ /* GValue stuff */
......
...@@ -182,7 +182,7 @@ GType gst_static_pad_template_get_type (void); ...@@ -182,7 +182,7 @@ GType gst_static_pad_template_get_type (void);
GstPadTemplate* gst_pad_template_new (const gchar *name_template, GstPadTemplate* gst_pad_template_new (const gchar *name_template,
GstPadDirection direction, GstPadPresence presence, GstPadDirection direction, GstPadPresence presence,
GstCaps *caps); GstCaps *caps) G_GNUC_MALLOC;
GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *pad_template); GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *pad_template);
GstCaps* gst_static_pad_template_get_caps (GstStaticPadTemplate *templ); GstCaps* gst_static_pad_template_get_caps (GstStaticPadTemplate *templ);
......
...@@ -120,7 +120,7 @@ GParamSpec * gst_param_spec_fraction (const gchar * name, ...@@ -120,7 +120,7 @@ GParamSpec * gst_param_spec_fraction (const gchar * name,
gint min_num, gint min_denom, gint min_num, gint min_denom,
gint max_num, gint max_denom, gint max_num, gint max_denom,
gint default_num, gint default_denom, gint default_num, gint default_denom,
GParamFlags flags); GParamFlags flags) G_GNUC_MALLOC;
G_END_DECLS G_END_DECLS
......
...@@ -89,9 +89,9 @@ typedef struct _GstParseContext GstParseContext; ...@@ -89,9 +89,9 @@ typedef struct _GstParseContext GstParseContext;
/* create, process and free a parse context */ /* create, process and free a parse context */
GType gst_parse_context_get_type (void); GType gst_parse_context_get_type (void);
GstParseContext * gst_parse_context_new (void); GstParseContext * gst_parse_context_new (void) G_GNUC_MALLOC;
gchar ** gst_parse_context_get_missing_elements (GstParseContext * context); gchar ** gst_parse_context_get_missing_elements (GstParseContext * context) G_GNUC_MALLOC;
void gst_parse_context_free (GstParseContext * context); void gst_parse_context_free (GstParseContext * context);
...@@ -99,20 +99,20 @@ void gst_parse_context_free (GstParseContext * context); ...@@ -99,20 +99,20 @@ void gst_parse_context_free (GstParseContext * context);
/* parse functions */ /* parse functions */
GstElement * gst_parse_launch (const gchar * pipeline_description, GstElement * gst_parse_launch (const gchar * pipeline_description,
GError ** error); GError ** error) G_GNUC_MALLOC;
GstElement * gst_parse_launchv (const gchar ** argv, GstElement * gst_parse_launchv (const gchar ** argv,
GError ** error); GError ** error) G_GNUC_MALLOC;
GstElement * gst_parse_launch_full (const gchar * pipeline_description, GstElement * gst_parse_launch_full (const gchar * pipeline_description,
GstParseContext * context, GstParseContext * context,
GstParseFlags flags, GstParseFlags flags,
GError ** error); GError ** error) G_GNUC_MALLOC;
GstElement * gst_parse_launchv_full (const gchar ** argv, GstElement * gst_parse_launchv_full (const gchar ** argv,
GstParseContext * context, GstParseContext * context,
GstParseFlags flags, GstParseFlags flags,
GError ** error); GError ** error) G_GNUC_MALLOC;
G_END_DECLS G_END_DECLS
......
...@@ -89,7 +89,7 @@ struct _GstPipelineClass { ...@@ -89,7 +89,7 @@ struct _GstPipelineClass {
}; };
GType gst_pipeline_get_type (void); GType gst_pipeline_get_type (void);
GstElement* gst_pipeline_new (const gchar *name); GstElement* gst_pipeline_new (const gchar *name) G_GNUC_MALLOC;
GstBus* gst_pipeline_get_bus (GstPipeline *pipeline); GstBus* gst_pipeline_get_bus (GstPipeline *pipeline);
......
...@@ -143,7 +143,7 @@ guint gst_plugin_feature_get_rank (GstPluginFeature *featu ...@@ -143,7 +143,7 @@ guint gst_plugin_feature_get_rank (GstPluginFeature *featu
const gchar *gst_plugin_feature_get_name (GstPluginFeature *feature); const gchar *gst_plugin_feature_get_name (GstPluginFeature *feature);
void gst_plugin_feature_list_free (GList *list); void gst_plugin_feature_list_free (GList *list);
GList *gst_plugin_feature_list_copy (GList *list); GList *gst_plugin_feature_list_copy (GList *list) G_GNUC_MALLOC;
void gst_plugin_feature_list_debug (GList *list); void gst_plugin_feature_list_debug (GList *list);
/** /**
......
...@@ -63,8 +63,8 @@ typedef struct { ...@@ -63,8 +63,8 @@ typedef struct {
*/ */
#define GST_POLL_FD_INIT { -1, -1 } #define GST_POLL_FD_INIT { -1, -1 }
GstPoll* gst_poll_new (gboolean controllable); GstPoll* gst_poll_new (gboolean controllable) G_GNUC_MALLOC;
GstPoll* gst_poll_new_timer (void); GstPoll* gst_poll_new_timer (void) G_GNUC_MALLOC;
void gst_poll_free (GstPoll *set); void gst_poll_free (GstPoll *set);
void gst_poll_get_read_gpollfd (GstPoll *set, GPollFD *fd); void gst_poll_get_read_gpollfd (GstPoll *set, GPollFD *fd);
......
...@@ -78,9 +78,9 @@ struct _GstPresetInterface ...@@ -78,9 +78,9 @@ struct _GstPresetInterface
GType gst_preset_get_type(void); GType gst_preset_get_type(void);
gchar** gst_preset_get_preset_names (GstPreset *preset); gchar** gst_preset_get_preset_names (GstPreset *preset) G_GNUC_MALLOC;
gchar** gst_preset_get_property_names (GstPreset *preset); gchar** gst_preset_get_property_names (GstPreset *preset) G_GNUC_MALLOC;
gboolean gst_preset_load_preset (GstPreset *preset, const gchar *name); gboolean gst_preset_load_preset (GstPreset *preset, const gchar *name);
gboolean gst_preset_save_preset (GstPreset *preset, const gchar *name); gboolean gst_preset_save_preset (GstPreset *preset, const gchar *name);
......
...@@ -183,7 +183,7 @@ gboolean gst_query_types_contains (const GstQueryType *types, ...@@ -183,7 +183,7 @@ gboolean gst_query_types_contains (const GstQueryType *types,
const GstQueryTypeDefinition* const GstQueryTypeDefinition*
gst_query_type_get_details (GstQueryType type); gst_query_type_get_details (GstQueryType type);
GstIterator* gst_query_type_iterate_definitions (void); GstIterator* gst_query_type_iterate_definitions (void) G_GNUC_MALLOC;
/* refcounting */ /* refcounting */
/** /**
...@@ -253,30 +253,30 @@ gst_query_copy (const GstQuery * q) ...@@ -253,30 +253,30 @@ gst_query_copy (const GstQuery * q)
#define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q))) #define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q)))
/* position query */ /* position query */
GstQuery* gst_query_new_position (GstFormat format); GstQuery* gst_query_new_position (GstFormat format) G_GNUC_MALLOC;
void gst_query_set_position (GstQuery *query, GstFormat format, gint64 cur); void gst_query_set_position (GstQuery *query, GstFormat format, gint64 cur);
void gst_query_parse_position (GstQuery *query, GstFormat *format, gint64 *cur); void gst_query_parse_position (GstQuery *query, GstFormat *format, gint64 *cur);
/* duration query */ /* duration query */
GstQuery* gst_query_new_duration (GstFormat format); GstQuery* gst_query_new_duration (GstFormat format) G_GNUC_MALLOC;
void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duration); void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duration);
void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration); void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
/* latency query */ /* latency query */
GstQuery* gst_query_new_latency (void); GstQuery* gst_query_new_latency (void) G_GNUC_MALLOC;
void gst_query_set_latency (GstQuery *query, gboolean live, GstClockTime min_latency, void gst_query_set_latency (GstQuery *query, gboolean live, GstClockTime min_latency,
GstClockTime max_latency); GstClockTime max_latency);
void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency, void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency,
GstClockTime *max_latency); GstClockTime *max_latency);
/* convert query */ /* convert query */
GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format); GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format) G_GNUC_MALLOC;
void gst_query_set_convert (GstQuery *query, GstFormat src_format, gint64 src_value,