mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
gst/: Wrap more GstIndexEntry methods and properties.
Original commit message from CVS: * gst/gst-types.defs: * gst/gst.defs: * gst/gst.override: Wrap more GstIndexEntry methods and properties.
This commit is contained in:
parent
4e04dc11c8
commit
0cfca146c5
4 changed files with 125 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-01-02 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
|
||||
* gst/gst-types.defs:
|
||||
* gst/gst.defs:
|
||||
* gst/gst.override:
|
||||
Wrap more GstIndexEntry methods and properties.
|
||||
|
||||
2008-12-31 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -287,8 +287,16 @@
|
|||
(in-module "Gst")
|
||||
(c-name "GstIndexEntry")
|
||||
(gtype-id "GST_TYPE_INDEX_ENTRY")
|
||||
(fields
|
||||
'("GstIndexEntryType" "type")
|
||||
'("gint" "id")
|
||||
'("gint" "NASSOCS")
|
||||
'("GstAssocFlags" "ASSOC_FLAGS")
|
||||
'("const-gchar*" "ID_DESCRIPTION")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define-pointer StaticPadTemplate
|
||||
(in-module "Gst")
|
||||
(c-name "GstStaticPadTemplate")
|
||||
|
|
18
gst/gst.defs
18
gst/gst.defs
|
@ -2585,6 +2585,24 @@
|
|||
)
|
||||
)
|
||||
|
||||
(define-method ASSOC_FORMAT
|
||||
(of-object "GstIndexEntry")
|
||||
(c-name "GST_INDEX_ASSOC_FORMAT")
|
||||
(return-type "GstFormat")
|
||||
(parameters
|
||||
'("guint" "i")
|
||||
)
|
||||
)
|
||||
|
||||
(define-method ASSOC_VALUE
|
||||
(of-object "GstIndexEntry")
|
||||
(c-name "GST_INDEX_ASSOC_VALUE")
|
||||
(return-type "gint64")
|
||||
(parameters
|
||||
'("guint" "i")
|
||||
)
|
||||
)
|
||||
|
||||
(define-function index_factory_get_type
|
||||
(c-name "gst_index_factory_get_type")
|
||||
(return-type "GType")
|
||||
|
|
|
@ -1594,3 +1594,95 @@ _wrap_g_error_new(PyGBoxed *self, PyObject *args, PyObject *kwargs)
|
|||
self->free_on_dealloc = TRUE;
|
||||
return 0;
|
||||
}
|
||||
%%
|
||||
override-attr GstIndexEntry.NASSOCS
|
||||
static PyObject *
|
||||
_wrap_gst_index_entry__get_NASSOCS(PyObject *self, void *closure)
|
||||
{
|
||||
GstIndexEntry *entry;
|
||||
|
||||
g_assert (self);
|
||||
entry = (GstIndexEntry*) pyg_boxed_get(self, GstIndexEntry);
|
||||
g_assert (entry);
|
||||
|
||||
if (entry->type != GST_INDEX_ENTRY_ASSOCIATION) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "IndexEntry is not an AssociationEntry");
|
||||
return NULL;
|
||||
}
|
||||
return PyInt_FromLong(GST_INDEX_NASSOCS(entry));
|
||||
}
|
||||
%%
|
||||
override-attr GstIndexEntry.ASSOC_FLAGS
|
||||
static PyObject *
|
||||
_wrap_gst_index_entry__get_ASSOC_FLAGS(PyObject *self, void *closure)
|
||||
{
|
||||
GstIndexEntry *entry;
|
||||
|
||||
g_assert (self);
|
||||
entry = (GstIndexEntry*) pyg_boxed_get(self, GstIndexEntry);
|
||||
g_assert (entry);
|
||||
|
||||
if (entry->type != GST_INDEX_ENTRY_ASSOCIATION) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "IndexEntry is not an AssociationEntry");
|
||||
return NULL;
|
||||
}
|
||||
return pyg_flags_from_gtype(GST_TYPE_ASSOC_FLAGS,
|
||||
GST_INDEX_ASSOC_FLAGS (entry));
|
||||
}
|
||||
%%
|
||||
override-attr GstIndexEntry.ID_DESCRIPTION
|
||||
static PyObject *
|
||||
_wrap_gst_index_entry__get_ID_DESCRIPTION(PyObject *self, void *closure)
|
||||
{
|
||||
GstIndexEntry *entry;
|
||||
|
||||
g_assert (self);
|
||||
entry = (GstIndexEntry*) pyg_boxed_get(self, GstIndexEntry);
|
||||
g_assert (entry);
|
||||
|
||||
if (entry->type != GST_INDEX_ENTRY_ID) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "IndexEntry is not an ID Entry");
|
||||
return NULL;
|
||||
}
|
||||
if (GST_INDEX_ID_DESCRIPTION (entry))
|
||||
return PyString_FromString(GST_INDEX_ID_DESCRIPTION (entry));
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
%%
|
||||
override-attr GstIndexEntry.FORMAT_FORMAT
|
||||
static PyObject *
|
||||
_wrap_gst_index_entry__get_FORMAT_FORMAT(PyObject *self, void *closure)
|
||||
{
|
||||
GstIndexEntry *entry;
|
||||
|
||||
g_assert (self);
|
||||
entry = (GstIndexEntry*) pyg_boxed_get(self, GstIndexEntry);
|
||||
g_assert (entry);
|
||||
|
||||
if (entry->type != GST_INDEX_ENTRY_FORMAT) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "IndexEntry is not a FORMAT Entry");
|
||||
return NULL;
|
||||
}
|
||||
return pyg_enum_from_gtype (GST_TYPE_FORMAT, GST_INDEX_FORMAT_FORMAT (entry));
|
||||
}
|
||||
%%
|
||||
override-attr GstIndexEntry.FORMAT_KEY
|
||||
static PyObject *
|
||||
_wrap_gst_index_entry__get_FORMAT_KEY(PyObject *self, void *closure)
|
||||
{
|
||||
GstIndexEntry *entry;
|
||||
|
||||
g_assert (self);
|
||||
entry = (GstIndexEntry*) pyg_boxed_get(self, GstIndexEntry);
|
||||
g_assert (entry);
|
||||
|
||||
if (entry->type != GST_INDEX_ENTRY_FORMAT) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "IndexEntry is not a FORMAT Entry");
|
||||
return NULL;
|
||||
}
|
||||
if (GST_INDEX_FORMAT_KEY (entry))
|
||||
return PyString_FromString(GST_INDEX_FORMAT_KEY (entry));
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue