Skip to content

Commit

Permalink
BMediaNode API is now feature complete
Browse files Browse the repository at this point in the history
* Change BMediaNode::GetNodeAttributes macro to CALLED(),
  since the base implementation should just return B_ERROR,
  unset as unimplemented for consistency.
* This means that since the latest changes the class
  is now feature complete and implements the whole R5 API.
* Add documentation comment for it as well.
* Fix some lines going over 80 chars.
  • Loading branch information
Numerio committed Jul 12, 2015
1 parent 32e4840 commit 8abf945
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/kits/media/MediaNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ BMediaNode::~BMediaNode()
if ((fKinds & NODE_KIND_SHADOW_TIMESOURCE) == 0) {
if (fControlPort > 0)
delete_port(fControlPort);
} else
TRACE("BMediaNode::~BMediaNode: shadow timesource, not unregistering\n");
} else {
TRACE("BMediaNode::~BMediaNode: shadow timesource,"
" not unregistering\n");
}
}


Expand Down Expand Up @@ -787,7 +789,8 @@ status_t
BMediaNode::RequestCompleted(const media_request_info& info)
{
CALLED();
// This function is called whenever a request issued by the node is completed.
// This function is called whenever
// a request issued by the node is completed.
// May be overriden by derived classes.
// info.change_tag can be used to match up requests against
// the accompaning calles from
Expand Down Expand Up @@ -816,7 +819,8 @@ void
BMediaNode::NodeRegistered()
{
CALLED();
// The Media Server calls this hook function after the node has been registered.
// The Media Server calls this hook function
// after the node has been registered.
// May be overriden by derived classes.
}

Expand All @@ -825,8 +829,9 @@ status_t
BMediaNode::GetNodeAttributes(media_node_attribute* outAttributes,
size_t inMaxCount)
{
UNIMPLEMENTED();

CALLED();
// This is implemented by derived classes that fills
// it's own attributes to a max of inMaxCount size.
return B_ERROR;
}

Expand Down Expand Up @@ -926,7 +931,8 @@ BMediaNode::IncrementChangeTag()
CALLED();
// Only present in BeOS R4
// Obsoleted in BeOS R4.5 and later
// "updates the change tag, so that downstream consumers know that the node is in a new state."
// "updates the change tag, so that downstream consumers
// know that the node is in a new state."
// not supported, only for binary compatibility
return 0;
}
Expand Down

0 comments on commit 8abf945

Please sign in to comment.