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.
This commit is contained in:
Tim-Philipp Müller 2011-11-26 18:57:44 +00:00
parent 33078aaeb7
commit c8380cb0d2
25 changed files with 139 additions and 139 deletions

View file

@ -39,7 +39,7 @@ G_BEGIN_DECLS
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_unref (GstAtomicQueue * queue);

View file

@ -300,9 +300,9 @@ struct _GstBufferClass {
GType gst_buffer_get_type (void);
/* allocation */
GstBuffer * gst_buffer_new (void);
GstBuffer * gst_buffer_new_and_alloc (guint size);
GstBuffer * gst_buffer_try_new_and_alloc (guint size);
GstBuffer * gst_buffer_new (void) G_GNUC_MALLOC;
GstBuffer * gst_buffer_new_and_alloc (guint size) G_GNUC_MALLOC;
GstBuffer * gst_buffer_try_new_and_alloc (guint size) G_GNUC_MALLOC;
/**
* gst_buffer_set_data:
@ -490,11 +490,11 @@ GstCaps* gst_buffer_get_caps (GstBuffer *buffer);
void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps);
/* 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 */
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:

View file

@ -218,7 +218,7 @@ GstBuffer * gst_buffer_list_get (GstBufferList *l
/* iterator */
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);
guint gst_buffer_list_iterator_n_buffers (const GstBufferListIterator *it);

View file

@ -208,18 +208,18 @@ struct _GstStaticCaps {
};
GType gst_caps_get_type (void);
GstCaps * gst_caps_new_empty (void);
GstCaps * gst_caps_new_any (void);
GstCaps * gst_caps_new_empty (void) G_GNUC_MALLOC;
GstCaps * gst_caps_new_any (void) G_GNUC_MALLOC;
GstCaps * gst_caps_new_simple (const char *media_type,
const char *fieldname,
...);
GstCaps * gst_caps_new_full (GstStructure *struct1, ...);
...) G_GNUC_MALLOC;
GstCaps * gst_caps_new_full (GstStructure *struct1, ...) G_GNUC_MALLOC;
GstCaps * gst_caps_new_full_valist (GstStructure *structure,
va_list var_args);
va_list var_args) G_GNUC_MALLOC;
/* reference counting */
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;
void gst_caps_unref (GstCaps *caps);
@ -240,8 +240,8 @@ guint gst_caps_get_size (const GstCaps *caps);
GstStructure * gst_caps_get_structure (const GstCaps *caps,
guint index);
GstStructure * gst_caps_steal_structure (GstCaps *caps,
guint index);
GstCaps * gst_caps_copy_nth (const GstCaps *caps, guint nth);
guint index) G_GNUC_WARN_UNUSED_RESULT;
GstCaps * gst_caps_copy_nth (const GstCaps *caps, guint nth) G_GNUC_MALLOC;
void gst_caps_truncate (GstCaps *caps);
void gst_caps_set_value (GstCaps *caps,
const char *field,
@ -274,15 +274,15 @@ gboolean gst_caps_is_strictly_equal (const GstCaps *caps1,
/* operations */
GstCaps * gst_caps_intersect (const GstCaps *caps1,
const GstCaps *caps2);
const GstCaps *caps2) G_GNUC_MALLOC;
GstCaps * gst_caps_intersect_full (const GstCaps *caps1,
const GstCaps *caps2,
GstCapsIntersectMode mode);
GstCapsIntersectMode mode) G_GNUC_MALLOC;
GstCaps * gst_caps_subtract (const GstCaps *minuend,
const GstCaps *subtrahend);
const GstCaps *subtrahend) G_GNUC_MALLOC;
GstCaps * gst_caps_union (const GstCaps *caps1,
const GstCaps *caps2);
GstCaps * gst_caps_normalize (const GstCaps *caps);
const GstCaps *caps2) G_GNUC_MALLOC;
GstCaps * gst_caps_normalize (const GstCaps *caps) G_GNUC_MALLOC;
gboolean gst_caps_do_simplify (GstCaps *caps);
#if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_DISABLE_DEPRECATED)
@ -294,8 +294,8 @@ GstCaps * gst_caps_load_thyself (xmlNodePtr parent);
/* utility */
void gst_caps_replace (GstCaps **caps,
GstCaps *newcaps);
gchar * gst_caps_to_string (const GstCaps *caps);
GstCaps * gst_caps_from_string (const gchar *string);
gchar * gst_caps_to_string (const GstCaps *caps) G_GNUC_MALLOC;
GstCaps * gst_caps_from_string (const gchar *string) G_GNUC_MALLOC;
G_END_DECLS

View file

@ -45,19 +45,19 @@ gint gst_date_time_get_second (const GstDateTime * datetime);
gint gst_date_time_get_microsecond (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_utc (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) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_local_time (gint year, gint month,
gint day, gint hour,
gint minute,
gdouble seconds);
gdouble seconds) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new (gfloat tzoffset,
gint year, gint month,
gint day, gint hour,
gint minute,
gdouble seconds);
GstDateTime *gst_date_time_new_now_local_time (void);
GstDateTime *gst_date_time_new_now_utc (void);
gdouble seconds) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_now_local_time (void) G_GNUC_MALLOC;
GstDateTime *gst_date_time_new_now_utc (void) G_GNUC_MALLOC;
GstDateTime *gst_date_time_ref (GstDateTime * datetime);
void gst_date_time_unref (GstDateTime * datetime);

View file

@ -160,8 +160,8 @@ gboolean gst_element_factory_has_interface (GstElementFacto
const gchar *interfacename);
GstElement* gst_element_factory_create (GstElementFactory *factory,
const gchar *name);
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name);
const gchar *name) G_GNUC_MALLOC;
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name) G_GNUC_MALLOC;
/* FIXME 0.11: move these two into our private headers */
void __gst_element_factory_add_static_pad_template (GstElementFactory *elementfactory,
@ -303,12 +303,12 @@ gboolean gst_element_factory_list_is_type (GstElementFactory *factory,
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,
GstPadDirection direction,
gboolean subsetonly);
gboolean subsetonly) G_GNUC_MALLOC;
G_END_DECLS
#endif /* __GST_ELEMENT_FACTORY_H__ */

View file

@ -441,7 +441,7 @@ gst_event_copy (const GstEvent * 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 *
gst_event_get_structure (GstEvent *event);
@ -453,22 +453,22 @@ guint32 gst_event_get_seqnum (GstEvent *event);
void gst_event_set_seqnum (GstEvent *event, guint32 seqnum);
/* flush events */
GstEvent * gst_event_new_flush_start (void);
GstEvent * gst_event_new_flush_stop (void);
GstEvent * gst_event_new_flush_start (void) G_GNUC_MALLOC;
GstEvent * gst_event_new_flush_stop (void) G_GNUC_MALLOC;
/* EOS event */
GstEvent * gst_event_new_eos (void);
GstEvent * gst_event_new_eos (void) G_GNUC_MALLOC;
/* newsegment events */
GstEvent* gst_event_new_new_segment (gboolean update, gdouble rate,
GstFormat format,
gint64 start, gint64 stop,
gint64 position);
gint64 position) G_GNUC_MALLOC;
GstEvent* gst_event_new_new_segment_full (gboolean update, gdouble rate,
gdouble applied_rate,
GstFormat format,
gint64 start, gint64 stop,
gint64 position);
gint64 position) G_GNUC_MALLOC;
void gst_event_parse_new_segment (GstEvent *event,
gboolean *update,
gdouble *rate,
@ -484,20 +484,20 @@ void gst_event_parse_new_segment_full (GstEvent *event,
gint64 *position);
/* 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);
/* buffer */
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,
gint64 *maxsize, gboolean *async);
/* QOS events */
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,
GstClockTimeDiff diff, GstClockTime timestamp);
GstClockTimeDiff diff, GstClockTime timestamp) G_GNUC_MALLOC;
void gst_event_parse_qos (GstEvent *event, gdouble *proportion, GstClockTimeDiff *diff,
GstClockTime *timestamp);
void gst_event_parse_qos_full (GstEvent *event, GstQOSType *type,
@ -506,21 +506,21 @@ void gst_event_parse_qos_full (GstEvent *event, GstQOSType *ty
/* seek event */
GstEvent* gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
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,
GstSeekFlags *flags,
GstSeekType *start_type, gint64 *start,
GstSeekType *stop_type, gint64 *stop);
/* navigation event */
GstEvent* gst_event_new_navigation (GstStructure *structure);
GstEvent* gst_event_new_navigation (GstStructure *structure) G_GNUC_MALLOC;
/* 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);
/* step event */
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,
gdouble *rate, gboolean *flush, gboolean *intermediate);

View file

@ -65,7 +65,7 @@ GstProxyPad* gst_proxy_pad_get_internal (GstProxyPad *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_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_chain_default (GstPad *pad, GstBuffer *buffer);
GstFlowReturn gst_proxy_pad_chain_list_default (GstPad *pad, GstBufferList *list);
@ -112,11 +112,11 @@ struct _GstGhostPadClass
GType gst_ghost_pad_get_type (void);
GstPad* gst_ghost_pad_new (const gchar *name, GstPad *target);
GstPad* gst_ghost_pad_new_no_target (const gchar *name, GstPadDirection dir);
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) G_GNUC_MALLOC;
GstPad* gst_ghost_pad_new_from_template (const gchar *name, GstPad * target, GstPadTemplate * templ);
GstPad* gst_ghost_pad_new_no_target_from_template (const gchar *name, 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) G_GNUC_MALLOC;
GstPad* gst_ghost_pad_get_target (GstGhostPad *gpad);
gboolean gst_ghost_pad_set_target (GstGhostPad *gpad, GstPad *newtarget);

View file

@ -63,13 +63,13 @@ struct _GstIndexFactoryClass {
GType gst_index_factory_get_type (void);
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);
GstIndexFactory* gst_index_factory_find (const gchar *name);
GstIndex* gst_index_factory_create (GstIndexFactory *factory);
GstIndex* gst_index_factory_make (const gchar *name);
GstIndex* gst_index_factory_create (GstIndexFactory *factory) G_GNUC_MALLOC;
GstIndex* gst_index_factory_make (const gchar *name) G_GNUC_MALLOC;
G_END_DECLS

View file

@ -229,7 +229,7 @@ GstIterator* gst_iterator_new (guint size,
GstIteratorNextFunction next,
GstIteratorItemFunction item,
GstIteratorResyncFunction resync,
GstIteratorFreeFunction free);
GstIteratorFreeFunction free) G_GNUC_MALLOC;
GstIterator* gst_iterator_new_list (GType type,
GMutex *lock,
@ -237,12 +237,12 @@ GstIterator* gst_iterator_new_list (GType type,
GList **list,
gpointer owner,
GstIteratorItemFunction item,
GstIteratorDisposeFunction free);
GstIteratorDisposeFunction free) G_GNUC_MALLOC;
GstIterator* gst_iterator_new_single (GType type,
gpointer object,
GstCopyFunction copy,
GFreeFunc free);
GFreeFunc free) G_GNUC_MALLOC;
/* using iterators */
GstIteratorResult gst_iterator_next (GstIterator *it, gpointer *elem);
@ -253,7 +253,7 @@ void gst_iterator_push (GstIterator *it, GstIterator *other);
/* higher-order functions that operate on iterators */
GstIterator* gst_iterator_filter (GstIterator *it, GCompareFunc func,
gpointer user_data);
gpointer user_data) G_GNUC_MALLOC;
GstIteratorResult gst_iterator_fold (GstIterator *it,
GstIteratorFoldFunction func,
GValue *ret, gpointer user_data);

View file

@ -386,29 +386,29 @@ guint32 gst_message_get_seqnum (GstMessage *message);
void gst_message_set_seqnum (GstMessage *message, guint32 seqnum);
/* EOS */
GstMessage * gst_message_new_eos (GstObject * src);
GstMessage * gst_message_new_eos (GstObject * src) G_GNUC_MALLOC;
/* ERROR */
GstMessage * gst_message_new_error (GstObject * src, GError * error, const gchar * debug);
GstMessage * gst_message_new_error (GstObject * src, GError * error, const gchar * debug) G_GNUC_MALLOC;
void gst_message_parse_error (GstMessage *message, GError **gerror, gchar **debug);
/* WARNING */
GstMessage * gst_message_new_warning (GstObject * src, GError * error, const gchar * debug);
GstMessage * gst_message_new_warning (GstObject * src, GError * error, const gchar * debug) G_GNUC_MALLOC;
void gst_message_parse_warning (GstMessage *message, GError **gerror, gchar **debug);
/* INFO */
GstMessage * gst_message_new_info (GstObject * src, GError * error, const gchar * debug);
GstMessage * gst_message_new_info (GstObject * src, GError * error, const gchar * debug) G_GNUC_MALLOC;
void gst_message_parse_info (GstMessage *message, GError **gerror, gchar **debug);
/* TAG */
GstMessage * gst_message_new_tag (GstObject * src, GstTagList * tag_list);
GstMessage * gst_message_new_tag_full (GstObject * src, GstPad *pad, GstTagList * tag_list);
GstMessage * gst_message_new_tag (GstObject * src, GstTagList * tag_list) G_GNUC_MALLOC;
GstMessage * gst_message_new_tag_full (GstObject * src, GstPad *pad, GstTagList * tag_list) G_GNUC_MALLOC;
void gst_message_parse_tag (GstMessage *message, GstTagList **tag_list);
void gst_message_parse_tag_full (GstMessage *message, GstPad **pad, GstTagList **tag_list);
/* BUFFERING */
GstMessage * gst_message_new_buffering (GstObject * src, gint percent);
GstMessage * gst_message_new_buffering (GstObject * src, gint percent) G_GNUC_MALLOC;
void gst_message_parse_buffering (GstMessage *message, gint *percent);
void gst_message_set_buffering_stats (GstMessage *message, GstBufferingMode mode,
gint avg_in, gint avg_out,
@ -419,93 +419,93 @@ void gst_message_parse_buffering_stats (GstMessage *message, GstBuffe
/* STATE_CHANGED */
GstMessage * gst_message_new_state_changed (GstObject * src, GstState oldstate,
GstState newstate, GstState pending);
GstState newstate, GstState pending) G_GNUC_MALLOC;
void gst_message_parse_state_changed (GstMessage *message, GstState *oldstate,
GstState *newstate, GstState *pending);
/* STATE_DIRTY */
GstMessage * gst_message_new_state_dirty (GstObject * src);
GstMessage * gst_message_new_state_dirty (GstObject * src) G_GNUC_MALLOC;
/* STEP_DONE */
GstMessage * gst_message_new_step_done (GstObject * src, GstFormat format, guint64 amount,
gdouble rate, gboolean flush, gboolean intermediate,
guint64 duration, gboolean eos);
guint64 duration, gboolean eos) G_GNUC_MALLOC;
void gst_message_parse_step_done (GstMessage * message, GstFormat *format, guint64 *amount,
gdouble *rate, gboolean *flush, gboolean *intermediate,
guint64 *duration, gboolean *eos);
/* CLOCK_PROVIDE */
GstMessage * gst_message_new_clock_provide (GstObject * src, GstClock *clock, gboolean ready);
GstMessage * gst_message_new_clock_provide (GstObject * src, GstClock *clock, gboolean ready) G_GNUC_MALLOC;
void gst_message_parse_clock_provide (GstMessage *message, GstClock **clock,
gboolean *ready);
/* CLOCK_LOST */
GstMessage * gst_message_new_clock_lost (GstObject * src, GstClock *clock);
GstMessage * gst_message_new_clock_lost (GstObject * src, GstClock *clock) G_GNUC_MALLOC;
void gst_message_parse_clock_lost (GstMessage *message, GstClock **clock);
/* NEW_CLOCK */
GstMessage * gst_message_new_new_clock (GstObject * src, GstClock *clock);
GstMessage * gst_message_new_new_clock (GstObject * src, GstClock *clock) G_GNUC_MALLOC;
void gst_message_parse_new_clock (GstMessage *message, GstClock **clock);
/* APPLICATION */
GstMessage * gst_message_new_application (GstObject * src, GstStructure * structure);
GstMessage * gst_message_new_application (GstObject * src, GstStructure * structure) G_GNUC_MALLOC;
/* ELEMENT */
GstMessage * gst_message_new_element (GstObject * src, GstStructure * structure);
GstMessage * gst_message_new_element (GstObject * src, GstStructure * structure) G_GNUC_MALLOC;
/* SEGMENT_START */
GstMessage * gst_message_new_segment_start (GstObject * src, GstFormat format, gint64 position);
GstMessage * gst_message_new_segment_start (GstObject * src, GstFormat format, gint64 position) G_GNUC_MALLOC;
void gst_message_parse_segment_start (GstMessage *message, GstFormat *format,
gint64 *position);
/* SEGMENT_DONE */
GstMessage * gst_message_new_segment_done (GstObject * src, GstFormat format, gint64 position);
GstMessage * gst_message_new_segment_done (GstObject * src, GstFormat format, gint64 position) G_GNUC_MALLOC;
void gst_message_parse_segment_done (GstMessage *message, GstFormat *format,
gint64 *position);
/* DURATION */
GstMessage * gst_message_new_duration (GstObject * src, GstFormat format, gint64 duration);
GstMessage * gst_message_new_duration (GstObject * src, GstFormat format, gint64 duration) G_GNUC_MALLOC;
void gst_message_parse_duration (GstMessage *message, GstFormat *format,
gint64 *duration);
/* LATENCY */
GstMessage * gst_message_new_latency (GstObject * src);
GstMessage * gst_message_new_latency (GstObject * src) G_GNUC_MALLOC;
/* ASYNC_START */
GstMessage * gst_message_new_async_start (GstObject * src, gboolean new_base_time);
GstMessage * gst_message_new_async_start (GstObject * src, gboolean new_base_time) G_GNUC_MALLOC;
void gst_message_parse_async_start (GstMessage *message, gboolean *new_base_time);
/* ASYNC_DONE */
GstMessage * gst_message_new_async_done (GstObject * src);
GstMessage * gst_message_new_async_done (GstObject * src) G_GNUC_MALLOC;
/* STRUCTURE CHANGE */
GstMessage * gst_message_new_structure_change (GstObject * src, GstStructureChangeType type,
GstElement *owner, gboolean busy);
GstElement *owner, gboolean busy) G_GNUC_MALLOC;
void gst_message_parse_structure_change (GstMessage *message, GstStructureChangeType *type,
GstElement **owner, gboolean *busy);
/* STREAM STATUS */
GstMessage * gst_message_new_stream_status (GstObject * src, GstStreamStatusType type,
GstElement *owner);
GstElement *owner) G_GNUC_MALLOC;
void gst_message_parse_stream_status (GstMessage *message, GstStreamStatusType *type,
GstElement **owner);
void gst_message_set_stream_status_object (GstMessage *message, const GValue *object);
const GValue * gst_message_get_stream_status_object (GstMessage *message);
/* REQUEST_STATE */
GstMessage * gst_message_new_request_state (GstObject * src, GstState state);
GstMessage * gst_message_new_request_state (GstObject * src, GstState state) G_GNUC_MALLOC;
void gst_message_parse_request_state (GstMessage * message, GstState *state);
/* STEP_START */
GstMessage * gst_message_new_step_start (GstObject * src, gboolean active, GstFormat format,
guint64 amount, gdouble rate, gboolean flush,
gboolean intermediate);
gboolean intermediate) G_GNUC_MALLOC;
void gst_message_parse_step_start (GstMessage * message, gboolean *active, GstFormat *format,
guint64 *amount, gdouble *rate, gboolean *flush,
gboolean *intermediate);
/* QOS */
GstMessage * gst_message_new_qos (GstObject * src, gboolean live, guint64 running_time,
guint64 stream_time, guint64 timestamp, guint64 duration);
guint64 stream_time, guint64 timestamp, guint64 duration) G_GNUC_MALLOC;
void gst_message_set_qos_values (GstMessage * message, gint64 jitter, gdouble proportion,
gint quality);
void gst_message_set_qos_stats (GstMessage * message, GstFormat format, guint64 processed,
@ -518,7 +518,7 @@ void gst_message_parse_qos_stats (GstMessage * message, GstFormat
guint64 * dropped);
/* PROGRESS */
GstMessage * gst_message_new_progress (GstObject * src, GstProgressType type, const gchar *code,
const gchar *text);
const gchar *text) G_GNUC_MALLOC;
void gst_message_parse_progress (GstMessage * message, GstProgressType * type, gchar ** code,
gchar ** text);
@ -526,7 +526,7 @@ void gst_message_parse_progress (GstMessage * message, GstPro
/* custom messages */
GstMessage * gst_message_new_custom (GstMessageType type,
GstObject * src,
GstStructure * structure);
GstStructure * structure) G_GNUC_MALLOC;
const GstStructure * gst_message_get_structure (GstMessage *message);
G_END_DECLS

View file

@ -188,8 +188,8 @@ struct _GstMiniObjectClass {
GType gst_mini_object_get_type (void);
GstMiniObject* gst_mini_object_new (GType type);
GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object);
GstMiniObject* gst_mini_object_new (GType type) G_GNUC_MALLOC;
GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object) G_GNUC_MALLOC;
gboolean gst_mini_object_is_writable (const 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);
GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick,
const char *blurb, GType object_type,
GParamFlags flags);
GParamFlags flags) G_GNUC_MALLOC;
/* GValue stuff */

View file

@ -182,7 +182,7 @@ GType gst_static_pad_template_get_type (void);
GstPadTemplate* gst_pad_template_new (const gchar *name_template,
GstPadDirection direction, GstPadPresence presence,
GstCaps *caps);
GstCaps *caps) G_GNUC_MALLOC;
GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *pad_template);
GstCaps* gst_static_pad_template_get_caps (GstStaticPadTemplate *templ);

View file

@ -120,7 +120,7 @@ GParamSpec * gst_param_spec_fraction (const gchar * name,
gint min_num, gint min_denom,
gint max_num, gint max_denom,
gint default_num, gint default_denom,
GParamFlags flags);
GParamFlags flags) G_GNUC_MALLOC;
G_END_DECLS

View file

@ -89,9 +89,9 @@ typedef struct _GstParseContext GstParseContext;
/* create, process and free a parse context */
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);
@ -99,20 +99,20 @@ void gst_parse_context_free (GstParseContext * context);
/* parse functions */
GstElement * gst_parse_launch (const gchar * pipeline_description,
GError ** error);
GError ** error) G_GNUC_MALLOC;
GstElement * gst_parse_launchv (const gchar ** argv,
GError ** error);
GError ** error) G_GNUC_MALLOC;
GstElement * gst_parse_launch_full (const gchar * pipeline_description,
GstParseContext * context,
GstParseFlags flags,
GError ** error);
GError ** error) G_GNUC_MALLOC;
GstElement * gst_parse_launchv_full (const gchar ** argv,
GstParseContext * context,
GstParseFlags flags,
GError ** error);
GError ** error) G_GNUC_MALLOC;
G_END_DECLS

View file

@ -89,7 +89,7 @@ struct _GstPipelineClass {
};
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);

View file

@ -143,7 +143,7 @@ guint gst_plugin_feature_get_rank (GstPluginFeature *featu
const gchar *gst_plugin_feature_get_name (GstPluginFeature *feature);
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);
/**

View file

@ -63,8 +63,8 @@ typedef struct {
*/
#define GST_POLL_FD_INIT { -1, -1 }
GstPoll* gst_poll_new (gboolean controllable);
GstPoll* gst_poll_new_timer (void);
GstPoll* gst_poll_new (gboolean controllable) G_GNUC_MALLOC;
GstPoll* gst_poll_new_timer (void) G_GNUC_MALLOC;
void gst_poll_free (GstPoll *set);
void gst_poll_get_read_gpollfd (GstPoll *set, GPollFD *fd);

View file

@ -78,9 +78,9 @@ struct _GstPresetInterface
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_save_preset (GstPreset *preset, const gchar *name);

View file

@ -183,7 +183,7 @@ gboolean gst_query_types_contains (const GstQueryType *types,
const GstQueryTypeDefinition*
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 */
/**
@ -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)))
/* 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_parse_position (GstQuery *query, GstFormat *format, gint64 *cur);
/* 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_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
/* 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,
GstClockTime max_latency);
void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency,
GstClockTime *max_latency);
/* 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,
GstFormat dest_format, gint64 dest_value);
void gst_query_parse_convert (GstQuery *query, GstFormat *src_format, gint64 *src_value,
GstFormat *dest_format, gint64 *dest_value);
/* segment query */
GstQuery* gst_query_new_segment (GstFormat format);
GstQuery* gst_query_new_segment (GstFormat format) G_GNUC_MALLOC;
void gst_query_set_segment (GstQuery *query, gdouble rate, GstFormat format,
gint64 start_value, gint64 stop_value);
void gst_query_parse_segment (GstQuery *query, gdouble *rate, GstFormat *format,
@ -284,11 +284,11 @@ void gst_query_parse_segment (GstQuery *query, gdouble *rate,
/* application specific query */
GstQuery * gst_query_new_application (GstQueryType type,
GstStructure *structure);
GstStructure *structure) G_GNUC_MALLOC;
GstStructure * gst_query_get_structure (GstQuery *query);
/* seeking query */
GstQuery* gst_query_new_seeking (GstFormat format);
GstQuery* gst_query_new_seeking (GstFormat format) G_GNUC_MALLOC;
void gst_query_set_seeking (GstQuery *query, GstFormat format,
gboolean seekable,
gint64 segment_start,
@ -298,14 +298,14 @@ void gst_query_parse_seeking (GstQuery *query, GstFormat *for
gint64 *segment_start,
gint64 *segment_end);
/* formats query */
GstQuery* gst_query_new_formats (void);
GstQuery* gst_query_new_formats (void) G_GNUC_MALLOC;
void gst_query_set_formats (GstQuery *query, gint n_formats, ...);
void gst_query_set_formatsv (GstQuery *query, gint n_formats, const GstFormat *formats);
void gst_query_parse_formats_length (GstQuery *query, guint *n_formats);
void gst_query_parse_formats_nth (GstQuery *query, guint nth, GstFormat *format);
/* buffering query */
GstQuery* gst_query_new_buffering (GstFormat format);
GstQuery* gst_query_new_buffering (GstFormat format) G_GNUC_MALLOC;
void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent);
void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent);
@ -332,7 +332,7 @@ gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
gint64 *stop);
/* URI query */
GstQuery * gst_query_new_uri (void);
GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
void gst_query_parse_uri (GstQuery *query, gchar **uri);
void gst_query_set_uri (GstQuery *query, const gchar *uri);

View file

@ -73,8 +73,8 @@ struct _GstSegment {
GType gst_segment_get_type (void);
GstSegment * gst_segment_new (void);
GstSegment * gst_segment_copy (GstSegment *segment);
GstSegment * gst_segment_new (void) G_GNUC_MALLOC;
GstSegment * gst_segment_copy (GstSegment *segment) G_GNUC_MALLOC;
void gst_segment_free (GstSegment *segment);
void gst_segment_init (GstSegment *segment, GstFormat format);

View file

@ -88,18 +88,18 @@ struct _GstStructure {
GType gst_structure_get_type (void);
GstStructure * gst_structure_empty_new (const gchar * name);
GstStructure * gst_structure_id_empty_new (GQuark quark);
GstStructure * gst_structure_empty_new (const gchar * name) G_GNUC_MALLOC;
GstStructure * gst_structure_id_empty_new (GQuark quark) G_GNUC_MALLOC;
GstStructure * gst_structure_new (const gchar * name,
const gchar * firstfield,
...);
...) G_GNUC_MALLOC;
GstStructure * gst_structure_new_valist (const gchar * name,
const gchar * firstfield,
va_list varargs);
va_list varargs) G_GNUC_MALLOC;
GstStructure * gst_structure_id_new (GQuark name_quark,
GQuark field_quark,
...);
GstStructure * gst_structure_copy (const GstStructure *structure);
...) G_GNUC_MALLOC;
GstStructure * gst_structure_copy (const GstStructure *structure) G_GNUC_MALLOC;
void gst_structure_set_parent_refcount (GstStructure *structure,
gint *refcount);
void gst_structure_free (GstStructure *structure);
@ -226,9 +226,9 @@ gboolean gst_structure_get_fraction (const GstStructure
gint *value_numerator,
gint *value_denominator);
gchar * gst_structure_to_string (const GstStructure *structure);
gchar * gst_structure_to_string (const GstStructure *structure) G_GNUC_MALLOC;
GstStructure * gst_structure_from_string (const gchar *string,
gchar **end);
gchar **end) G_GNUC_MALLOC;
gboolean gst_structure_fixate_field_nearest_int (GstStructure *structure,
const char *field_name,
@ -255,7 +255,7 @@ gboolean gst_structure_is_subset(const GstStructure *subset,
gboolean gst_structure_can_intersect(const GstStructure *struct1,
const GstStructure *struct2);
GstStructure* gst_structure_intersect (const GstStructure *struct1,
const GstStructure *struct2);
const GstStructure *struct2) G_GNUC_MALLOC;
G_END_DECLS

View file

@ -211,15 +211,15 @@ GstTagFlag gst_tag_get_flag (const gchar * tag);
gboolean gst_tag_is_fixed (const gchar * tag);
/* tag lists */
GstTagList * gst_tag_list_new (void);
GstTagList * gst_tag_list_new_full (const gchar * tag, ...);
GstTagList * gst_tag_list_new_full_valist (va_list var_args);
GstTagList * gst_tag_list_new (void) G_GNUC_MALLOC;
GstTagList * gst_tag_list_new_full (const gchar * tag, ...) G_GNUC_MALLOC;
GstTagList * gst_tag_list_new_full_valist (va_list var_args) G_GNUC_MALLOC;
gchar * gst_tag_list_to_string (const GstTagList * list);
GstTagList * gst_tag_list_new_from_string (const gchar * str);
gchar * gst_tag_list_to_string (const GstTagList * list) G_GNUC_MALLOC;
GstTagList * gst_tag_list_new_from_string (const gchar * str) G_GNUC_MALLOC;
gboolean gst_is_tag_list (gconstpointer p);
GstTagList * gst_tag_list_copy (const GstTagList * list);
GstTagList * gst_tag_list_copy (const GstTagList * list) G_GNUC_MALLOC;
gboolean gst_tag_list_is_empty (const GstTagList * list);
gboolean gst_tag_list_is_equal (const GstTagList * list1,
const GstTagList * list2);
@ -228,7 +228,7 @@ void gst_tag_list_insert (GstTagList * into,
GstTagMergeMode mode);
GstTagList * gst_tag_list_merge (const GstTagList * list1,
const GstTagList * list2,
GstTagMergeMode mode);
GstTagMergeMode mode) G_GNUC_MALLOC;
void gst_tag_list_free (GstTagList * list);
guint gst_tag_list_get_tag_size (const GstTagList * list,
const gchar * tag);

View file

@ -126,25 +126,25 @@ gboolean gst_uri_protocol_is_valid (const gchar * protocol);
gboolean gst_uri_protocol_is_supported (const GstURIType type,
const gchar *protocol);
gboolean gst_uri_is_valid (const gchar * uri);
gchar * gst_uri_get_protocol (const gchar * uri);
gchar * gst_uri_get_protocol (const gchar * uri) G_GNUC_MALLOC;
gboolean gst_uri_has_protocol (const gchar * uri,
const gchar * protocol);
gchar * gst_uri_get_location (const gchar * uri);
gchar * gst_uri_get_location (const gchar * uri) G_GNUC_MALLOC;
gchar * gst_uri_construct (const gchar * protocol,
const gchar * location);
const gchar * location) G_GNUC_MALLOC;
gchar * gst_filename_to_uri (const gchar * filename,
GError ** error);
GError ** error) G_GNUC_MALLOC;
GstElement * gst_element_make_from_uri (const GstURIType type,
const gchar * uri,
const gchar * elementname);
const gchar * elementname) G_GNUC_MALLOC;
/* accessing the interface */
GType gst_uri_handler_get_type (void);
guint gst_uri_handler_get_uri_type (GstURIHandler * handler);
gchar ** gst_uri_handler_get_protocols (GstURIHandler * handler);
gchar ** gst_uri_handler_get_protocols (GstURIHandler * handler) G_GNUC_MALLOC;
const gchar * gst_uri_handler_get_uri (GstURIHandler * handler);
gboolean gst_uri_handler_set_uri (GstURIHandler * handler,
const gchar * uri);

View file

@ -454,7 +454,7 @@ void gst_value_register (const GstValueTable *table);
void gst_value_init_and_copy (GValue *dest,
const GValue *src);
gchar * gst_value_serialize (const GValue *value);
gchar * gst_value_serialize (const GValue *value) G_GNUC_MALLOC;
gboolean gst_value_deserialize (GValue *dest,
const gchar *src);