mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-01 09:43:55 +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 void ges_formatter_dispose (GObject * object);
|
||||||
static gboolean load_from_uri (GESFormatter * formatter, GESTimeline *
|
static gboolean load_from_uri (GESFormatter * formatter, GESTimeline *
|
||||||
timeline, gchar * uri);
|
timeline, const gchar * uri);
|
||||||
static gboolean save_to_uri (GESFormatter * formatter, GESTimeline *
|
static gboolean save_to_uri (GESFormatter * formatter, GESTimeline *
|
||||||
timeline, gchar * uri);
|
timeline, const gchar * uri);
|
||||||
static gboolean default_can_load_uri (gchar * uri);
|
static gboolean default_can_load_uri (const gchar * uri);
|
||||||
static gboolean default_can_save_uri (gchar * uri);
|
static gboolean default_can_save_uri (const gchar * uri);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_formatter_class_init (GESFormatterClass * klass)
|
ges_formatter_class_init (GESFormatterClass * klass)
|
||||||
|
@ -105,7 +105,7 @@ ges_formatter_dispose (GObject * object)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GESFormatter *
|
GESFormatter *
|
||||||
ges_formatter_new_for_uri (gchar * uri)
|
ges_formatter_new_for_uri (const gchar * uri)
|
||||||
{
|
{
|
||||||
if (ges_formatter_can_load_uri (uri))
|
if (ges_formatter_can_load_uri (uri))
|
||||||
return GES_FORMATTER (ges_keyfile_formatter_new ());
|
return GES_FORMATTER (ges_keyfile_formatter_new ());
|
||||||
|
@ -128,14 +128,14 @@ ges_default_formatter_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
default_can_load_uri (gchar * uri)
|
default_can_load_uri (const gchar * uri)
|
||||||
{
|
{
|
||||||
GST_ERROR ("No 'can_load_uri' vmethod implementation");
|
GST_ERROR ("No 'can_load_uri' vmethod implementation");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
default_can_save_uri (gchar * uri)
|
default_can_save_uri (const gchar * uri)
|
||||||
{
|
{
|
||||||
GST_ERROR ("No 'can_save_uri' vmethod implementation");
|
GST_ERROR ("No 'can_save_uri' vmethod implementation");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -153,7 +153,7 @@ default_can_save_uri (gchar * uri)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_formatter_can_load_uri (gchar * uri)
|
ges_formatter_can_load_uri (const gchar * uri)
|
||||||
{
|
{
|
||||||
if (!(gst_uri_is_valid (uri))) {
|
if (!(gst_uri_is_valid (uri))) {
|
||||||
GST_ERROR ("Invalid uri!");
|
GST_ERROR ("Invalid uri!");
|
||||||
|
@ -185,7 +185,7 @@ ges_formatter_can_load_uri (gchar * uri)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_formatter_can_save_uri (gchar * uri)
|
ges_formatter_can_save_uri (const gchar * uri)
|
||||||
{
|
{
|
||||||
if (!(gst_uri_is_valid (uri))) {
|
if (!(gst_uri_is_valid (uri))) {
|
||||||
GST_ERROR ("Invalid uri!");
|
GST_ERROR ("Invalid uri!");
|
||||||
|
@ -342,7 +342,7 @@ ges_formatter_save (GESFormatter * formatter, GESTimeline * timeline)
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||||
gchar * uri)
|
const gchar * uri)
|
||||||
{
|
{
|
||||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||||
|
|
||||||
|
@ -353,7 +353,8 @@ ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
load_from_uri (GESFormatter * formatter, GESTimeline * timeline, gchar * uri)
|
load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||||
|
const gchar * uri)
|
||||||
{
|
{
|
||||||
gchar *location;
|
gchar *location;
|
||||||
GError *e = NULL;
|
GError *e = NULL;
|
||||||
|
@ -400,7 +401,7 @@ load_from_uri (GESFormatter * formatter, GESTimeline * timeline, gchar * uri)
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
||||||
timeline, gchar * uri)
|
timeline, const gchar * uri)
|
||||||
{
|
{
|
||||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||||
GList *layers, *tmp;
|
GList *layers, *tmp;
|
||||||
|
@ -420,7 +421,8 @@ ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
save_to_uri (GESFormatter * formatter, GESTimeline * timeline, gchar * uri)
|
save_to_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||||
|
const gchar * uri)
|
||||||
{
|
{
|
||||||
gchar *location;
|
gchar *location;
|
||||||
GError *e = NULL;
|
GError *e = NULL;
|
||||||
|
|
|
@ -59,8 +59,8 @@ struct _GESFormatter {
|
||||||
gpointer _ges_reserved[GES_PADDING];
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef gboolean (*GESFormatterCanLoadURIMethod) (gchar * uri);
|
typedef gboolean (*GESFormatterCanLoadURIMethod) (const gchar * uri);
|
||||||
typedef gboolean (*GESFormatterCanSaveURIMethod) (gchar * uri);
|
typedef gboolean (*GESFormatterCanSaveURIMethod) (const gchar * uri);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESFormatterLoadFromURIMethod:
|
* GESFormatterLoadFromURIMethod:
|
||||||
|
@ -77,7 +77,7 @@ typedef gboolean (*GESFormatterCanSaveURIMethod) (gchar * uri);
|
||||||
**/
|
**/
|
||||||
typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
|
typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
|
||||||
GESTimeline *timeline,
|
GESTimeline *timeline,
|
||||||
gchar * uri);
|
const gchar * uri);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESFormatterSaveToURIMethod:
|
* GESFormatterSaveToURIMethod:
|
||||||
|
@ -94,7 +94,7 @@ typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
|
||||||
*/
|
*/
|
||||||
typedef gboolean (*GESFormatterSaveToURIMethod) (GESFormatter *formatter,
|
typedef gboolean (*GESFormatterSaveToURIMethod) (GESFormatter *formatter,
|
||||||
GESTimeline *timeline,
|
GESTimeline *timeline,
|
||||||
gchar * uri);
|
const gchar * uri);
|
||||||
typedef gboolean (*GESFormatterSaveMethod) (GESFormatter * formatter,
|
typedef gboolean (*GESFormatterSaveMethod) (GESFormatter * formatter,
|
||||||
GESTimeline * timeline);
|
GESTimeline * timeline);
|
||||||
typedef gboolean (*GESFormatterLoadMethod) (GESFormatter * formatter,
|
typedef gboolean (*GESFormatterLoadMethod) (GESFormatter * formatter,
|
||||||
|
@ -134,19 +134,19 @@ struct _GESFormatterClass {
|
||||||
GType ges_formatter_get_type (void);
|
GType ges_formatter_get_type (void);
|
||||||
|
|
||||||
/* Main Formatter methods */
|
/* 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);
|
GESFormatter *ges_default_formatter_new (void);
|
||||||
|
|
||||||
gboolean ges_formatter_can_load_uri (gchar * uri);
|
gboolean ges_formatter_can_load_uri (const gchar * uri);
|
||||||
gboolean ges_formatter_can_save_uri (gchar * uri);
|
gboolean ges_formatter_can_save_uri (const gchar * uri);
|
||||||
|
|
||||||
gboolean ges_formatter_load_from_uri (GESFormatter * formatter,
|
gboolean ges_formatter_load_from_uri (GESFormatter * formatter,
|
||||||
GESTimeline *timeline,
|
GESTimeline *timeline,
|
||||||
gchar *uri);
|
const gchar *uri);
|
||||||
|
|
||||||
gboolean ges_formatter_save_to_uri (GESFormatter * formatter,
|
gboolean ges_formatter_save_to_uri (GESFormatter * formatter,
|
||||||
GESTimeline *timeline,
|
GESTimeline *timeline,
|
||||||
gchar *uri);
|
const gchar *uri);
|
||||||
|
|
||||||
/* Non-standard methods. WILL BE DEPRECATED */
|
/* Non-standard methods. WILL BE DEPRECATED */
|
||||||
gboolean ges_formatter_load (GESFormatter * formatter,
|
gboolean ges_formatter_load (GESFormatter * formatter,
|
||||||
|
|
|
@ -257,7 +257,7 @@ ges_timeline_new (void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GESTimeline *
|
GESTimeline *
|
||||||
ges_timeline_new_from_uri (gchar * uri)
|
ges_timeline_new_from_uri (const gchar * uri)
|
||||||
{
|
{
|
||||||
GESTimeline *ret;
|
GESTimeline *ret;
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ ges_timeline_new_from_uri (gchar * uri)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_timeline_load_from_uri (GESTimeline * timeline, gchar * uri)
|
ges_timeline_load_from_uri (GESTimeline * timeline, const gchar * uri)
|
||||||
{
|
{
|
||||||
GESFormatter *p = NULL;
|
GESFormatter *p = NULL;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
@ -327,7 +327,7 @@ fail:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_timeline_save_to_uri (GESTimeline * timeline, gchar * uri)
|
ges_timeline_save_to_uri (GESTimeline * timeline, const gchar * uri)
|
||||||
{
|
{
|
||||||
GESFormatter *p = NULL;
|
GESFormatter *p = NULL;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
|
@ -83,10 +83,10 @@ struct _GESTimelineClass {
|
||||||
GType ges_timeline_get_type (void);
|
GType ges_timeline_get_type (void);
|
||||||
|
|
||||||
GESTimeline* ges_timeline_new (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_load_from_uri (GESTimeline *timeline, const gchar *uri);
|
||||||
gboolean ges_timeline_save_to_uri (GESTimeline *timeline, 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_add_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||||
gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||||
|
|
Loading…
Reference in a new issue