Implement BMediaRoster::RollNode().

Fixes #9083.

Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
Dario Casalinuovo
2015-01-08 08:57:01 +01:00
committed by Adrien Destugues
parent 67d5656fab
commit 14896b937a
3 changed files with 39 additions and 2 deletions
+17
View File
@@ -632,6 +632,23 @@ BMediaNode::HandleMessage(int32 message,
return B_OK;
}
case NODE_ROLL:
{
const node_roll_command *command
= static_cast<const node_roll_command *>(data);
TRACE("BMediaNode::HandleMessage NODE_ROLL, node %ld\n",
fNodeID);
if (command->seek_media_time != B_INFINITE_TIMEOUT)
Seek(command->seek_media_time,
command->start_performance_time);
Start(command->start_performance_time);
Stop(command->stop_performance_time, false);
return B_OK;
}
case NODE_SET_TIMESOURCE:
{
const node_set_timesource_command *command = static_cast<const node_set_timesource_command *>(data);
+15 -2
View File
@@ -1400,8 +1400,21 @@ status_t
BMediaRoster::RollNode(const media_node& node, bigtime_t startPerformance,
bigtime_t stopPerformance, bigtime_t atMediaTime)
{
UNIMPLEMENTED();
return B_ERROR;
CALLED();
if (IS_INVALID_NODE(node))
return B_MEDIA_BAD_NODE;
TRACE("BMediaRoster::RollNode, node %" B_PRId32 ", at start perf %"
B_PRId64 ", at stop perf %" B_PRId64 ", at media time %"
B_PRId64 "\n", node.node, startPerformance,
stopPerformance, atMediaTime);
node_roll_command command;
command.start_performance_time = startPerformance;
command.stop_performance_time = stopPerformance;
command.seek_media_time = atMediaTime;
return write_port(node.port, NODE_ROLL, &command, sizeof(command));
}