MediaConnection: Remove redundant IsInput/IsOutput
This commit is contained in:
parent
9969137ced
commit
51844723d3
@ -35,9 +35,6 @@ public:
|
||||
media_connection_id Id() const;
|
||||
const char* Name() const;
|
||||
|
||||
bool IsInput() const;
|
||||
bool IsOutput() const;
|
||||
|
||||
bool HasBinding() const;
|
||||
BMediaConnection* Binding() const;
|
||||
|
||||
|
@ -146,10 +146,13 @@ BMediaClient::Connect(BMediaConnection* ourConnection,
|
||||
{
|
||||
CALLED();
|
||||
|
||||
if (ourConnection->IsOutput() && theirConnection.IsInput())
|
||||
return _ConnectInput(dynamic_cast<BMediaOutput*>(ourConnection), theirConnection);
|
||||
else if (ourConnection->IsInput() && theirConnection.IsOutput())
|
||||
return _ConnectOutput(dynamic_cast<BMediaInput*>(ourConnection), theirConnection);
|
||||
BMediaOutput* output = dynamic_cast<BMediaOutput*>(ourConnection);
|
||||
if (output != NULL && theirConnection.IsInput())
|
||||
return _ConnectInput(output, theirConnection);
|
||||
|
||||
BMediaInput* input = dynamic_cast<BMediaInput*>(ourConnection);
|
||||
if (input != NULL && theirConnection.IsOutput())
|
||||
return _ConnectOutput(input, theirConnection);
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
@ -36,24 +36,6 @@ BMediaConnection::Connection() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BMediaConnection::IsOutput() const
|
||||
{
|
||||
CALLED();
|
||||
|
||||
return fConnection.IsOutput();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BMediaConnection::IsInput() const
|
||||
{
|
||||
CALLED();
|
||||
|
||||
return fConnection.IsInput();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BMediaConnection::HasBinding() const
|
||||
{
|
||||
@ -162,7 +144,7 @@ BMediaConnection::ConnectionRegistered(BMediaClient* owner,
|
||||
fConnection.id = id;
|
||||
fConnection.client = fOwner->Client();
|
||||
|
||||
if (IsOutput()) {
|
||||
if (fConnection.IsOutput()) {
|
||||
fConnection.source.port = fOwner->fNode->ControlPort();
|
||||
fConnection.source.id = fConnection.id;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user