MediaConnection: Remove Reset()
This commit is contained in:
parent
9ee6577e2d
commit
05e29ea1ad
@ -174,7 +174,6 @@ protected:
|
||||
|
||||
// Called from BMediaConnection
|
||||
status_t DisconnectConnection(BMediaConnection* conn);
|
||||
status_t ResetConnection(BMediaConnection* conn);
|
||||
status_t ReleaseConnection(BMediaConnection* conn);
|
||||
|
||||
private:
|
||||
|
@ -91,18 +91,14 @@ public:
|
||||
void SetCookie(void* cookie);
|
||||
void* Cookie() const;
|
||||
|
||||
// Disconnect this connection.
|
||||
// Disconnect this connection. When a connection is disconnected,
|
||||
// it can be reused as brand new.
|
||||
status_t Disconnect();
|
||||
|
||||
// TODO: We really need a Reset()?
|
||||
// When you reset a connection it can be reused as it was brand new.
|
||||
status_t Reset();
|
||||
|
||||
// Once you are done with this connection you release it, it automatically
|
||||
// remove the object from the BMediaClient and free all used resources.
|
||||
// This will make the connection to disappear completely, so if you
|
||||
// want to preserve it for future connections just Disconnect() and
|
||||
// Reset() it.
|
||||
// want to preserve it for future connections just Disconnect() it.
|
||||
status_t Release();
|
||||
|
||||
// Use this to set your callbacks.
|
||||
|
@ -195,15 +195,6 @@ BMediaClient::DisconnectConnection(BMediaConnection* conn)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
BMediaClient::ResetConnection(BMediaConnection* conn)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
BMediaClient::ReleaseConnection(BMediaConnection* conn)
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ BMediaClientNode::Connect(status_t status, const media_source& source,
|
||||
|
||||
// Reset the connection to reuse it
|
||||
if (status != B_OK) {
|
||||
conn->Reset();
|
||||
conn->Disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -470,10 +470,10 @@ BMediaClientNode::Disconnect(const media_source& source,
|
||||
if (conn == NULL)
|
||||
return;
|
||||
|
||||
if (source == conn->Source() && dest == conn->Destination())
|
||||
conn->Reset();
|
||||
|
||||
conn->Disconnected();
|
||||
if (conn->Destination() == dest) {
|
||||
conn->Disconnect();
|
||||
conn->Disconnected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,19 +129,10 @@ BMediaConnection::Disconnect()
|
||||
{
|
||||
CALLED();
|
||||
|
||||
return fOwner->DisconnectConnection(this);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
BMediaConnection::Reset()
|
||||
{
|
||||
CALLED();
|
||||
|
||||
delete fBufferGroup;
|
||||
fBufferGroup = NULL;
|
||||
|
||||
return fOwner->ResetConnection(this);
|
||||
return fOwner->DisconnectConnection(this);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user