+2005-11-21 Edward Hervey <edward@fluendo.com>
+
+ * gst/gst-types.defs:
+ * gst/gst.defs:
+ API updates
+ * gst/pygstvalue.c: (pygst_value_as_pyobject),
+ (pygst_value_from_pyobject):
+ Fixes for gst_value_array and GST_FOURCC_FORMAT
+
2005-11-21 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gst.defs:
)
)
+(define-flags EventTypeFlags
+ (in-module "Gst")
+ (c-name "GstEventTypeFlags")
+ (gtype-id "GST_TYPE_EVENT_TYPE_FLAGS")
+ (values
+ '("upstream" "GST_EVENT_TYPE_UPSTREAM")
+ '("downstream" "GST_EVENT_TYPE_DOWNSTREAM")
+ '("serialized" "GST_EVENT_TYPE_SERIALIZED")
+ )
+)
+
(define-enum EventType
(in-module "Gst")
(c-name "GstEventType")
'("qos" "GST_EVENT_QOS")
'("seek" "GST_EVENT_SEEK")
'("navigation" "GST_EVENT_NAVIGATION")
- '("custom-up" "GST_EVENT_CUSTOM_UP")
- '("custom-ds" "GST_EVENT_CUSTOM_DS")
- '("custom-ds-oob" "GST_EVENT_CUSTOM_DS_OOB")
+ '("custom-upstream" "GST_EVENT_CUSTOM_UPSTREAM")
+ '("custom-downstream" "GST_EVENT_CUSTOM_DOWNSTREAM")
+ '("custom-downstream-oob" "GST_EVENT_CUSTOM_DOWNSTREAM_OOB")
'("custom-both" "GST_EVENT_CUSTOM_BOTH")
'("custom-both-oob" "GST_EVENT_CUSTOM_BOTH_OOB")
)
(return-type "GType")
)
+(define-function gst_event_type_flags_get_type
+ (c-name "gst_event_type_flags_get_type")
+ (return-type "GType")
+)
+
(define-function event_type_get_type
(c-name "gst_event_type_get_type")
(return-type "GType")
(return-type "GQuark")
)
+(define-method get_flags
+ (of-object "GstEventType")
+ (c-name "gst_event_type_get_flags")
+ (return-type "GstEventTypeFlags")
+)
+
(define-function event_get_type
(c-name "gst_event_get_type")
(return-type "GType")
)
)
-(define-function event_new_filler
- (c-name "gst_event_new_filler")
- (return-type "GstEvent*")
- (caller-owns-return #t)
-)
-
(define-function event_new_buffersize
(c-name "gst_event_new_buffersize")
(return-type "GstEvent*")
)
)
+(define-method set_last_stop
+ (of-object "GstSegment")
+ (c-name "gst_segment_set_last_stop")
+ (return-type "none")
+ (parameters
+ '("GstFormat" "format")
+ '("gint64" "position")
+ )
+)
+
(define-method set_seek
(of-object "GstSegment")
(c-name "gst_segment_set_seek")
)
)
-(define-function caps_structure_fixate_field_nearest_int
+(define-method fixate_field_nearest_int
+ (of-object "GstStructure")
(c-name "gst_structure_fixate_field_nearest_int")
(return-type "gboolean")
(parameters
- '("GstStructure*" "structure")
'("const-char*" "field_name")
'("int" "target")
)
)
-(define-function caps_structure_fixate_field_nearest_double
+(define-method fixate_field_nearest_double
+ (of-object "GstStructure")
(c-name "gst_structure_fixate_field_nearest_double")
(return-type "gboolean")
(parameters
- '("GstStructure*" "structure")
'("const-char*" "field_name")
'("double" "target")
)
)
+(define-method fixate_field_boolean
+ (of-object "GstStructure")
+ (c-name "gst_structure_fixate_field_boolean")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "field_name")
+ '("gboolean" "target")
+ )
+)
+
+
;; From ../gstreamer/gst/gstsystemclock.h
PyErr_Clear();
if (GST_VALUE_HOLDS_FOURCC (value)) {
gchar str[5];
- g_snprintf (str, 5, GST_FOURCC_FORMAT,
+ g_snprintf (str, 5, "%"GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (gst_value_get_fourcc (value)));
ret = PyObject_Call (gstfourcc_class, Py_BuildValue ("(s)", str), NULL);
} else if (GST_VALUE_HOLDS_INT_RANGE (value)) {
}
} else if (GST_VALUE_HOLDS_ARRAY (value)) {
int i, len;
- len = gst_value_list_get_size (value);
+ len = gst_value_array_get_size (value);
ret = PyTuple_New (len);
for (i=0; i<len; i++) {
PyTuple_SetItem (ret, i,
pygst_value_as_pyobject
- (gst_value_list_get_value (value, i), copy_boxed));
+ (gst_value_array_get_value (value, i), copy_boxed));
}
} else if (GST_VALUE_HOLDS_FRACTION (value)) {
ret = PyObject_Call
g_value_unset (&new);
return -1;
}
- gst_value_list_append_value (value, &new);
+ gst_value_array_append_value (value, &new);
g_value_unset (&new);
}
return 0;