* Boston, MA 02111-1307, USA.
*/
+//#define GST_DEBUG_ENABLED
+
#include <gst/gst.h>
#include "config.h"
while (pads) {
pad = GST_PAD (pads->data);
if (pad->direction == GST_PAD_SRC) {
- if (pad->pullfunc == NULL) DEBUG("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);
}
// set the proxy functions
if (!pad->pullfunc)
pad->pullfunc = gst_bin_pullfunc_proxy;
- if (!pad->pullfunc)
+ if (!pad->pullregionfunc)
pad->pullregionfunc = gst_bin_pullregionfunc_proxy;
// ***** check for possible connections outside
while (entries) {
entry = GST_ELEMENT (entries->data);
- if (GST_IS_SRC (entry)) {
+ if (GST_IS_SRC (entry) || GST_IS_CONNECTION (entry)) {
pads = entry->pads;
while (pads) {
pad = GST_PAD (pads->data);
#define DEBUG(format, args...)
#define DEBUG_ENTER(format, args...)
#define DEBUG_LEAVE(format, args...)
+#define DEBUG_SET_STRING(format, args...)
+#define DEBUG_ENTER_STRING
#endif
{
gst_pad_add_type_id (pad, id);
}
+
+/**
+ * gst_pad_set_caps:
+ * @pad: the pad to set the caps to
+ * @caps: the caps to attach to this pad
+ *
+ * set the capabilities of this pad
+ */
+void
+gst_pad_set_caps (GstPad *pad,
+ GstCaps *caps)
+{
+ g_return_if_fail (pad != NULL);
+ g_return_if_fail (GST_IS_PAD (pad));
+ g_return_if_fail (caps != NULL);
+
+ pad->caps = caps;
+}
+/**
+ * gst_pad_get_caps:
+ * @pad: the pad to get the capabilities from
+ *
+ * get the capabilities of this pad
+ *
+ * Return; the capabilities of this pad
+ */
+GstCaps *
+gst_pad_get_caps (GstPad *pad)
+{
+ g_return_val_if_fail (pad != NULL, NULL);
+ g_return_val_if_fail (GST_IS_PAD (pad), NULL);
+
+ return pad->caps;
+}
+
/**
* gst_pad_set_type_id:
* @pad: the pad to set the type id to
targetpad = gst_element_get_pad(target, split[1]);
- g_return_if_fail(targetpad != NULL);
+ if (targetpad == NULL) goto cleanup;
gst_pad_connect(pad, targetpad);
#include <gnome-xml/parser.h>
#include <gst/gstobject.h>
#include <gst/gstbuffer.h>
+#include <gst/gstcaps.h>
#ifdef __cplusplus
gchar *name;
GList *types;
+ GstCaps *caps;
GstPadDirection direction;
GList* gst_pad_get_type_ids (GstPad *pad);
void gst_pad_add_type_id (GstPad *pad, guint16 id);
+void gst_pad_set_caps (GstPad *pad, GstCaps *caps);
+GstCaps* gst_pad_get_caps (GstPad *pad);
+
void gst_pad_set_name (GstPad *pad, const gchar *name);
const gchar* gst_pad_get_name (GstPad *pad);