summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-11-29 06:34:05 +0000
committerDavid Schleef <ds@schleef.org>2003-11-29 06:34:05 +0000
commit476dea14ad3d56837e23047a480e7d16beca6a5b (patch)
treeb08085ff7cbfacc212b353dd3bc8d6951e1b695a
parent58b18a36248e3cccd8657a4fd4ad4c914268f889 (diff)
Change 'const' to 'G_CONST_RETURN' in header filesCAPS-MERGE-2
Original commit message from CVS: Change 'const' to 'G_CONST_RETURN' in header files
-rw-r--r--gst/gst.h4
-rw-r--r--gst/gstbin.h3
-rw-r--r--gst/gstelement.h14
-rw-r--r--gst/gstformat.h5
-rw-r--r--gst/gstinfo.h12
-rw-r--r--gst/gstobject.h3
-rw-r--r--gst/gstpad.h20
-rw-r--r--gst/gstquery.h4
-rw-r--r--gst/gstscheduler.h2
-rw-r--r--gst/gsttag.h6
-rw-r--r--gst/gsttaginterface.h3
-rw-r--r--gst/gsttaglist.h6
-rw-r--r--gst/gsttagsetter.h3
-rw-r--r--gst/gsttrace.h2
-rw-r--r--gst/gstvalue.h4
15 files changed, 57 insertions, 34 deletions
diff --git a/gst/gst.h b/gst/gst.h
index adadf0c913..d2bbe88cd8 100644
--- a/gst/gst.h
+++ b/gst/gst.h
@@ -79,8 +79,8 @@ void gst_init_with_popt_table (int *argc, char **argv[],
gboolean gst_init_check_with_popt_table (int *argc, char **argv[],
const struct poptOption
*popt_options);
-const struct
-poptOption* gst_init_get_popt_table (void);
+G_CONST_RETURN struct poptOption*
+ gst_init_get_popt_table (void);
void gst_use_threads (gboolean use_threads);
gboolean gst_has_threads (void);
diff --git a/gst/gstbin.h b/gst/gstbin.h
index d4246a7010..92af83b4ee 100644
--- a/gst/gstbin.h
+++ b/gst/gstbin.h
@@ -110,7 +110,8 @@ void gst_bin_remove_many (GstBin *bin, GstElement *element_1, ...);
/* retrieve a single element or the list of children */
GstElement* gst_bin_get_by_name (GstBin *bin, const gchar *name);
GstElement* gst_bin_get_by_name_recurse_up (GstBin *bin, const gchar *name);
-const GList* gst_bin_get_list (GstBin *bin);
+G_CONST_RETURN GList*
+ gst_bin_get_list (GstBin *bin);
gboolean gst_bin_iterate (GstBin *bin);
diff --git a/gst/gstelement.h b/gst/gstelement.h
index 18622eeabc..8685163f96 100644
--- a/gst/gstelement.h
+++ b/gst/gstelement.h
@@ -310,7 +310,8 @@ GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
-const GList* gst_element_get_pad_list (GstElement *element);
+G_CONST_RETURN GList*
+ gst_element_get_pad_list (GstElement *element);
GstPad* gst_element_get_compatible_pad (GstElement *element, GstPad *pad);
GstPad* gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad,
GstCaps *filtercaps);
@@ -338,14 +339,17 @@ gboolean gst_element_link_pads_filtered (GstElement *src, const gchar *srcpadn
void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname,
GstElement *dest, const gchar *destpadname);
-const GstEventMask* gst_element_get_event_masks (GstElement *element);
+G_CONST_RETURN GstEventMask*
+ gst_element_get_event_masks (GstElement *element);
gboolean gst_element_send_event (GstElement *element, GstEvent *event);
gboolean gst_element_seek (GstElement *element, GstSeekType seek_type,
guint64 offset);
-const GstQueryType* gst_element_get_query_types (GstElement *element);
+G_CONST_RETURN GstQueryType*
+ gst_element_get_query_types (GstElement *element);
gboolean gst_element_query (GstElement *element, GstQueryType type,
GstFormat *format, gint64 *value);
-const GstFormat* gst_element_get_formats (GstElement *element);
+G_CONST_RETURN GstFormat*
+ gst_element_get_formats (GstElement *element);
gboolean gst_element_convert (GstElement *element,
GstFormat src_format, gint64 src_value,
GstFormat *dest_format, gint64 *dest_value);
@@ -367,7 +371,7 @@ GstElementStateReturn gst_element_set_state (GstElement *element, GstElementSta
void gst_element_wait_state_change (GstElement *element);
-const gchar* gst_element_state_get_name (GstElementState state);
+G_CONST_RETURN gchar* gst_element_state_get_name (GstElementState state);
GstElementFactory* gst_element_get_factory (GstElement *element);
diff --git a/gst/gstformat.h b/gst/gstformat.h
index 20bb28655f..4cc5d0431e 100644
--- a/gst/gstformat.h
+++ b/gst/gstformat.h
@@ -86,9 +86,10 @@ GstFormat gst_format_get_by_nick (const gchar *nick);
gboolean gst_formats_contains (const GstFormat *formats, GstFormat format);
/* query for format details */
-const GstFormatDefinition*
+G_CONST_RETURN GstFormatDefinition*
gst_format_get_details (GstFormat format);
-const GList* gst_format_get_definitions (void);
+G_CONST_RETURN GList*
+ gst_format_get_definitions (void);
G_END_DECLS
diff --git a/gst/gstinfo.h b/gst/gstinfo.h
index a1a91e8a99..6a16c83a7f 100644
--- a/gst/gstinfo.h
+++ b/gst/gstinfo.h
@@ -180,7 +180,8 @@ void gst_debug_log_default (GstDebugCategory * category,
gchar * message,
gpointer unused) G_GNUC_NO_INSTRUMENT;
-const gchar * gst_debug_level_get_name (GstDebugLevel level);
+G_CONST_RETURN gchar *
+ gst_debug_level_get_name (GstDebugLevel level);
void gst_debug_add_log_function (GstLogFunction func,
gpointer data);
@@ -268,9 +269,11 @@ void gst_debug_category_set_threshold (GstDebugCategory * category,
GstDebugLevel level);
void gst_debug_category_reset_threshold (GstDebugCategory * category);
GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory * category);
-const gchar * gst_debug_category_get_name (GstDebugCategory * category);
+G_CONST_RETURN gchar *
+ gst_debug_category_get_name (GstDebugCategory * category);
guint gst_debug_category_get_color (GstDebugCategory * category);
-const gchar * gst_debug_category_get_description (GstDebugCategory * category);
+G_CONST_RETURN gchar *
+ gst_debug_category_get_description (GstDebugCategory * category);
GSList * gst_debug_get_all_categories (void);
gchar * gst_debug_construct_term_color (guint colorinfo);
@@ -379,7 +382,8 @@ extern gboolean __gst_debug_enabled;
/********** function pointer stuff **********/
void* _gst_debug_register_funcptr (void * ptr,
gchar * ptrname);
-const gchar* _gst_debug_nameof_funcptr (void * ptr);
+G_CONST_RETURN gchar*
+ _gst_debug_nameof_funcptr (void * ptr);
#define GST_DEBUG_FUNCPTR(ptr) (_gst_debug_register_funcptr((void *)(ptr), #ptr) , ptr)
#define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr)
diff --git a/gst/gstobject.h b/gst/gstobject.h
index d8d1ebb1e7..741d320e55 100644
--- a/gst/gstobject.h
+++ b/gst/gstobject.h
@@ -125,7 +125,8 @@ GType gst_object_get_type (void);
/* name routines */
void gst_object_set_name (GstObject *object, const gchar *name);
-const gchar* gst_object_get_name (GstObject *object);
+G_CONST_RETURN gchar*
+ gst_object_get_name (GstObject *object);
/* parentage routines */
void gst_object_set_parent (GstObject *object, GstObject *parent);
diff --git a/gst/gstpad.h b/gst/gstpad.h
index 78c11b0a53..db0a22ce03 100644
--- a/gst/gstpad.h
+++ b/gst/gstpad.h
@@ -408,7 +408,7 @@ GstPad* gst_pad_custom_new (GType type, const gchar *name, GstPadDirection d
GstPad* gst_pad_custom_new_from_template (GType type, GstPadTemplate *templ, const gchar *name);
void gst_pad_set_name (GstPad *pad, const gchar *name);
-const gchar* gst_pad_get_name (GstPad *pad);
+G_CONST_RETURN gchar* gst_pad_get_name (GstPad *pad);
GstPadDirection gst_pad_get_direction (GstPad *pad);
@@ -438,8 +438,10 @@ void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain);
void gst_pad_set_get_function (GstPad *pad, GstPadGetFunction get);
void gst_pad_set_event_function (GstPad *pad, GstPadEventFunction event);
void gst_pad_set_event_mask_function (GstPad *pad, GstPadEventMaskFunction mask_func);
-const GstEventMask* gst_pad_get_event_masks (GstPad *pad);
-const GstEventMask* gst_pad_get_event_masks_default (GstPad *pad);
+G_CONST_RETURN GstEventMask*
+ gst_pad_get_event_masks (GstPad *pad);
+G_CONST_RETURN GstEventMask*
+ gst_pad_get_event_masks_default (GstPad *pad);
/* pad links */
void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link);
@@ -481,8 +483,10 @@ GstPad* gst_pad_selectv (GstPad *pad, ...);
/* convert/query/format functions */
void gst_pad_set_formats_function (GstPad *pad,
GstPadFormatsFunction formats);
-const GstFormat* gst_pad_get_formats (GstPad *pad);
-const GstFormat* gst_pad_get_formats_default (GstPad *pad);
+G_CONST_RETURN GstFormat*
+ gst_pad_get_formats (GstPad *pad);
+G_CONST_RETURN GstFormat*
+ gst_pad_get_formats_default (GstPad *pad);
void gst_pad_set_convert_function (GstPad *pad, GstPadConvertFunction convert);
gboolean gst_pad_convert (GstPad *pad,
@@ -494,8 +498,10 @@ gboolean gst_pad_convert_default (GstPad *pad,
void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query);
void gst_pad_set_query_type_function (GstPad *pad, GstPadQueryTypeFunction type_func);
-const GstQueryType* gst_pad_get_query_types (GstPad *pad);
-const GstQueryType* gst_pad_get_query_types_default (GstPad *pad);
+G_CONST_RETURN GstQueryType*
+ gst_pad_get_query_types (GstPad *pad);
+G_CONST_RETURN GstQueryType*
+ gst_pad_get_query_types_default (GstPad *pad);
gboolean gst_pad_query (GstPad *pad, GstQueryType type,
GstFormat *format, gint64 *value);
gboolean gst_pad_query_default (GstPad *pad, GstQueryType type,
diff --git a/gst/gstquery.h b/gst/gstquery.h
index e1a438a9c2..32053e2f84 100644
--- a/gst/gstquery.h
+++ b/gst/gstquery.h
@@ -86,9 +86,9 @@ GstQueryType gst_query_type_get_by_nick (const gchar *nick);
gboolean gst_query_types_contains (const GstQueryType *types, GstQueryType type);
/* query for query details */
-const GstQueryTypeDefinition*
+G_CONST_RETURN GstQueryTypeDefinition*
gst_query_type_get_details (GstQueryType type);
-const GList* gst_query_type_get_definitions (void);
+G_CONST_RETURN GList* gst_query_type_get_definitions (void);
G_END_DECLS
diff --git a/gst/gstscheduler.h b/gst/gstscheduler.h
index 21c4214aee..22cbf76187 100644
--- a/gst/gstscheduler.h
+++ b/gst/gstscheduler.h
@@ -181,7 +181,7 @@ GstScheduler* gst_scheduler_factory_create (GstSchedulerFactory *factory, GstE
GstScheduler* gst_scheduler_factory_make (const gchar *name, GstElement *parent);
void gst_scheduler_factory_set_default_name (const gchar* name);
-const gchar* gst_scheduler_factory_get_default_name (void);
+G_CONST_RETURN gchar* gst_scheduler_factory_get_default_name (void);
G_END_DECLS
diff --git a/gst/gsttag.h b/gst/gsttag.h
index 6d1efbe5a1..ddb690df9f 100644
--- a/gst/gsttag.h
+++ b/gst/gsttag.h
@@ -65,8 +65,10 @@ void gst_tag_merge_strings_with_comma (GValue * dest,
/* basic tag support */
gboolean gst_tag_exists (const gchar * tag);
GType gst_tag_get_type (const gchar * tag);
-const gchar * gst_tag_get_nick (const gchar * tag);
-const gchar * gst_tag_get_description (const gchar * tag);
+G_CONST_RETURN gchar *
+ gst_tag_get_nick (const gchar * tag);
+G_CONST_RETURN gchar *
+ gst_tag_get_description (const gchar * tag);
gboolean gst_tag_is_fixed (const gchar * tag);
/* tag lists */
diff --git a/gst/gsttaginterface.h b/gst/gsttaginterface.h
index cb85137910..642e4e3ee3 100644
--- a/gst/gsttaginterface.h
+++ b/gst/gsttaginterface.h
@@ -59,7 +59,8 @@ void gst_tag_setter_add_valist (GstTagSetter * setter,
GstTagMergeMode mode,
const gchar * tag,
va_list var_args);
-const GstTagList *gst_tag_setter_get_list (GstTagSetter * setter);
+G_CONST_RETURN GstTagList *
+ gst_tag_setter_get_list (GstTagSetter * setter);
void gst_tag_setter_set_merge_mode (GstTagSetter * setter,
GstTagMergeMode mode);
diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h
index 6d1efbe5a1..ddb690df9f 100644
--- a/gst/gsttaglist.h
+++ b/gst/gsttaglist.h
@@ -65,8 +65,10 @@ void gst_tag_merge_strings_with_comma (GValue * dest,
/* basic tag support */
gboolean gst_tag_exists (const gchar * tag);
GType gst_tag_get_type (const gchar * tag);
-const gchar * gst_tag_get_nick (const gchar * tag);
-const gchar * gst_tag_get_description (const gchar * tag);
+G_CONST_RETURN gchar *
+ gst_tag_get_nick (const gchar * tag);
+G_CONST_RETURN gchar *
+ gst_tag_get_description (const gchar * tag);
gboolean gst_tag_is_fixed (const gchar * tag);
/* tag lists */
diff --git a/gst/gsttagsetter.h b/gst/gsttagsetter.h
index cb85137910..642e4e3ee3 100644
--- a/gst/gsttagsetter.h
+++ b/gst/gsttagsetter.h
@@ -59,7 +59,8 @@ void gst_tag_setter_add_valist (GstTagSetter * setter,
GstTagMergeMode mode,
const gchar * tag,
va_list var_args);
-const GstTagList *gst_tag_setter_get_list (GstTagSetter * setter);
+G_CONST_RETURN GstTagList *
+ gst_tag_setter_get_list (GstTagSetter * setter);
void gst_tag_setter_set_merge_mode (GstTagSetter * setter,
GstTagMergeMode mode);
diff --git a/gst/gsttrace.h b/gst/gsttrace.h
index 7243415a7d..4e0e9ab856 100644
--- a/gst/gsttrace.h
+++ b/gst/gsttrace.h
@@ -86,7 +86,7 @@ struct _GstAllocTrace {
};
gboolean gst_alloc_trace_available (void);
-const GList* gst_alloc_trace_list (void);
+G_CONST_RETURN GList* gst_alloc_trace_list (void);
GstAllocTrace* _gst_alloc_trace_register (const gchar *name);
int gst_alloc_trace_live_all (void);
diff --git a/gst/gstvalue.h b/gst/gstvalue.h
index a6cc2a4d8c..e133229a10 100644
--- a/gst/gstvalue.h
+++ b/gst/gstvalue.h
@@ -74,13 +74,13 @@ void gst_value_set_double_range (GValue *value, double start, double end);
double gst_value_get_double_range_min (const GValue *value);
double gst_value_get_double_range_max (const GValue *value);
-const GstCaps2 *gst_value_get_caps (const GValue *value);
+G_CONST_RETURN GstCaps2 *gst_value_get_caps (const GValue *value);
void gst_value_set_caps (GValue *calue, const GstCaps2 *caps);
void gst_value_list_prepend_value (GValue *value, const GValue *prepend_value);
void gst_value_list_append_value (GValue *value, const GValue *prepend_value);
guint gst_value_list_get_size (const GValue *value);
-const GValue *gst_value_list_get_value (const GValue *value, guint index);
+G_CONST_RETURN GValue *gst_value_list_get_value (const GValue *value, guint index);
void gst_value_list_concat (GValue *dest, const GValue *value1, const GValue *value2);
void _gst_value_initialize (void);