mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2025-01-10 08:55:36 +00:00
Autoplay to discover the pads for decodebin2
Do not try to connect the 2 elements when double click on a pad.
This commit is contained in:
parent
3dbb6ffd1d
commit
babeda105f
1 changed files with 11 additions and 1 deletions
|
@ -363,6 +363,11 @@ void GraphDisplay::mouseReleaseEvent (QMouseEvent *event)
|
|||
if(srcPad != NULL && dstPad != NULL)
|
||||
break;
|
||||
}
|
||||
if(!infoSrc.m_name.compare(infoDst.m_name)) {
|
||||
qDebug() << "infoSrc == infoDst. No need to connect anything.";
|
||||
goto exit;
|
||||
|
||||
}
|
||||
|
||||
assert(srcPad != NULL && dstPad != NULL);
|
||||
|
||||
|
@ -380,8 +385,13 @@ void GraphDisplay::mouseReleaseEvent (QMouseEvent *event)
|
|||
|
||||
QMessageBox::warning(this, "Coonection failed", msg);
|
||||
}
|
||||
|
||||
m_info = m_pGraph -> GetInfo();
|
||||
updateDisplayInfoIds();
|
||||
if(g_str_has_prefix(infoDst.m_name.c_str(),"decodebin")) {
|
||||
m_pGraph->Play();
|
||||
qDebug() << "Launch play to discover the new pad";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(m_moveInfo.m_action == Select)
|
||||
|
@ -420,7 +430,7 @@ void GraphDisplay::mouseReleaseEvent (QMouseEvent *event)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
exit:
|
||||
m_moveInfo.m_action = None;
|
||||
m_moveInfo.m_elementId = -1;
|
||||
m_moveInfo.m_padId = -1;
|
||||
|
|
Loading…
Reference in a new issue