MediaClient: Use higher level structs for the remaining methods
This commit is contained in:
parent
ace98a8db2
commit
902701e6bf
@ -116,9 +116,9 @@ public:
|
||||
BMediaConnection* OutputAt(int32 index) const;
|
||||
|
||||
BMediaConnection* FindInput(
|
||||
const media_destination& dest) const;
|
||||
const media_connection& input) const;
|
||||
BMediaConnection* FindOutput(
|
||||
const media_source& source) const;
|
||||
const media_connection& output) const;
|
||||
|
||||
bool IsRunning() const;
|
||||
|
||||
@ -135,7 +135,9 @@ public:
|
||||
// It will be B_INCREASE_LATENCY by default
|
||||
BMediaNode::run_mode RunMode() const;
|
||||
status_t SetRunMode(BMediaNode::run_mode mode);
|
||||
status_t SetTimeSource(media_node timesource);
|
||||
// TODO: Really needed?
|
||||
status_t SetTimeSource(
|
||||
const media_client& timesource);
|
||||
|
||||
// Specify a latency range to allow the node behave correctly.
|
||||
// Ideally the minimum latency should be the algorithmic latency you expect
|
||||
@ -183,6 +185,10 @@ protected:
|
||||
status_t ReleaseConnection(BMediaConnection* conn);
|
||||
|
||||
private:
|
||||
BMediaConnection* FindInput(
|
||||
const media_destination& dest) const;
|
||||
BMediaConnection* FindOutput(
|
||||
const media_source& source) const;
|
||||
|
||||
void _Init();
|
||||
void _Deinit();
|
||||
|
@ -249,6 +249,30 @@ BMediaClient::OutputAt(int32 index) const
|
||||
}
|
||||
|
||||
|
||||
BMediaConnection*
|
||||
BMediaClient::FindInput(const media_connection& input) const
|
||||
{
|
||||
CALLED();
|
||||
|
||||
if (!input.IsInput())
|
||||
return NULL;
|
||||
|
||||
return FindInput(input.Destination());
|
||||
}
|
||||
|
||||
|
||||
BMediaConnection*
|
||||
BMediaClient::FindOutput(const media_connection& output) const
|
||||
{
|
||||
CALLED();
|
||||
|
||||
if (!output.IsOutput())
|
||||
return NULL;
|
||||
|
||||
return FindOutput(output.Source());
|
||||
}
|
||||
|
||||
|
||||
BMediaConnection*
|
||||
BMediaClient::FindInput(const media_destination& dest) const
|
||||
{
|
||||
@ -388,12 +412,12 @@ BMediaClient::SetRunMode(BMediaNode::run_mode mode)
|
||||
|
||||
|
||||
status_t
|
||||
BMediaClient::SetTimeSource(media_node timesource)
|
||||
BMediaClient::SetTimeSource(const media_client& timesource)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
return BMediaRoster::CurrentRoster()->SetTimeSourceFor(fNode->Node().node,
|
||||
timesource.node);
|
||||
timesource.node.node);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user