mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
if a named pad doesn't exist, try creating a new pad using the padtemplate name. eg int2float src%d!sink%d float2int
Original commit message from CVS: if a named pad doesn't exist, try creating a new pad using the padtemplate name. eg int2float src%d!sink%d float2int
This commit is contained in:
parent
aec1cc5b17
commit
42d724726c
1 changed files with 12 additions and 4 deletions
|
@ -169,9 +169,12 @@ gst_parse_launch_cmdline(int argc,char *argv[],GstBin *parent,gst_parse_priv *pr
|
|||
if (!srcpadname || !strchr(srcpadname,',')) {
|
||||
if (srcpadname != NULL) {
|
||||
srcpad = gst_element_get_pad(previous,srcpadname);
|
||||
if (!srcpad) {
|
||||
srcpad = gst_element_request_pad_by_name(previous,srcpadname);
|
||||
}
|
||||
if (!srcpad) {
|
||||
GST_DEBUG(0,"NO SUCH pad %s in element %s\n",srcpadname,GST_ELEMENT_NAME(previous));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (srcpad == NULL) {
|
||||
// check through the list to find the first sink pad
|
||||
|
@ -252,9 +255,14 @@ if (GST_IS_GHOST_PAD(srcpad)) GST_DEBUG(0,"it's a ghost pad\n");
|
|||
|
||||
sinkpad = NULL;
|
||||
|
||||
if (sinkpadname != NULL)
|
||||
sinkpad = gst_element_get_pad(previous,sinkpadname);
|
||||
|
||||
if (sinkpadname != NULL){
|
||||
sinkpad = gst_element_get_pad(element,sinkpadname);
|
||||
|
||||
if (!sinkpad) {
|
||||
sinkpad = gst_element_request_pad_by_name(element,sinkpadname);
|
||||
}
|
||||
}
|
||||
|
||||
if (!sinkpad) {
|
||||
// check through the list to find the first sink pad
|
||||
pads = gst_element_get_pad_list(element);
|
||||
|
|
Loading…
Reference in a new issue