mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
ges: make uri strings const
This commit is contained in:
parent
b04055de40
commit
a35a29a810
4 changed files with 30 additions and 28 deletions
|
@ -56,11 +56,11 @@ struct _GESFormatterPrivate
|
|||
|
||||
static void ges_formatter_dispose (GObject * object);
|
||||
static gboolean load_from_uri (GESFormatter * formatter, GESTimeline *
|
||||
timeline, gchar * uri);
|
||||
timeline, const gchar * uri);
|
||||
static gboolean save_to_uri (GESFormatter * formatter, GESTimeline *
|
||||
timeline, gchar * uri);
|
||||
static gboolean default_can_load_uri (gchar * uri);
|
||||
static gboolean default_can_save_uri (gchar * uri);
|
||||
timeline, const gchar * uri);
|
||||
static gboolean default_can_load_uri (const gchar * uri);
|
||||
static gboolean default_can_save_uri (const gchar * uri);
|
||||
|
||||
static void
|
||||
ges_formatter_class_init (GESFormatterClass * klass)
|
||||
|
@ -105,7 +105,7 @@ ges_formatter_dispose (GObject * object)
|
|||
*/
|
||||
|
||||
GESFormatter *
|
||||
ges_formatter_new_for_uri (gchar * uri)
|
||||
ges_formatter_new_for_uri (const gchar * uri)
|
||||
{
|
||||
if (ges_formatter_can_load_uri (uri))
|
||||
return GES_FORMATTER (ges_keyfile_formatter_new ());
|
||||
|
@ -128,14 +128,14 @@ ges_default_formatter_new (void)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
default_can_load_uri (gchar * uri)
|
||||
default_can_load_uri (const gchar * uri)
|
||||
{
|
||||
GST_ERROR ("No 'can_load_uri' vmethod implementation");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
default_can_save_uri (gchar * uri)
|
||||
default_can_save_uri (const gchar * uri)
|
||||
{
|
||||
GST_ERROR ("No 'can_save_uri' vmethod implementation");
|
||||
return FALSE;
|
||||
|
@ -153,7 +153,7 @@ default_can_save_uri (gchar * uri)
|
|||
*/
|
||||
|
||||
gboolean
|
||||
ges_formatter_can_load_uri (gchar * uri)
|
||||
ges_formatter_can_load_uri (const gchar * uri)
|
||||
{
|
||||
if (!(gst_uri_is_valid (uri))) {
|
||||
GST_ERROR ("Invalid uri!");
|
||||
|
@ -185,7 +185,7 @@ ges_formatter_can_load_uri (gchar * uri)
|
|||
*/
|
||||
|
||||
gboolean
|
||||
ges_formatter_can_save_uri (gchar * uri)
|
||||
ges_formatter_can_save_uri (const gchar * uri)
|
||||
{
|
||||
if (!(gst_uri_is_valid (uri))) {
|
||||
GST_ERROR ("Invalid uri!");
|
||||
|
@ -342,7 +342,7 @@ ges_formatter_save (GESFormatter * formatter, GESTimeline * timeline)
|
|||
|
||||
gboolean
|
||||
ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||
gchar * uri)
|
||||
const gchar * uri)
|
||||
{
|
||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||
|
||||
|
@ -353,7 +353,8 @@ ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
load_from_uri (GESFormatter * formatter, GESTimeline * timeline, gchar * uri)
|
||||
load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||
const gchar * uri)
|
||||
{
|
||||
gchar *location;
|
||||
GError *e = NULL;
|
||||
|
@ -400,7 +401,7 @@ load_from_uri (GESFormatter * formatter, GESTimeline * timeline, gchar * uri)
|
|||
|
||||
gboolean
|
||||
ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
||||
timeline, gchar * uri)
|
||||
timeline, const gchar * uri)
|
||||
{
|
||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||
GList *layers, *tmp;
|
||||
|
@ -420,7 +421,8 @@ ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
|||
}
|
||||
|
||||
static gboolean
|
||||
save_to_uri (GESFormatter * formatter, GESTimeline * timeline, gchar * uri)
|
||||
save_to_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||
const gchar * uri)
|
||||
{
|
||||
gchar *location;
|
||||
GError *e = NULL;
|
||||
|
|
|
@ -59,8 +59,8 @@ struct _GESFormatter {
|
|||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
typedef gboolean (*GESFormatterCanLoadURIMethod) (gchar * uri);
|
||||
typedef gboolean (*GESFormatterCanSaveURIMethod) (gchar * uri);
|
||||
typedef gboolean (*GESFormatterCanLoadURIMethod) (const gchar * uri);
|
||||
typedef gboolean (*GESFormatterCanSaveURIMethod) (const gchar * uri);
|
||||
|
||||
/**
|
||||
* GESFormatterLoadFromURIMethod:
|
||||
|
@ -77,7 +77,7 @@ typedef gboolean (*GESFormatterCanSaveURIMethod) (gchar * uri);
|
|||
**/
|
||||
typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
|
||||
GESTimeline *timeline,
|
||||
gchar * uri);
|
||||
const gchar * uri);
|
||||
|
||||
/**
|
||||
* GESFormatterSaveToURIMethod:
|
||||
|
@ -94,7 +94,7 @@ typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
|
|||
*/
|
||||
typedef gboolean (*GESFormatterSaveToURIMethod) (GESFormatter *formatter,
|
||||
GESTimeline *timeline,
|
||||
gchar * uri);
|
||||
const gchar * uri);
|
||||
typedef gboolean (*GESFormatterSaveMethod) (GESFormatter * formatter,
|
||||
GESTimeline * timeline);
|
||||
typedef gboolean (*GESFormatterLoadMethod) (GESFormatter * formatter,
|
||||
|
@ -134,19 +134,19 @@ struct _GESFormatterClass {
|
|||
GType ges_formatter_get_type (void);
|
||||
|
||||
/* Main Formatter methods */
|
||||
GESFormatter *ges_formatter_new_for_uri (gchar *uri);
|
||||
GESFormatter *ges_formatter_new_for_uri (const gchar *uri);
|
||||
GESFormatter *ges_default_formatter_new (void);
|
||||
|
||||
gboolean ges_formatter_can_load_uri (gchar * uri);
|
||||
gboolean ges_formatter_can_save_uri (gchar * uri);
|
||||
gboolean ges_formatter_can_load_uri (const gchar * uri);
|
||||
gboolean ges_formatter_can_save_uri (const gchar * uri);
|
||||
|
||||
gboolean ges_formatter_load_from_uri (GESFormatter * formatter,
|
||||
GESTimeline *timeline,
|
||||
gchar *uri);
|
||||
const gchar *uri);
|
||||
|
||||
gboolean ges_formatter_save_to_uri (GESFormatter * formatter,
|
||||
GESTimeline *timeline,
|
||||
gchar *uri);
|
||||
const gchar *uri);
|
||||
|
||||
/* Non-standard methods. WILL BE DEPRECATED */
|
||||
gboolean ges_formatter_load (GESFormatter * formatter,
|
||||
|
|
|
@ -257,7 +257,7 @@ ges_timeline_new (void)
|
|||
*/
|
||||
|
||||
GESTimeline *
|
||||
ges_timeline_new_from_uri (gchar * uri)
|
||||
ges_timeline_new_from_uri (const gchar * uri)
|
||||
{
|
||||
GESTimeline *ret;
|
||||
|
||||
|
@ -288,7 +288,7 @@ ges_timeline_new_from_uri (gchar * uri)
|
|||
*/
|
||||
|
||||
gboolean
|
||||
ges_timeline_load_from_uri (GESTimeline * timeline, gchar * uri)
|
||||
ges_timeline_load_from_uri (GESTimeline * timeline, const gchar * uri)
|
||||
{
|
||||
GESFormatter *p = NULL;
|
||||
gboolean ret = FALSE;
|
||||
|
@ -327,7 +327,7 @@ fail:
|
|||
*/
|
||||
|
||||
gboolean
|
||||
ges_timeline_save_to_uri (GESTimeline * timeline, gchar * uri)
|
||||
ges_timeline_save_to_uri (GESTimeline * timeline, const gchar * uri)
|
||||
{
|
||||
GESFormatter *p = NULL;
|
||||
gboolean ret = FALSE;
|
||||
|
|
|
@ -83,10 +83,10 @@ struct _GESTimelineClass {
|
|||
GType ges_timeline_get_type (void);
|
||||
|
||||
GESTimeline* ges_timeline_new (void);
|
||||
GESTimeline* ges_timeline_new_from_uri (gchar *uri);
|
||||
GESTimeline* ges_timeline_new_from_uri (const gchar *uri);
|
||||
|
||||
gboolean ges_timeline_load_from_uri (GESTimeline *timeline, gchar *uri);
|
||||
gboolean ges_timeline_save_to_uri (GESTimeline *timeline, gchar *uri);
|
||||
gboolean ges_timeline_load_from_uri (GESTimeline *timeline, const gchar *uri);
|
||||
gboolean ges_timeline_save_to_uri (GESTimeline *timeline, const gchar *uri);
|
||||
|
||||
gboolean ges_timeline_add_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
|
|
Loading…
Reference in a new issue