MediaConnection: BufferSize should be inherited

* While it's trivial for audio to calculate the buffer size,
it isn't the same for video.
This commit is contained in:
Barrett17
2018-02-25 23:44:33 +01:00
parent 78fea9cd2d
commit 9cf18a39cd
4 changed files with 20 additions and 20 deletions
@@ -51,7 +51,7 @@ public:
// Represents the buffer size, depends on the format set or negotiated
// for this connection.
size_t BufferSize() const;
virtual size_t BufferSize() const = 0;
// Disconnect this connection. When a connection is disconnected,
// it can be reused as brand new.
@@ -114,6 +114,9 @@ public:
void* Cookie() const;
virtual size_t BufferSize() const;
virtual void SetBufferSize(size_t bufferSize);
protected:
BSimpleMediaConnection(
media_connection_kinds kinds);
@@ -122,6 +125,8 @@ protected:
process_hook fProcessHook;
notify_hook fNotifyHook;
void* fBufferCookie;
size_t fBufferSize;
};