MediaConnection: Non simple connections should be inherited
* BSimpleMediaConnections are provided for that. * Make SetOutputEnabled private.
This commit is contained in:
parent
c61ffa962e
commit
befa252fbf
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue