Commit ef734d9a authored by David I. Lehn's avatar David I. Lehn

- add wrapper for gst_props_entry_gst_list() and method gst_list() to GstProps...

- add wrapper for gst_props_entry_gst_list() and method gst_list() to GstProps to access properties list

Original commit message from CVS:
- add wrapper for gst_props_entry_gst_list() and method gst_list() to GstProps
to access properties list
- add alias for gst_props_entry_get_type as _get_props_type() since _get_type()
is recognized as a GObject type function
parent 80222308
2003-02-06 David I. Lehn <dlehn@users.sourceforge.net>
* gstreamer/gstreamer-extra.defs, gstreamer/gstreamer.override: add
wrapper for gst_props_entry_gst_list() and method gst_list() to
GstProps to access properties list
* gstreamer/gstreamer-extra.defs, gstreamer/gstreamer-fixes.[ch]: add
alias for gst_props_entry_get_type as _get_props_type() since
_get_type() is recognized as a GObject type function
* examples/gstreamer/oggplay.py: rename to vorbisplay.py
* examples/gstreamer/vorbisplay.py: print out meta/stream info
* gstreamer/Makefile.am: add gstreamer.defs to CLEANFILES
2003-02-05 David I. Lehn <dlehn@users.sourceforge.net>
* configure.ac: require GStreamer core 0.6.0
......
......@@ -38,6 +38,26 @@
(gtype-id "GST_TYPE_PROPS_ENTRY")
)
;;
;; Override normal *_get_type handling via rename
;;
(define-method get_props_type
(of-object "GstPropsEntry")
(c-name "gst_props_entry_get_props_type")
(return-type "GstPropsType")
)
;;
;; Access GstProps properties list
;;
(define-method get_list
(of-object "GstProps")
(c-name "gst_props_get_list")
(return-type "const-GList*")
)
;;
;; Accelerate common GstBin iterate loop
;;
......
......@@ -62,3 +62,8 @@ guint add_iterate_bin(GstBin *bin) {
void remove_iterate_bin(guint id) {
g_source_remove(id);
}
GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry)
{
return gst_props_entry_get_type(entry);
}
......@@ -28,3 +28,4 @@
void iterate_bin_all(GstBin *bin);
guint add_iterate_bin(GstBin *bin);
void remove_iterate_bin(guint id);
GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry);
......@@ -434,3 +434,60 @@ _wrap_gst_props_entry_get_float_range(PyObject *self)
ret = gst_props_entry_get_float_range(pyg_boxed_get(self, GstPropsEntry), &min, &max);
return Py_BuildValue("(bff)", ret, min, max);
}
%%
override gst_props_entry_get_list
static PyObject *
_wrap_gst_props_entry_get_list(PyObject *self)
{
gboolean ret;
const GList *list;
PyObject *tuple, *obj;
int i;
list = NULL;
ret = gst_props_entry_get_list(pyg_boxed_get(self, GstPropsEntry), &list);
if (ret == TRUE) {
tuple = PyTuple_New(g_list_length(list));
for (i = 0; list != NULL; i++, list = g_list_next(list)) {
obj = pyg_boxed_new(GST_TYPE_PROPS_ENTRY, list->data, TRUE, TRUE);
PyTuple_SET_ITEM(tuple, i, obj);
}
} else {
tuple = Py_None;
Py_INCREF(tuple);
}
return Py_BuildValue("(bO)", ret, tuple);
}
%%
override gst_props_get_list
static gboolean
gst_props_get_list(GstProps *props, GList **list)
{
*list = GST_PROPS_PROPERTIES(props);
return TRUE;
}
static PyObject *
_wrap_gst_props_get_list(PyObject *self)
{
gboolean ret;
GList *list;
PyObject *tuple, *obj;
int i;
list = NULL;
ret = gst_props_get_list(pyg_boxed_get(self, GstProps), &list);
if (ret == TRUE) {
tuple = PyTuple_New(g_list_length(list));
for (i = 0; list != NULL; i++, list = g_list_next(list)) {
obj = pyg_boxed_new(GST_TYPE_PROPS_ENTRY, list->data, TRUE, TRUE);
PyTuple_SET_ITEM(tuple, i, obj);
}
} else {
tuple = Py_None;
Py_INCREF(tuple);
}
return Py_BuildValue("(bO)", ret, tuple);
}
......@@ -38,6 +38,26 @@
(gtype-id "GST_TYPE_PROPS_ENTRY")
)
;;
;; Override normal *_get_type handling via rename
;;
(define-method get_props_type
(of-object "GstPropsEntry")
(c-name "gst_props_entry_get_props_type")
(return-type "GstPropsType")
)
;;
;; Access GstProps properties list
;;
(define-method get_list
(of-object "GstProps")
(c-name "gst_props_get_list")
(return-type "const-GList*")
)
;;
;; Accelerate common GstBin iterate loop
;;
......
......@@ -62,3 +62,8 @@ guint add_iterate_bin(GstBin *bin) {
void remove_iterate_bin(guint id) {
g_source_remove(id);
}
GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry)
{
return gst_props_entry_get_type(entry);
}
......@@ -28,3 +28,4 @@
void iterate_bin_all(GstBin *bin);
guint add_iterate_bin(GstBin *bin);
void remove_iterate_bin(guint id);
GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry);
......@@ -434,3 +434,60 @@ _wrap_gst_props_entry_get_float_range(PyObject *self)
ret = gst_props_entry_get_float_range(pyg_boxed_get(self, GstPropsEntry), &min, &max);
return Py_BuildValue("(bff)", ret, min, max);
}
%%
override gst_props_entry_get_list
static PyObject *
_wrap_gst_props_entry_get_list(PyObject *self)
{
gboolean ret;
const GList *list;
PyObject *tuple, *obj;
int i;
list = NULL;
ret = gst_props_entry_get_list(pyg_boxed_get(self, GstPropsEntry), &list);
if (ret == TRUE) {
tuple = PyTuple_New(g_list_length(list));
for (i = 0; list != NULL; i++, list = g_list_next(list)) {
obj = pyg_boxed_new(GST_TYPE_PROPS_ENTRY, list->data, TRUE, TRUE);
PyTuple_SET_ITEM(tuple, i, obj);
}
} else {
tuple = Py_None;
Py_INCREF(tuple);
}
return Py_BuildValue("(bO)", ret, tuple);
}
%%
override gst_props_get_list
static gboolean
gst_props_get_list(GstProps *props, GList **list)
{
*list = GST_PROPS_PROPERTIES(props);
return TRUE;
}
static PyObject *
_wrap_gst_props_get_list(PyObject *self)
{
gboolean ret;
GList *list;
PyObject *tuple, *obj;
int i;
list = NULL;
ret = gst_props_get_list(pyg_boxed_get(self, GstProps), &list);
if (ret == TRUE) {
tuple = PyTuple_New(g_list_length(list));
for (i = 0; list != NULL; i++, list = g_list_next(list)) {
obj = pyg_boxed_new(GST_TYPE_PROPS_ENTRY, list->data, TRUE, TRUE);
PyTuple_SET_ITEM(tuple, i, obj);
}
} else {
tuple = Py_None;
Py_INCREF(tuple);
}
return Py_BuildValue("(bO)", ret, tuple);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment