MediaConnection: Fix buffer size and duration redudancy

* There's no need to supply ways to mismatch the buffer duration
and size. Anything should reflect the media_format, this is at least
fixed on API level.
This commit is contained in:
Dario Casalinuovo 2016-12-17 19:07:23 +01:00
parent 2fdc256d60
commit 75b90c42e5
2 changed files with 8 additions and 24 deletions

View File

@ -41,22 +41,22 @@ public:
bool HasBinding() const;
BMediaConnection* Binding() const;
bool IsConnected() const;
// This allow to specify a format that will be used while
// connecting to another node. See BMediaClient::SetFormat.
void SetAcceptedFormat(
const media_format& format);
const media_format& AcceptedFormat() const;
// Represents the buffer size used by the media_node
void SetBufferSize(size_t size);
// Represents the buffer size, depends on the format set or negotiated
// for this connection.
size_t BufferSize() const;
// Represents the duration of one buffer
void SetBufferDuration(bigtime_t duration);
// Represents the duration of one buffer depends on the format set or
// negotiated for this connection.
bigtime_t BufferDuration() const;
bool IsConnected() const;
// Disconnect this connection. When a connection is disconnected,
// it can be reused as brand new.
status_t Disconnect();

View File

@ -120,15 +120,8 @@ BMediaConnection::Release()
}
void
BMediaConnection::SetBufferSize(size_t size)
{
CALLED();
fBufferSize = size;
}
// TODO: The data represented by the following two functions should be
// automatically calculated depending on the media_format.
size_t
BMediaConnection::BufferSize() const
{
@ -138,15 +131,6 @@ BMediaConnection::BufferSize() const
}
void
BMediaConnection::SetBufferDuration(bigtime_t duration)
{
CALLED();
fBufferDuration = duration;
}
bigtime_t
BMediaConnection::BufferDuration() const
{