)
)
+(define-method set_supported_formats
+ (of-object "GESTimelineObject")
+ (c-name "ges_timeline_object_set_supported_formats")
+ (return-type "none")
+ (parameters
+ '("GESTrackType" "supportedformats")
+ )
+)
+
(define-method set_is_image
(of-object "GESTimelineFileSource")
(c-name "ges_timeline_filesource_set_is_image")
)
(define-method get_supported_formats
+ (of-object "GESTimelineObject")
+ (c-name "ges_timeline_object_get_supported_formats")
+ (return-type "GESTrackType")
+)
+
+(define-method get_supported_formats
(of-object "GESTimelineFileSource")
(c-name "ges_timeline_filesource_get_supported_formats")
(return-type "GESTrackType")
ges_timeline_object_get_top_effect_position
ges_timeline_object_move_to_layer
ges_timeline_object_set_top_effect_priority
+ges_timeline_object_set_supported_formats
+ges_timeline_object_get_supported_formats
<SUBSECTION Standard>
GES_TIMELINE_OBJECT_DURATION
GES_TIMELINE_OBJECT_INPOINT
gboolean is_image;
guint64 maxduration;
-
- /* The formats supported by this filesource
- * TODO : Could maybe be moved to a parent class */
- GESTrackType supportedformats;
};
enum
PROP_URI,
PROP_MAX_DURATION,
PROP_MUTE,
- PROP_SUPPORTED_FORMATS,
PROP_IS_IMAGE,
};
case PROP_MAX_DURATION:
g_value_set_uint64 (value, priv->maxduration);
break;
- case PROP_SUPPORTED_FORMATS:
- g_value_set_flags (value, priv->supportedformats);
- break;
case PROP_IS_IMAGE:
g_value_set_boolean (value, priv->is_image);
break;
ges_timeline_filesource_set_max_duration (tfs,
g_value_get_uint64 (value));
break;
- case PROP_SUPPORTED_FORMATS:
- ges_timeline_filesource_set_supported_formats (tfs,
- g_value_get_flags (value));
- break;
case PROP_IS_IMAGE:
ges_timeline_filesource_set_is_image (tfs, g_value_get_boolean (value));
break;
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
/**
- * GESTimelineFileSource:supported-formats:
- *
- * The formats supported by the filesource.
- */
- g_object_class_install_property (object_class, PROP_SUPPORTED_FORMATS,
- g_param_spec_flags ("supported-formats", "Supported formats",
- "Formats supported by the file", GES_TYPE_TRACK_TYPE,
- GES_TRACK_TYPE_UNKNOWN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- /**
* GESTimelineFileSource:is-image:
*
* Whether this filesource represents a still image or not. This must be set
ges_timeline_filesource_set_supported_formats (GESTimelineFileSource * self,
GESTrackType supportedformats)
{
- self->priv->supportedformats = supportedformats;
+ ges_timeline_object_set_supported_formats (GES_TIMELINE_OBJECT (self),
+ supportedformats);
}
/**
GESTrackType
ges_timeline_filesource_get_supported_formats (GESTimelineFileSource * self)
{
- return self->priv->supportedformats;
+ return ges_timeline_object_get_supported_formats (GES_TIMELINE_OBJECT (self));
}
static GESTrackObject *
GESTimelineFileSourcePrivate *priv = GES_TIMELINE_FILE_SOURCE (obj)->priv;
GESTrackObject *res;
- if (!(priv->supportedformats & track->type)) {
+ if (!(ges_timeline_object_get_supported_formats (obj) & track->type)) {
GST_DEBUG ("We don't support this track format");
return NULL;
}
GList *mappings;
guint nb_effects;
+
+ /* The formats supported by this TimelineObject */
+ GESTrackType supportedformats;
};
enum
PROP_PRIORITY,
PROP_HEIGHT,
PROP_LAYER,
+ PROP_SUPPORTED_FORMATS,
PROP_LAST
};
case PROP_LAYER:
g_value_set_object (value, tobj->priv->layer);
break;
+ case PROP_SUPPORTED_FORMATS:
+ g_value_set_flags (value, tobj->priv->supportedformats);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
ges_timeline_object_set_priority_internal (tobj,
g_value_get_uint (value));
break;
+ case PROP_SUPPORTED_FORMATS:
+ ges_timeline_object_set_supported_formats (tobj,
+ g_value_get_flags (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
properties[PROP_HEIGHT]);
/**
+ * GESTimelineObject:supported-formats:
+ *
+ * The formats supported by the object.
+ *
+ * Since: 0.10.XX
+ */
+ properties[PROP_SUPPORTED_FORMATS] = g_param_spec_flags ("supported-formats",
+ "Supported formats", "Formats supported by the file",
+ GES_TYPE_TRACK_TYPE, GES_TRACK_TYPE_UNKNOWN,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+
+ g_object_class_install_property (object_class, PROP_SUPPORTED_FORMATS,
+ properties[PROP_SUPPORTED_FORMATS]);
+
+ /**
* GESTimelineObject:layer
*
* The GESTimelineLayer where this object is being used.
}
}
+/**
+ * ges_timeline_object_set_supported_formats:
+ * @self: the #GESTimelineObject to set supported formats on
+ * @supportedformats: the #GESTrackType defining formats supported by @self
+ *
+ * Sets the formats supported by the file.
+ *
+ * Since: 0.10.XX
+ */
+void
+ges_timeline_object_set_supported_formats (GESTimelineObject * self,
+ GESTrackType supportedformats)
+{
+ self->priv->supportedformats = supportedformats;
+}
+
+/**
+ * ges_timeline_object_get_supported_formats:
+ * @self: the #GESTimelineObject
+ *
+ * Get the formats supported by @self.
+ *
+ * Returns: The formats supported by @self.
+ *
+ * Since: 0.10.XX
+ */
+GESTrackType
+ges_timeline_object_get_supported_formats (GESTimelineObject * self)
+{
+ return self->priv->supportedformats;
+}
+
/*
* PROPERTY NOTIFICATIONS FROM TRACK OBJECTS
*/
#include <glib-object.h>
#include <gst/gst.h>
#include <ges/ges-types.h>
+#include <ges/ges-track.h>
G_BEGIN_DECLS
GESTrackEffect *effect,
guint newpriority);
+GESTrackType
+ges_timeline_object_get_supported_formats (GESTimelineObject * self);
+
+void
+ges_timeline_object_set_supported_formats (GESTimelineObject * self,
+ GESTrackType supportedformats);
+
G_END_DECLS
#endif /* _GES_TIMELINE_OBJECT */
KEY ("Object0", "in-point", "0");
KEY ("Object0", "duration", "2000000000");
KEY ("Object0", "priority", "2");
+ KEY ("Object0", "supported-formats", "GES_TRACK_TYPE_UNKNOWN");
KEY ("Object0", "mute", "false");
KEY ("Object0", "vpattern", "100% Black");
KEY ("Object0", "freq", "440");
KEY ("Object1", "in-point", "0");
KEY ("Object1", "duration", "500000000");
KEY ("Object1", "priority", "1");
+ KEY ("Object1", "supported-formats", "GES_TRACK_TYPE_UNKNOWN");
KEY ("Object1", "vtype", "A bar moves from left to right");
COMPARE;
KEY ("Object2", "in-point", "0");
KEY ("Object2", "duration", "2000000000");
KEY ("Object2", "priority", "3");
+ KEY ("Object2", "supported-formats", "GES_TRACK_TYPE_UNKNOWN");
KEY ("Object2", "mute", "false");
KEY ("Object2", "vpattern", "100% Black");
KEY ("Object2", "freq", "440");
KEY ("Object3", "in-point", "0");
KEY ("Object3", "duration", "1000000000");
KEY ("Object3", "priority", "0");
+ KEY ("Object3", "supported-formats", "GES_TRACK_TYPE_UNKNOWN");
KEY ("Object3", "mute", "false");
KEY ("Object3", "text", "\"the\\\\ quick\\\\ brown\\\\ fox\"");
KEY ("Object3", "font-desc", "\"Serif\\\\ 36\"");