MediaConnection: Non simple connections should be inherited

* BSimpleMediaConnections are provided for that.
* Make SetOutputEnabled private.
This commit is contained in:
Barrett17 2018-02-24 16:13:34 +01:00
parent c61ffa962e
commit befa252fbf
3 changed files with 10 additions and 13 deletions

View File

@ -115,10 +115,8 @@ private:
class BMediaInput : public virtual BMediaConnection {
public:
BMediaInput();
protected:
BMediaInput();
virtual ~BMediaInput();
// Callbacks
@ -147,13 +145,8 @@ private:
class BMediaOutput : public virtual BMediaConnection {
public:
BMediaOutput();
void SetEnabled(bool enabled);
bool IsEnabled() const;
protected:
BMediaOutput();
virtual ~BMediaOutput();
// Callbacks
@ -172,6 +165,10 @@ protected:
private:
media_output _MediaOutput() const;
// TODO: possibly unneeded.
void _SetEnabled(bool enabled);
bool _IsEnabled() const;
bool fEnabled;
size_t fFramesSent;

View File

@ -479,7 +479,7 @@ BMediaClientNode::EnableOutput(const media_source& source,
BMediaOutput* conn = fOwner->_FindOutput(source);
if (conn != NULL)
conn->SetEnabled(enabled);
conn->_SetEnabled(enabled);
}
@ -623,7 +623,7 @@ BMediaClientNode::_ProduceNewBuffer(const media_timed_event* event,
if (output == NULL)
return;
if (output->IsEnabled()) {
if (output->_IsEnabled()) {
BBuffer* buffer = _GetNextBuffer(output, event->event_time);
if (buffer != NULL) {

View File

@ -269,7 +269,7 @@ BMediaOutput::~BMediaOutput()
bool
BMediaOutput::IsEnabled() const
BMediaOutput::_IsEnabled() const
{
CALLED();
@ -278,7 +278,7 @@ BMediaOutput::IsEnabled() const
void
BMediaOutput::SetEnabled(bool enabled)
BMediaOutput::_SetEnabled(bool enabled)
{
fEnabled = enabled;
}