Set playback speed
This commit is contained in:
@@ -408,6 +408,18 @@ namespace winrt::Vav2Player::implementation
|
||||
return m_status;
|
||||
}
|
||||
|
||||
double VideoPlayerControl2::PlaybackSpeed()
|
||||
{
|
||||
return m_playbackController->GetPlaybackSpeed();
|
||||
}
|
||||
|
||||
void VideoPlayerControl2::SetPlaybackSpeed(double speed)
|
||||
{
|
||||
LogMgr::GetInstance().LogInfo(L"VideoPlayerControl2",
|
||||
std::wstring(L"SetPlaybackSpeed: ") + std::to_wstring(speed) + L"x");
|
||||
m_playbackController->SetPlaybackSpeed(speed);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Private Helper Methods
|
||||
// ========================================
|
||||
@@ -530,6 +542,12 @@ namespace winrt::Vav2Player::implementation
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip if previous frame is still being processed
|
||||
if (processor->IsProcessing()) {
|
||||
// Frame is still being decoded/rendered, skip this timing tick
|
||||
return;
|
||||
}
|
||||
|
||||
// Process frame (decode on background, render on UI thread)
|
||||
VavCorePlayer* player = controller->GetVavCorePlayer();
|
||||
if (!player) {
|
||||
|
||||
Reference in New Issue
Block a user