added SetTimeSourceFor
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2371 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1429,8 +1429,35 @@ status_t
|
|||||||
BMediaRoster::SetTimeSourceFor(media_node_id node,
|
BMediaRoster::SetTimeSourceFor(media_node_id node,
|
||||||
media_node_id time_source)
|
media_node_id time_source)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED();
|
CALLED();
|
||||||
return B_ERROR;
|
if (node <= 0 || time_source <= 0)
|
||||||
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
|
media_node clone;
|
||||||
|
status_t rv, result;
|
||||||
|
|
||||||
|
rv = GetNodeFor(node, &clone);
|
||||||
|
if (rv != B_OK) {
|
||||||
|
FATAL("BMediaRoster::SetTimeSourceFor, GetNodeFor failed, node id %ld\n", node);
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = B_OK;
|
||||||
|
node_set_timesource_command cmd;
|
||||||
|
cmd.timesource_id = time_source;
|
||||||
|
rv = SendToPort(clone.port, NODE_SET_TIMESOURCE, &cmd, sizeof(cmd));
|
||||||
|
if (rv != B_OK) {
|
||||||
|
FATAL("BMediaRoster::SetTimeSourceFor, sending NODE_SET_TIMESOURCE failed, node id %ld\n", node);
|
||||||
|
result = B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = ReleaseNode(clone);
|
||||||
|
if (rv != B_OK) {
|
||||||
|
FATAL("BMediaRoster::SetTimeSourceFor, ReleaseNode failed, node id %ld\n", node);
|
||||||
|
result = B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1704,20 +1731,21 @@ BMediaRoster::GetLatencyFor(const media_node & producer,
|
|||||||
bigtime_t * out_latency)
|
bigtime_t * out_latency)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
*out_latency = 0;
|
*out_latency = 25000;
|
||||||
return B_ERROR;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BMediaRoster::GetInitialLatencyFor(const media_node & producer,
|
BMediaRoster::GetInitialLatencyFor(const media_node & producer,
|
||||||
bigtime_t * out_latency,
|
bigtime_t * out_latency,
|
||||||
uint32 * out_flags)
|
uint32 * out_flags /* = NULL */)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
*out_latency = 0;
|
*out_latency = 10000;
|
||||||
*out_flags = 0;
|
if (out_flags)
|
||||||
return B_ERROR;
|
*out_flags = 0;
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1726,8 +1754,8 @@ BMediaRoster::GetStartLatencyFor(const media_node & time_source,
|
|||||||
bigtime_t * out_latency)
|
bigtime_t * out_latency)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
*out_latency = 0;
|
*out_latency = 5000;
|
||||||
return B_ERROR;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user