g_print("init\n");
asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_pad_set_pull_function (asyncdisksrc->srcpad,gst_asyncdisksrc_pull);
+ gst_pad_set_pullregion_function (asyncdisksrc->srcpad,gst_asyncdisksrc_pull_region);
// FIXME must set pullregion
gst_element_add_pad (GST_ELEMENT (asyncdisksrc), asyncdisksrc->srcpad);
while (pads) {
pad = GST_PAD (pads->data);
if (pad->direction == GST_PAD_SRC) {
- if (pad->pullfunc == NULL) fprintf(stderr,"error, no pullfunc in \"%s\"\n", name);
- (pad->pullfunc)(pad);
+ region_struct *region = cothread_get_data (element->threadstate, "region");
+ if (region) {
+ //gst_src_push_region (GST_SRC (element), region->offset, region->size);
+ if (pad->pullregionfunc == NULL)
+ fprintf(stderr,"error, no pullregionfunc in \"%s\"\n", name);
+ (pad->pullregionfunc)(pad, region->offset, region->size);
+ }
+ else {
+ if (pad->pullfunc == NULL)
+ fprintf(stderr,"error, no pullfunc in \"%s\"\n", name);
+ (pad->pullfunc)(pad);
+ }
}
pads = g_list_next(pads);
}
}
if (!pad->pullfunc)
pad->pullfunc = gst_bin_pullfunc_proxy;
- if (!pad->pullfunc)
+ if (!pad->pullregionfunc)
pad->pullregionfunc = gst_bin_pullregionfunc_proxy;
/* we only worry about sink pads */
case GST_CAPS_LIST_ID:
g_print("gstcaps: list not allowed in list\n");
break;
+ case GST_CAPS_BOOL_ID:
+ entry->capstype = GST_CAPS_BOOL_ID_NUM;
+ entry->data.bool_data = GPOINTER_TO_INT (factory[i++]);
+ break;
default:
g_print("gstcaps: unknown caps id found\n");
g_free (entry);
entry->data.int_range_data.max);
break;
case GST_CAPS_FOURCC_ID_NUM:
- g_print("gstcaps: fourcc 0x%08x (%4.4s)\n", entry->data.fourcc_data, &entry->data.fourcc_data);
+ g_print("gstcaps: fourcc 0x%08x (%4.4s)\n", entry->data.fourcc_data, (gchar *)&entry->data.fourcc_data);
break;
case GST_CAPS_BOOL_ID_NUM:
g_print("gstcaps: boolean %d\n", entry->data.bool_data);
typedef struct _GstCaps GstCaps;
typedef gpointer GstCapsFactoryEntry;
typedef GstCapsFactoryEntry GstCapsFactory[];
+typedef GstCapsFactory *GstCapsListFactory[];
typedef enum {
GST_CAPS_END_ID_NUM = 0,
}
/**
+ * gst_pad_set_pullregion_function:
+ * @pad: the pad to set the pull function for
+ * @pull: the pull function
+ *
+ * Set the given pull function for the pad
+ */
+void
+gst_pad_set_pullregion_function (GstPad *pad,
+ GstPadPullRegionFunction pull)
+{
+ g_return_if_fail (pad != NULL);
+ g_return_if_fail (GST_IS_PAD (pad));
+
+ g_print("gstpad: pad setting pullregion function\n");
+
+ pad->pullregionfunc = pull;
+}
+
+/**
* gst_pad_set_chain_function:
* @pad: the pad to set the chain function for
* @chain: the chain function
g_print("init\n");
asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_pad_set_pull_function (asyncdisksrc->srcpad,gst_asyncdisksrc_pull);
+ gst_pad_set_pullregion_function (asyncdisksrc->srcpad,gst_asyncdisksrc_pull_region);
// FIXME must set pullregion
gst_element_add_pad (GST_ELEMENT (asyncdisksrc), asyncdisksrc->srcpad);