mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
Added pullregion in again, it got removed with the previous commit.
Original commit message from CVS: Added pullregion in again, it got removed with the previous commit.
This commit is contained in:
parent
990baba8e3
commit
cd24b35b70
4 changed files with 59 additions and 5 deletions
20
gst/gstbin.c
20
gst/gstbin.c
|
@ -17,6 +17,8 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "config.h"
|
||||
|
@ -568,8 +570,18 @@ gst_bin_src_wrapper (int argc,char *argv[])
|
|||
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);
|
||||
}
|
||||
|
@ -763,7 +775,7 @@ gst_bin_create_plan_func (GstBin *bin)
|
|||
// 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
|
||||
|
@ -909,7 +921,7 @@ gst_bin_iterate_func (GstBin *bin)
|
|||
|
||||
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);
|
||||
|
|
|
@ -108,6 +108,8 @@ fprintf(stderr,GST_DEBUG_PREFIX(format": leaving\n" , ## args ))
|
|||
#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
|
||||
|
||||
|
||||
|
|
37
gst/gstpad.c
37
gst/gstpad.c
|
@ -692,6 +692,41 @@ gst_pad_set_type_id (GstPad *pad,
|
|||
{
|
||||
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
|
||||
|
@ -783,7 +818,7 @@ gst_pad_load_and_connect (xmlNodePtr parent,
|
|||
|
||||
targetpad = gst_element_get_pad(target, split[1]);
|
||||
|
||||
g_return_if_fail(targetpad != NULL);
|
||||
if (targetpad == NULL) goto cleanup;
|
||||
|
||||
gst_pad_connect(pad, targetpad);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gnome-xml/parser.h>
|
||||
#include <gst/gstobject.h>
|
||||
#include <gst/gstbuffer.h>
|
||||
#include <gst/gstcaps.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -69,6 +70,7 @@ struct _GstPad {
|
|||
|
||||
gchar *name;
|
||||
GList *types;
|
||||
GstCaps *caps;
|
||||
|
||||
GstPadDirection direction;
|
||||
|
||||
|
@ -111,6 +113,9 @@ void gst_pad_set_type_id (GstPad *pad, guint16 id);
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue