Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
51110bc2
Commit
51110bc2
authored
Dec 29, 2009
by
Vincent Carrubba
Browse files
Recode disconnect methods with good use of SimpleObjectReferencer
parent
36c8a053
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/EffectsEngine/EffectNode.cpp
View file @
51110bc2
...
...
@@ -564,14 +564,14 @@ bool EffectNode::disconnectStaticVideoOutput( quint32 nodeId )
in
=
out
->
getInSlotPtr
();
if
(
out
->
disconnect
()
==
false
)
return
(
false
);
m_connectedStaticVideosOutputs
.
erase
(
m_connectedStaticVideosOutputs
.
find
(
out
->
getId
()
)
);
m_connectedStaticVideosOutputs
.
delObjectReference
(
out
->
getId
()
);
father
=
in
->
getPrivateFather
();
if
(
father
==
m_father
)
father
->
m_connectedInternalsStaticVideosInputs
.
erase
(
father
->
m_connectedInternalsStaticVideosInputs
.
find
(
in
->
getId
()
)
);
father
->
dereferenceInternalStaticVideoInputAsConnected
(
in
->
getId
()
);
else
(
father
==
this
)
m_connectedStaticVideosInputs
.
delObjectReference
(
in
->
getId
()
);
else
// POTENTIAL RACE-CONDITION
father
->
m_connectedStaticVideosInputs
.
erase
(
father
->
m_connectedStaticVideosInputs
.
find
(
in
->
getId
()
)
);
father
->
dereferenceStaticVideoInputAsConnected
(
in
->
getId
()
);
return
(
true
);
}
...
...
@@ -587,14 +587,14 @@ bool EffectNode::disconnectStaticVideoOutput( QString const & nodeName )
in
=
out
->
getInSlotPtr
();
if
(
out
->
disconnect
()
==
false
)
return
(
false
);
m_connectedStaticVideosOutputs
.
erase
(
m_connectedStaticVideosOutputs
.
find
(
out
->
getId
()
)
);
m_connectedStaticVideosOutputs
.
delObjectReference
(
out
->
getId
()
);
father
=
in
->
getPrivateFather
();
if
(
father
==
m_father
)
father
->
m_connectedInternalsStaticVideosInputs
.
erase
(
father
->
m_connectedInternalsStaticVideosInputs
.
find
(
in
->
getId
()
)
);
father
->
dereferenceInternalStaticVideoInputAsConnected
(
in
->
getId
()
);
else
(
father
==
this
)
m_connectedStaticVideosInputs
.
delObjectReference
(
in
->
getId
()
);
else
// POTENTIAL RACE-CONDITION
father
->
m_connectedStaticVideosInputs
.
erase
(
father
->
m_connectedStaticVideosInputs
.
find
(
in
->
getId
()
)
);
father
->
dereferenceStaticVideoInputAsConnected
(
in
->
getId
()
);
return
(
true
);
}
...
...
@@ -1414,13 +1414,9 @@ bool EffectNode::disconnectInternalStaticVideoOutput( quint32 nodeId )
in
=
out
->
getInSlotPtr
();
if
(
out
->
disconnect
()
==
false
)
return
(
false
);
m_connectedInternalsStaticVideosOutputs
.
erase
(
m_connectedInternalsStaticVideosOutputs
.
find
(
out
->
getId
()
)
);
m_connectedInternalsStaticVideosOutputs
.
delObjectReference
(
out
->
getId
()
);
father
=
in
->
getPrivateFather
();
if
(
father
==
this
)
m_connectedInternalsStaticVideosInputs
.
erase
(
m_connectedInternalsStaticVideosInputs
.
find
(
in
->
getId
()
)
);
else
// POTENTIAL RACE-CONDITION
father
->
m_connectedStaticVideosInputs
.
erase
(
father
->
m_connectedStaticVideosInputs
.
find
(
in
->
getId
()
)
);
father
->
dereferenceStaticVideoInputAsConnected
(
in
->
getId
()
);
return
(
true
);
}
...
...
@@ -1436,15 +1432,9 @@ bool EffectNode::disconnectInternalStaticVideoOutput( QString const & nod
in
=
out
->
getInSlotPtr
();
if
(
out
->
disconnect
()
==
false
)
return
(
false
);
m_connectedInternalsStaticVideosOutputs
.
erase
(
m_connectedInternalsStaticVideosOutputs
.
find
(
out
->
getId
()
)
);
m_connectedInternalsStaticVideosOutputs
.
delObjectReference
(
out
->
getId
()
);
father
=
in
->
getPrivateFather
();
if
(
father
==
this
)
m_connectedInternalsStaticVideosInputs
.
erase
(
m_connectedInternalsStaticVideosInputs
.
find
(
in
->
getId
()
)
);
else
// POTENTIAL RACE-CONDITION
father
->
m_connectedStaticVideosInputs
.
erase
(
father
->
m_connectedStaticVideosInputs
.
find
(
in
->
getId
()
)
);
father
->
dereferenceStaticVideoInputAsConnected
(
in
->
getId
()
);
return
(
true
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment