Enabled the code which sets the consumer run-mode based
on the current play back mode. I.e. paused or stopped playback get's B_OFFLINE run-mode, which makes sure the Consumer does not drop frames when they are too late. When single stepping frames backwards, the producer may have needed a lot of time to generate a frame and it may arrive late, which is no problem when the video is paused. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38667 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -111,12 +111,17 @@ NodeManager::InitCheck()
|
||||
void
|
||||
NodeManager::SetPlayMode(int32 mode, bool continuePlaying)
|
||||
{
|
||||
// if (fMediaRoster && fMediaRoster->Lock()) {
|
||||
// BMediaNode::run_mode runMode = mode > 0 ?
|
||||
// BMediaNode::B_DROP_DATA : BMediaNode::B_OFFLINE;
|
||||
// fMediaRoster->SetRunModeNode(fVideoConnection.consumer, runMode);
|
||||
// fMediaRoster->Unlock();
|
||||
// }
|
||||
if (fMediaRoster != NULL && fMediaRoster->Lock()) {
|
||||
BMediaNode::run_mode runMode = mode > 0 ?
|
||||
BMediaNode::B_DROP_DATA : BMediaNode::B_OFFLINE;
|
||||
status_t ret = fMediaRoster->SetRunModeNode(fVideoConnection.consumer,
|
||||
runMode);
|
||||
if (ret != B_OK) {
|
||||
printf("NodeManager::SetPlayMode(%ld), setting run mode failed: "
|
||||
"%s\n", mode, strerror(ret));
|
||||
}
|
||||
fMediaRoster->Unlock();
|
||||
}
|
||||
|
||||
PlaybackManager::SetPlayMode(mode, continuePlaying);
|
||||
}
|
||||
@@ -690,8 +695,6 @@ NodeManager::_StartNodes()
|
||||
|
||||
bigtime_t perf = timeSource->PerformanceTimeFor(real + latency
|
||||
+ initLatency);
|
||||
printf("performance time for %lld: %lld\n", real + latency
|
||||
+ initLatency, perf);
|
||||
|
||||
timeSource->Release();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user