MediaClient: Polish destructors
* Make Release() the only public way to destroy a connection.
This commit is contained in:
@@ -23,6 +23,11 @@ class BMediaConnection;
|
||||
class BMediaInput;
|
||||
class BMediaOutput;
|
||||
|
||||
// Private stuff
|
||||
class InputReleaser;
|
||||
class OutputReleaser;
|
||||
|
||||
|
||||
// BMediaClient is a general purpose class allowing to create any kind
|
||||
// of media_node. It automatically manage the expected behavior under
|
||||
// different run modes, and allow to specify the different capabilities needed.
|
||||
@@ -171,8 +176,8 @@ private:
|
||||
|
||||
bigtime_t fCurrentTime;
|
||||
|
||||
BObjectList<BMediaInput> fInputs;
|
||||
BObjectList<BMediaOutput> fOutputs;
|
||||
BObjectList<InputReleaser> fInputs;
|
||||
BObjectList<OutputReleaser> fOutputs;
|
||||
|
||||
media_connection_id fLastID;
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@ class BMediaClientNode;
|
||||
// to the connection B SendBuffer method.
|
||||
class BMediaConnection {
|
||||
public:
|
||||
virtual ~BMediaConnection();
|
||||
|
||||
const media_connection& Connection() const;
|
||||
BMediaClient* Client() const;
|
||||
|
||||
@@ -67,6 +65,7 @@ public:
|
||||
protected:
|
||||
BMediaConnection(
|
||||
media_connection_kinds kinds);
|
||||
virtual ~BMediaConnection();
|
||||
|
||||
// Those callbacks are shared between BMediaInput and BMediaOutput
|
||||
virtual void Connected(const media_format& format);
|
||||
@@ -84,6 +83,7 @@ protected:
|
||||
bigtime_t* max) const;
|
||||
|
||||
private:
|
||||
|
||||
void _ConnectionRegistered(BMediaClient* owner,
|
||||
media_connection_id id);
|
||||
|
||||
@@ -135,6 +135,8 @@ public:
|
||||
BMediaInput();
|
||||
|
||||
protected:
|
||||
virtual ~BMediaInput();
|
||||
|
||||
// Callbacks
|
||||
virtual status_t FormatChanged(const media_format& format);
|
||||
|
||||
@@ -168,6 +170,8 @@ public:
|
||||
bool IsEnabled() const;
|
||||
|
||||
protected:
|
||||
virtual ~BMediaOutput();
|
||||
|
||||
// Callbacks
|
||||
virtual status_t PrepareToConnect(media_format* format);
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ public:
|
||||
protected:
|
||||
BSimpleMediaConnection(
|
||||
media_connection_kinds kinds);
|
||||
virtual ~BSimpleMediaConnection();
|
||||
|
||||
process_hook fProcessHook;
|
||||
notify_hook fNotifyHook;
|
||||
@@ -129,6 +130,8 @@ public:
|
||||
BSimpleMediaInput();
|
||||
|
||||
protected:
|
||||
virtual ~BSimpleMediaInput();
|
||||
|
||||
virtual void Connected(const media_format& format);
|
||||
virtual void Disconnected();
|
||||
|
||||
@@ -141,6 +144,8 @@ public:
|
||||
BSimpleMediaOutput();
|
||||
|
||||
protected:
|
||||
virtual ~BSimpleMediaOutput();
|
||||
|
||||
virtual void Connected(const media_format& format);
|
||||
virtual void Disconnected();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user