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 {
|
class BMediaInput : public virtual BMediaConnection {
|
||||||
public:
|
|
||||||
BMediaInput();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
BMediaInput();
|
||||||
virtual ~BMediaInput();
|
virtual ~BMediaInput();
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
|
@ -147,13 +145,8 @@ private:
|
||||||
|
|
||||||
|
|
||||||
class BMediaOutput : public virtual BMediaConnection {
|
class BMediaOutput : public virtual BMediaConnection {
|
||||||
public:
|
|
||||||
BMediaOutput();
|
|
||||||
|
|
||||||
void SetEnabled(bool enabled);
|
|
||||||
bool IsEnabled() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
BMediaOutput();
|
||||||
virtual ~BMediaOutput();
|
virtual ~BMediaOutput();
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
|
@ -172,6 +165,10 @@ protected:
|
||||||
private:
|
private:
|
||||||
media_output _MediaOutput() const;
|
media_output _MediaOutput() const;
|
||||||
|
|
||||||
|
// TODO: possibly unneeded.
|
||||||
|
void _SetEnabled(bool enabled);
|
||||||
|
bool _IsEnabled() const;
|
||||||
|
|
||||||
bool fEnabled;
|
bool fEnabled;
|
||||||
size_t fFramesSent;
|
size_t fFramesSent;
|
||||||
|
|
||||||
|
|
|
@ -479,7 +479,7 @@ BMediaClientNode::EnableOutput(const media_source& source,
|
||||||
|
|
||||||
BMediaOutput* conn = fOwner->_FindOutput(source);
|
BMediaOutput* conn = fOwner->_FindOutput(source);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
conn->SetEnabled(enabled);
|
conn->_SetEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ BMediaClientNode::_ProduceNewBuffer(const media_timed_event* event,
|
||||||
if (output == NULL)
|
if (output == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (output->IsEnabled()) {
|
if (output->_IsEnabled()) {
|
||||||
BBuffer* buffer = _GetNextBuffer(output, event->event_time);
|
BBuffer* buffer = _GetNextBuffer(output, event->event_time);
|
||||||
|
|
||||||
if (buffer != NULL) {
|
if (buffer != NULL) {
|
||||||
|
|
|
@ -269,7 +269,7 @@ BMediaOutput::~BMediaOutput()
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BMediaOutput::IsEnabled() const
|
BMediaOutput::_IsEnabled() const
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ BMediaOutput::IsEnabled() const
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMediaOutput::SetEnabled(bool enabled)
|
BMediaOutput::_SetEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
fEnabled = enabled;
|
fEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue